Class CaseFormat

  • All Implemented Interfaces:
    org.apache.jmeter.functions.Function

    public class CaseFormat
    extends org.apache.jmeter.functions.AbstractFunction
    Case Formating Function Support String manipulations of:
    • Lower and upper camel case
    • as: lowerCamelCase and UpperCamelCase
    • Snake/lower underscore case
    • as: snake_lower_underscore_case
    • Lisp/kebab/spinal/lower hyphen case
    • as: lis-keba-spinal-lower-case
    • upper underscore case
    • as: UPPER_UNDERSCORE_CASE
    • Train case
    • as: TRAIN-CASE
    Support similar to Guava case options https://google.github.io/guava/releases/19.0/api/docs/com/google/common/base/CaseFormat.html Support similar to Stack Exchange answers https://softwareengineering.stackexchange.com/questions/104468/if-this-is-camelcase-what-is-this
    • Constructor Detail

      • CaseFormat

        public CaseFormat()
    • Method Detail

      • execute

        public String execute​(org.apache.jmeter.samplers.SampleResult previousResult,
                              org.apache.jmeter.samplers.Sampler currentSampler)
                       throws org.apache.jmeter.functions.InvalidVariableException
        Specified by:
        execute in interface org.apache.jmeter.functions.Function
        Specified by:
        execute in class org.apache.jmeter.functions.AbstractFunction
        Throws:
        org.apache.jmeter.functions.InvalidVariableException
      • changeCase

        protected String changeCase​(String originalString,
                                    String mode)
        Change case options
        Parameters:
        originalString -
        mode -
        Returns:
        string after change case
      • setParameters

        public void setParameters​(Collection<org.apache.jmeter.engine.util.CompoundVariable> parameters)
                           throws org.apache.jmeter.functions.InvalidVariableException
        Specified by:
        setParameters in interface org.apache.jmeter.functions.Function
        Specified by:
        setParameters in class org.apache.jmeter.functions.AbstractFunction
        Throws:
        org.apache.jmeter.functions.InvalidVariableException
      • getReferenceKey

        public String getReferenceKey()
        Specified by:
        getReferenceKey in interface org.apache.jmeter.functions.Function
        Specified by:
        getReferenceKey in class org.apache.jmeter.functions.AbstractFunction
      • getArgumentDesc

        public List<String> getArgumentDesc()