getgauge / gauge-js

JavaScript language plugin for Gauge
MIT License
82 stars 39 forks source link

Gauge JS v5.0.0 makes skip all testes when a scenario fails #682

Open TaNei7 opened 2 months ago

TaNei7 commented 2 months ago

It seems that Gauge JS v5.0.0 makes skip all testes when a scenario fails. Making the whole test run stop whenever any scenario fails.

I did a downgrade to js 4.0.0 and all went back to normal.

Can someone take a look?

I can try to help provide some specific logs if someone helps guide me.

Thank you!

chadlwilson commented 2 months ago

Sorry about this. There should be gauge logs in your gauge install locations logs directory that'd be good to take a look at.

Also need to know your gauge version, how you installed, operating system etc, other gauge plugins, whether you are running from CLI or an IDE plugin.

TaNei7 commented 2 months ago

Thanks @chadlwilson :

Gauge version: 1.6.8 Commit Hash: afc97cb

Plugins

html-report (4.3.1) js (4.0.0) (previously 5.0.0) screenshot (0.3.0)

Windows 11 Pro Version 23H2

Maybe this is log is useful:

29-08-2024 16:32:10.507 [js] [ERROR] TypeError: Cannot create property 'stack' on string 'Response status was not 200.'
29-08-2024 16:32:10.507 [js] [ERROR] at file:///C:/Users/[username]/AppData/Roaming/gauge/plugins/js/5.0.0/src/test.js:75:17
29-08-2024 16:32:10.507 [js] [ERROR] at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
29-08-2024 16:32:10.510 [Gauge] [ERROR] 
Failed Step: Create discount at selected initiative
29-08-2024 16:32:10.510 [Gauge] [ERROR] Specification: regression\[filename].spec:78
29-08-2024 16:32:10.510 [Gauge] [ERROR] Error Message: error reading from server: read tcp 127.0.0.1:61681->127.0.0.1:61680: wsarecv: An existing connection was forcibly closed by the remote host.
29-08-2024 16:32:10.510 [Gauge] [ERROR] Stacktrace: 
29-08-2024 16:32:10.510 [Gauge] [ERROR] Error Message: Runner is not Alive
29-08-2024 16:32:10.510 [Gauge] [ERROR] Stacktrace: 
29-08-2024 16:32:10.510 [Gauge] [ERROR] Error Message: Runner is not Alive
29-08-2024 16:32:10.510 [Gauge] [ERROR] Stacktrace: 
29-08-2024 16:32:10.511 [Gauge] [ERROR] Error Message: Runner is not Alive
29-08-2024 16:32:10.511 [Gauge] [ERROR] Stacktrace: 
29-08-2024 16:32:10.511 [Gauge] [ERROR] Error Message: Runner is not Alive
29-08-2024 16:32:10.512 [Gauge] [ERROR] Stacktrace: 
chadlwilson commented 2 months ago
TaNei7 commented 2 months ago

@chadlwilson I was using NodeJS 20.0.0

Actually I think Gauge is currently incompatible with Node 22.0.0, as the whole tool doesn't work with this version. I haven't opened a card for this issue.

I haven't tested with 4.0.1. Currently to downgrade the JS version in case it stops working it is need to fully uninstall gauge and then reinstall again.

chadlwilson commented 2 months ago

Unfortunately, I probably need a way (simple project?) to replicate the issue, as at the moment I am just guessing what might have changed that could affect this and (personally) don't have the time to hack around trying to figure out the combination of things might be causing this.

Testing with 4.0.1 would narrow things down, which is one less thing a contributor would have to figure out.

TaNei7 commented 2 months ago

@chadlwilson thanks for your help. I will try during this week to test with the version 4.0.1

TaNei7 commented 2 months ago

@chadlwilson, I tested now with version 4.0.1 and works normally.

Gauge version: 1.6.8

Plugins

html-report (4.3.1) js (4.0.1) screenshot (0.3.0)

chadlwilson commented 2 months ago

OK, thanks, helps narrow it down to something in https://github.com/getgauge/gauge-js/compare/v4.0.1...v5.0.0

Do you have a simple project to replicate the problem?