Core: add random generators to Gatling EL
See original GitHub issueWe could consider adding some random generator functions to Gatling Expression Language, such as:
- random numbers (int, long), possibly with a range
- random UUUI
- random alphanum Strings with a length
Note: as this is a feature, it has to go in a minor version, which we release ~3 months.
Implementation would be similar to what we do with currentTimeMillis
.
Performance is a must, so I recommend using ThreadLocalRandom
.
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:20 (20 by maintainers)
Top Results From Across the Web
Advanced Tutorial
First we import ThreadLocalRandom , to generate random values. We do a check on a condition that's been customized with a lambda. It...
Read more >How to add random value in Json Body in Gatling?
First of all you want to generate random number each time, thus OrderRef has to be a method, like: def orderRef() = Random.nextInt(Integer....
Read more >gatling-picatinny
This module contains vast number of random feeders. They could be used as regular feeders and realize common needs, i.e. random phone number...
Read more >Performance testing with Gatling – advanced usage
Post summary: Code samples and explanation how to do advanced performance testing with Gatling, such as proper scenarios structure, checks, ...
Read more >Generate pseudo-random numbers
The functions supplied by this module are actually bound methods of a hidden instance of the random.Random class. You can instantiate your own...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can check the RFC: https://www.rfc-editor.org/rfc/rfc4122.html
But honestly, I was in a hurry and adapted https://github.com/cowtowncoder/java-uuid-generator/blob/master/src/main/java/com/fasterxml/uuid/impl/UUIDUtil.java#L154-L160. All credits go to @cowtowncoder.
Can we please go with topics one by one? First have a PR for UUID and merge it.