DEV Community

Discussion on: How do you do random?

Collapse
theqadiva profile image
Theqadiva

I'm a tester and I use random in my automation. In groovy, I use:


import org.apache.commons.lang.RandomStringUtils as RandomStringUtils
WebUI.setText(findTestObject('someWhereToPutNumbers'),RandomStringUtils.randomNumeric(4))