Apache JMeter : Add random data in body for request

前端 未结 3 650
旧巷少年郎
旧巷少年郎 2021-02-15 00:39

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 01:17

    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.

提交回复
热议问题