GithubHelp home page GithubHelp logo

cherednichenko / custom_jmeter_functions Goto Github PK

View Code? Open in Web Editor NEW

This project forked from danilgolikov/custom_jmeter_functions

0.0 0.0 0.0 10.14 MB

Custom functions for jmeter

Java 100.00%

custom_jmeter_functions's Introduction

Custom_jmeter_functions

Custom functions for jmeter

Ready-made functions:

  • forEachArray - is a function for iterating over an array by calling a function. Each call to this function increments the index
    • parameters:

      • Array or variable - specifies an array or variable. If the variable is not found, it is converted into an array
      • End value (default null) (optional) - the value that will be returned when all elements have been processed
      • For all threads (default false) (optional) - a flag determining the array's scope
        • true: each thread can access the same array (synchronized is used)
        • false: a separate array is declared for each thread
      • Command (clear, delete) (optional) - special commands for interacting with the array storage
        • clear: remove all saved arrays
        • delete: remove only the specified array


  • generateEmail - a function that generates an email

    • parameters:
      • List domain(s) (use | as separator): a list of domains that will be randomly inserted at the end of the email
      • Use chars in name email (Optional): list of characters to be used in generating the email name
      • Minimum length of the email name (min 1) (Optional)
      • Maximum length of the email name (max 64) (Optional)


  • generateInnLegal - a function that generates a valid INN for a legal entity


  • generateInnNatural - a function that generates a valid INN for a natural entity


  • generateOgrn - a function that generates a valid OGRN


  • generatePhoneNumber - a function that generates a phone number

    • parameters:
      • Country code(s) (use | as separator)


  • generatePinCode - a function that generates a PIN_CODE

    • parameters:
      • PIN-code length: specifies the length of the PIN code. If the length of the generated number
        is less than the entered one, then the number will align to the entered length
      • The minimum value allowed for a range of values (optional)
      • The maximum value allowed for a range of values (optional)


  • generateSnils - a function that generates a valid SNILS


  • jsonPathFromVar - allows extracting values from a variable that stores JSON using JsonPath

    • parameters:
      • Target variable - a variable to which JsonPath will be applied
      • JsonPath expression - JsonPath expression ._.


  • globalCounter - Counter that is accessible anywhere in the TestPlan. It is possible to create multiple counters by assigning them names. The counter uses the synchronized modifier in its methods, which means that each time it is accessed, the retrieved value will be unique (for example, if 100 threads simultaneously access the counter, each will receive a unique value within the range). However, this also means potential slowdowns with a large number of threads (although this has not been tested yet)

    • parameters:
      • Counter name - unique name for the counter instance
      • Command type - command that defines the behavior of the counter when invoked
        • addAndGet
        • getAndAdd
        • set
        • get
        • delete
      • Start value - initial value of the counter. It is set only when the counter is created and with the set command (can be negative)
      • End value - final value of the counter. When this value is reached (or exceeded), the counter will reset to the Start value (can be negative)
      • Implement value - value that will be added (can be negative)
      • Number length - format length of the counter

    Load Add Start value & End value Errors


  • randomStringLiteral:

    • parameters:
      • List string literals (use | as separator)
      • Use a separator (Optional)


  • samplerComment - a function that returns a comment of the element in which it is called. Like samplerName, only samplerComment


  • timeRandom - generates a random date within the specified range

    • parameters:

      • Start time - start date of the range
      • End time - end date of the range

      can be relative, for example: now; now-5m; now-10d, now+1y.

      • Symbols
        • s - seconds
        • m - minutes
        • h - hours
        • d - days
        • w - weeks
        • M - month
        • y - years
      • Time format (default timestamp) - the format in which the random date will be returned

    Relative time Absolute time


Version Jmeter: 5.4.3
The Custom_functions-x.x.x.jar should be put in %jmeter%\lib\ext

custom_jmeter_functions's People

Contributors

danilgolikov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.