Forum Discussion
How about below which works any time:
"whatevs_submissionid" : "${= System.currentTimeMillis()}"
- richie6 years agoCommunity Hero
Hey nmrao
its not just that I need it to work anytime - the problematic bit is the fact the value has to be a 13 digit numeric text value - see required value format below
"whatevs_submissionid" : "1234567890123"
Its got to be in the above format to get passed the validation.
This has actually crossed my mind before when I was looking at inline scripting - but I didn't actually need it then so i didnt do any research.
I did have the idea of trying to use the Datasource's object's DataGenerator option - wasn't sure whether it would work - but I had a quick play around with it - but the max number of digits is 10 - I can't go beyond that - so I can't try that option (admittedly I hadn't thought out completely how I was going to use this - but I was hoping inspiration would strike!)
If it can't be done via inline scripting and I can't use the DataGenerator Datasource option - - I'm wondering if I could setup a Excel Datasource (say a 10000 row spreadsheet - incrementing a 13 digit value by +1 for each row - this would be a 10second job).
This would generate the values I need - but I'd need the test to pick up a value from the spreadsheet for each of the tests and for each execution, mark up the value as 'used' and then for the next execution pick up the next unused value from the spreadsheet as a submissionid - but thats going to take more groovy than I got - so I was hoping there's an inline option I cant find!
Essentially if I hard code this defraexp_submissionid I can't add the ReadyAPI! tests into our pipeline - cos it would require someone changing the values on a daily basis! :(
Struggling......
Cheers!
richie
Related Content
Recent Discussions
- 5 days ago
- 9 days ago