Uploaded image for project: 'ngrinder'
  1. ngrinder
  2. NGRINDER-661

Provide a convenient utility class to retrieve the test execution info

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2.2
    • Fix Version/s: 3.2.3
    • Component/s: controller
    • Labels:
      None

      Description

      Currently, if a user want to get the various grinder runtime info, they should access grinder.getProperties("key").
      The key is little bit hard to remember. so It might be better if we provide GrinderUtil class which contains various info and utility method which is frequently used in the script.

        Activity

        Hide
        junoyoon JunHo Yoon added a comment -

        In org.ngrinder.util.GrinderUtil, following apis are provided

        getThreadUniqId()
        random : Random
        any(List<T>)
        any(T[])
        getParam()
        getParam(String)
        getParamInt()
        getParamLong()
        getParamFloat()
        getParamDouble()
        getParamBoolean()
        getAgentCount()
        getProcessCount()
        getThreadCount()

        Show
        junoyoon JunHo Yoon added a comment - In org.ngrinder.util.GrinderUtil, following apis are provided getThreadUniqId() random : Random any(List<T>) any(T[]) getParam() getParam(String) getParamInt() getParamLong() getParamFloat() getParamDouble() getParamBoolean() getAgentCount() getProcessCount() getThreadCount()
        Hide
        junoyoon JunHo Yoon added a comment -

        The utlility class package name is changed.
        ==> net.grinder.util.GrinderUtil

        Show
        junoyoon JunHo Yoon added a comment - The utlility class package name is changed. ==> net.grinder.util.GrinderUtil
        Hide
        junoyoon JunHo Yoon added a comment -

        Only Groovy script can use this class.

        Show
        junoyoon JunHo Yoon added a comment - Only Groovy script can use this class.
        Hide
        junoyoon JunHo Yoon added a comment -

        In the Groovy script, following utility static APIs are provided.

        net.grinder.util.GrinderUtils

        • getThreadUniqId()
        • nvs(Map<Object, Object>)
        • any(List<T>)
        • any(T[])
        • getParam()
        • getParam(String)
        • getParamInt()
        • getParamLong()
        • getParamFloat()
        • getParamDouble()
        • getParamBoolean()
        • getAgentCount()
        • getProcessCount()
        • getThreadCount()
        Show
        junoyoon JunHo Yoon added a comment - In the Groovy script, following utility static APIs are provided. net.grinder.util.GrinderUtils getThreadUniqId() nvs(Map<Object, Object>) any(List<T>) any(T[]) getParam() getParam(String) getParamInt() getParamLong() getParamFloat() getParamDouble() getParamBoolean() getAgentCount() getProcessCount() getThreadCount()
        Hide
        monsoonvip Jamous Fu added a comment -

        whether has this function supported in Jython code now?

        Show
        monsoonvip Jamous Fu added a comment - whether has this function supported in Jython code now?
        Hide
        junoyoon JunHo Yoon added a comment -

        This is only provided in the groovy context.

        Show
        junoyoon JunHo Yoon added a comment - This is only provided in the groovy context.

          People

          • Assignee:
            junoyoon JunHo Yoon
            Reporter:
            junoyoon JunHo Yoon
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: