Class JmcConfig


  • public final class JmcConfig
    extends java.lang.Object
    Jmc Config to have access to all JMC configuration and Jmeter configuration.
     Load properties by the following order resource than file:
    
     1 -org/anasoid/jmc/core/config/jmc.properties
     2- jmc-user.properties
     3- {user.home}/jmc-user.properties
     4- System properties
     
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getDataRootFolder()
      Get Data root folder.
      static java.lang.String getJMeterVersion()
      Gets the JMeter Version (from Jmeter).
      static java.lang.String getPropertiesVersion()
      Gets the JMeter Properties Version.
      static java.lang.String getProperty​(java.lang.String key)
      get property from config.
      static java.lang.String getProperty​(java.lang.String key, java.lang.String defaultValue)
      get property from config.
      static java.util.Map<java.lang.String,​java.lang.String> getPropertyPrefix​(java.lang.String prefix)
      get property from config.
      static java.lang.String getResultRootFolder()
      Get Result root folder.
      static java.lang.String getScriptRootFolder()
      Get Script root folder.
      static java.lang.String getVersion()
      Gets the Version (from Jmeter).
      static boolean isDataResource()
      Get Data csv fom resource, use only when executing from code source.
      static boolean isScriptResource()
      Get Script root folder.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getDataRootFolder

        public static java.lang.String getDataRootFolder()
        Get Data root folder.
      • getScriptRootFolder

        public static java.lang.String getScriptRootFolder()
        Get Script root folder.
      • getResultRootFolder

        public static java.lang.String getResultRootFolder()
        Get Result root folder.
      • isDataResource

        public static boolean isDataResource()
        Get Data csv fom resource, use only when executing from code source.
      • isScriptResource

        public static boolean isScriptResource()
        Get Script root folder.
      • getVersion

        public static java.lang.String getVersion()
        Gets the Version (from Jmeter).
        Returns:
        the version string
      • getJMeterVersion

        public static java.lang.String getJMeterVersion()
        Gets the JMeter Version (from Jmeter).
        Returns:
        the JMeter version string
      • getPropertiesVersion

        public static java.lang.String getPropertiesVersion()
        Gets the JMeter Properties Version.
        Returns:
        the JMeter Properties version string
      • getProperty

        public static java.lang.String getProperty​(java.lang.String key)
        get property from config.
        Parameters:
        key - key.
        Returns:
        null or value.
      • getProperty

        public static java.lang.String getProperty​(java.lang.String key,
                                                   java.lang.String defaultValue)
        get property from config.
        Parameters:
        key - key.
        defaultValue - defaultValue, return if key not found.
        Returns:
        value or defaultValue.
      • getPropertyPrefix

        public static java.util.Map<java.lang.String,​java.lang.String> getPropertyPrefix​(java.lang.String prefix)
        get property from config.
        Parameters:
        prefix - prefix, keys start with "prefix." .
        Returns:
        null or value.