When running a test getting.
FAIL 35 tests executed in 16.806s, 35 passed, 0 failed, 2 dubious, 0 skipped.
What does the 'dubious' imply and how to see which assertion or test case is dubious?
When running a test getting.
FAIL 35 tests executed in 16.806s, 35 passed, 0 failed, 2 dubious, 0 skipped.
What does the 'dubious' imply and how to see which assertion or test case is dubious?
I believe that the dubious tests are those that aren't run because of failed tests.
So if the test case tried to exit after a failed test, but there were still 2 tests that were meant to be run after it, those 2 tests would be considered dubious.
Afaik, there is no way to see which tests are dubious because CasperJS just uses the number of passed/failed tests out of the specified number of tests to get that number.
You shouldn't consider a dubious test as either a pass or as a fail because there is no way to know which way the test would have gone.
Dubious tests occurs when there is mismatch in the number of tests (x
) passed as argument to Casperjs test instance casper.test.begin('sometest',x,function(){...})
and the number of actual tests in the file.
In essence, the number of planned tests (x
) should be equal to the number of executed tests.
I believe that the dubious tests are those that aren't run because of failed tests.
So if the test case tried to exit after a failed test, but there were still 2 tests that were meant to be run after it, those 2 tests would be considered dubious.
Afaik, there is no way to see which tests are dubious because CasperJS just uses the number of passed/failed tests out of the specified number of tests to get that number.
You shouldn't consider a dubious test as either a pass or as a fail because there is no way to know which way the test would have gone.
In your tests, change the 'X' (see below) to the number of assertions you have inside it and then you will see no more debiuous
casper.test.begin('sometest',X,function(){...})
This worked for me.
The answer of @RoshanMJ is correct, however, each time we create new assertions, we have to update X
number.
I just remove the X
parameter in casper.test.begin('sometest',X,function(){...})
and it will work, like this:
casper.test.begin('sometest',function(){...})
© 2022 - 2024 — McMap. All rights reserved.