test-results-reporter / parser

Parse test results from JUnit, TestNG, xUnit and many more
https://www.testbeats.com
MIT License
12 stars 9 forks source link

Feature: Mochawesome skipped and pending tests no longer generate a failed result #64

Closed jmuleiro closed 4 months ago

jmuleiro commented 4 months ago

Context

I recently started using this tool to integrate mochawesome reports with Slack. It turns out, in my test cases I have feature flags that cause Cypress tests to be skipped. Mochawesome has two types of skipped tests: skipped and pending. But as it turns out, mocha does not. This caused the parser to interpret tests marked as skipped by Mochawesome as failures, and to list them as such.

I updated the mocha parser so that it deals with this issue if it finds skipped keys in test results/suites.

Changes

Sample file

Here's a sample JSON test result with which you can reproduce the unintended behavior: flipcard-submit.json

ASaiAnudeep commented 4 months ago

hey @jmuleiro ,

jmuleiro commented 4 months ago

@ASaiAnudeep @leelaprasadv done!

ASaiAnudeep commented 4 months ago

@jmuleiro do you mind updating the node versions to latest in build yaml file.

jmuleiro commented 4 months ago

@ASaiAnudeep done, also took the liberty of fixing a small ReferenceError that occurred when the parser type was set to an unsupported parser.

ASaiAnudeep commented 4 months ago

@jmuleiro thanks a lot for your contributions. The new version v0.1.15 has been released.

Please use the latest version of testbeats to see your changes.

npx testbeats@latest publish -c path/to/config.json