getgauge/gauge-js

Execution of test hangs on exception in hook when 'screenshot_on_failure' is false

PiotrNestor opened this issue · 3 comments

The execution of a spec or scenario hangs forever if:

  • there is an exception thrown in a hook method
  • the default.properties 'screenshot_on_failure = false'


gauge --version
Gauge version: 1.0.5
Commit Hash: 562f036

Plugins
-------
dotnet (0.1.1)
html-report (4.0.8)
js (2.3.5)
screenshot (0.0.1)

How to repeat the problem:

  1. Create an example gauge-js project: gauge init js
  2. Set env/default.properties 'screenshot_on_failure = false'
  3. create test/hooks.js containing
 beforeSpec(function (context) {
    throw "Some error"
  }, {});
  1. Run or Debug the example spec. The execution hangs (loops?)...

@PiotrNestor Thanks for rasing this. I was able to replicate it. We will be pushing a fix very soon.

The fix should be available in nightly >= 27-9-2019

Tested the above issue with the below configuration:

- Set env/default.properties 'screenshot_on_failure = false'
- throwing an exception in hoom method (beforeSpec )

able to run and debug the tests successfully.
Hence this issue has been verified and found fixed.

Tested version:

Gauge version: 1.0.7.nightly-2019-09-16
Commit Hash: 047a847

Plugins
-------
js (2.3.6.nightly-2019-10-01)