Apache JMeter : Add random data in body for request

前端 未结 3 1069
心在旅途
心在旅途 2021-02-15 00:33

I\'m working on stress testing our application in Apache JMeter.

I thought of calling register user method which will add users in the database. But if the email already

3条回答
  •  隐瞒了意图╮
    2021-02-15 00:58

    Take a look at JMeter Functions like:

    • __Random() - which generates a random number in the given range
    • __RandomString() - which generates a random string from the given input
    • __threadNum() - which returns the current thread number
    • __UUID() - which returns an unique GUID structure
    • __time() - which returns current time stamp in different formats
    • any combination of above

    JMeter functions can be used anywhere in the test so you can put them directly into your request body.

    Some more recommendations:

    • Don't use JMeter GUI for running the load test, GUI mode is designed for tests development and debugging only, the tests themselves need to be run in command-line non-GUI mode
    • Remove all the listeners from the test plan while running your load test as JMeter listeners are very resource intensive and create unnecessary overhead.

提交回复
热议问题