I am testing a set of rules defined in database using CucumberJS and Protrator. I am doing a database call to fetch the set of rules (~ 1000). When I run the scenario 1000 times, it takes whole lot of time and timesout almost after 2/3 loops.
Is there a way to set "setDefaultTimeout" in my code for every loop, so that timeout keeps increasing by that much time? Is there a better way to implement this? Using Examples in CucumberJS and feeding the Examples table or data table with sql queried data table?
Thanks for your help.
You can set a step specific timeout in the steps implementation that will overwrite any default timeouts.
https://github.com/cucumber/cucumber-js#timeouts
this.When(/^I do something that takes ages$, {timeout : 30 * 1000}, function (url, next) {
// Make db call and process results
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With