Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cucumber step timing out does not enforce immediate moving on to next step #48

Open
samhatoum opened this issue Jul 21, 2018 · 0 comments
Labels

Comments

@samhatoum
Copy link
Contributor

Issue by PierreCBSI
Wednesday Aug 31, 2016 at 18:36 GMT
Originally opened as xolvio/chimp#458


Expected behaviour

Setting the cucumber step timeout to some low threshold should have steps fail within expected timeframe, and immediately proceed to the next step in the scenario.

Actual behaviour

Setting the cucumber step timeout to some low threshold has the step (apparently) timeout in chimp/console, but codeblock from the timed-out step appear to continue via webdriverio/console output (console.log() showing up from old steps, browser.url() being sent to chromedriver....)

Steps to reproduce the problem
  1. Manually set the cucumber step timeout to some artificially low threshold (set in /usr/local/lib/node_modules/chimp/node_modules/cucumber/lib/cucumber/support_code/step_definition.js, search for "timeout")

  2. launch chimp with multiple steps.

  3. observe that some of the steps appear to timeout as expected while others will display weird behaviors such as step 3 console.log() observed during the execution of step 8, or chromedriver jumping from step 10 browser.url() call to a (timed out) step 4, before going back to step 11...

following modified code should work to expose the issue:

/features/my.feature:


Feature: Verify Bug
 @watch
Scenario Outline: validate bug
    When I navigate to  <Url>
Examples:
| Url | 
| http://www.cbs.com/shows/american-gothic/  | 
| http://www.cbs.com/shows/beauty-and-the-beast/  |  
| http://www.cbs.com/shows/blue_bloods/ |
| http://www.cbs.com/shows/braindead/  |  
| http://www.cbs.com/shows/bull/  |  
| http://www.cbs.com/shows/code-black/  | 
| http://www.cbs.com/shows/criminal_minds/  |
| http://www.cbs.com/shows/criminal-minds-beyond-borders/  | 
| http://www.cbs.com/shows/csi/  |  
| http://www.cbs.com/shows/csi-miami/  |  
| http://www.cbs.com/shows/doubt/  |
| http://www.cbs.com/shows/elementary/  | 
| http://www.cbs.com/shows/extant/  | 
| http://www.cbs.com/shows/flashpoint/  | 
| http://www.cbs.com/shows/the-game/  |
| http://www.cbs.com/shows/ghost-whisperer/  | 
| http://www.cbs.com/shows/the_good_wife/  | 
| http://www.cbs.com/shows/the-guardian/  | 
| http://www.cbs.com/shows/hawaii_five_0/  | 

/features/support/my.js:

module.exports = function() {
this.When(/^I/^I navigate to (.*)$/, function(myURL) {
    var  start = new Date().getTime();  
       console.log("!!**** " + start);
       browser.url(myURL);
       var duration = new Date().getTime() - start;
       console.log(" ~~ " + browser.getTitle() +  " ** " + duration + "*****"); 
       browser.url("About:blank");
});
}
Used version
  • Chimp: 0.39.3 / 0.40.4
  • Node.js: 5.11.1
  • Operation system: Ubuntu 16.04
Console / Log Output

Join our Slack xolv.io/community #chimp channel, where you can find help and help others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant