It it possible generate random data for testing?


#1

Hello, in Kantu for chrome is it possible to generate random data for testing? In my scripts the data is all static, for example: register in the field name ‘Ana’ and every time I will execute, be recorded ‘Ana’. Is it possible to generate random data for testing? Thanks


#2

storeEval can do this: https://a9t9.com/kantu/docs/webextensions/selenium-ide/storeeval

As a start, this line generates a random number:

storeEval | Math.floor(Math.random()*11) | myVar

For a more complex example, Kantu includes the DemoStoreEval macro. It has some code that randomly copies an item (cat, dog, fish,…) from a list (array).

It fills the names in the array, calculates how many entries (length) the array has and then randomly selects one item.