I am working on a framework using webdriverIO and mocha. Recently I have installed the Allure reporter to generate HTML reports using jenkins
I am facing a problem with skipped tests though. I have a lot of tests that consist of a header without any code, that still need to be written. In mocha I add "it.skip" to skip these tests. While the tests are skipped, the Allure report only recognizes 1 skipped test per file.
When running the below code, Allure returns 1 passed test, 1 failed test and 1 skipped test
describe('Allure test', function() {
it.skip('1. this is a skipped test without any code', function () {
})
it.skip('2. this is another skipped test without any code', function () {
});
it('3. this is an enabled test that has a successfull assert', function () {
chai.expect("foo", "foo should equal foo").to.contain("foo")
});
it('4. this is an enabled test that has a failed assert', function () {
chai.expect("foo", "foo should equal foo").to.contain("bar")
});
});
I would really like my allure report to show how many tests are skipped, to be able to show how much work is left.
The default mocha logging handles this just fine, it shows this:
Number of specs: 1
1 passing (4.00s)
2 skipped
1 failing
I also use the wdio spec reporter which shows it like this, which is also fine:
1 passing (2s)
2 pending
1 failing
I have tried inplementing a categories.json file to manipulate the Allure categories, but I can't get anything to change. I tried this as a test, but adding it to my allure results folder changed nothing:
[
{
"name": "Ignored tests",
"matchedStatuses": ["skipped", "Skipped", "pending", "Pending", "failed", "Failed", "broken", "Broken", "skip", "Skip", "failing", "Failing", "passes", "Passes"]
}
]
The tools and versions I use are:
`-- [email protected]
`-- [email protected]
`-- [email protected]
Can anyone tell me how I can get Allure to see all skipped tests?