Tests marked may_fail etc. are shown as failed (red cross)
See original GitHub issueI am running test cases with doctest that are marked may_fail
, should_fail
or expected_failures
. The asserts within those tests fail, but the test is considered passed due to the decorator. (There is an equivalent feature in Catch called “tags”)
In the Test UI, such tests are shown/considered as failed (red cross), when they should be considered as successful (green check).
Ideally, this would show some third status indicating that such a decorator was in play (yellow check?), but I don’t know if this is supported upstream.
See for example these doctest tests:
TEST_CASE("expected failures" * doctest::expected_failures(1))
{
REQUIRE(false);
}
TEST_CASE("may fail" * doctest::may_fail())
{
REQUIRE(false);
}
TEST_CASE("should fail" * doctest::should_fail())
{
REQUIRE(false);
}
The output of running such tests in the command line shows the following summary:
[doctest] test cases: 3 | 3 passed | 0 failed | 26 skipped
[doctest] assertions: 3 | 0 passed | 3 failed |
[doctest] Status: SUCCESS!
but in the Test UI I only get red checkmarks:
- Extension Version:
- VS Code Version: 1.60.0
- Catch2 / Google Test / DOCTest Version: doctest 2.4.6
- OS Type and Version: Windows 10
- Using remote-ssh/docker/wsl?: no
- I don’t think that this situtation has been considered so far, so I didn’t think a log would be that useful.
Issue Analytics
- State:
- Created 2 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
[Feature] Better integration with tools (VS Code Test Adapter ...
The "Catch2 and Google Test Explorer" Extension for Visual Studio Code has ... Tests marked may_fail etc. are shown as failed (red cross) ......
Read more >The Competency Exam consists of a Skills Test and a Written ...
RECEIVING TEST RESULTS. The Competency Exam consists of a Skills Test and a Written Test. Exam results will Not be given at the...
Read more >Exam Information and Study Guide | Red Cross
SKILLS TEST RESULTS - The emailed report will show PASS or FAIL ... Department of Public Health and your examination will be scored...
Read more >Frequently Asked Questions | American Red Cross
Frequently asked questions (FAQ's) about the American Red Cross. Find all your answers here!
Read more >Training Services Frequently Asked Questions - Red Cross
Find answers to your questions about health, safety, and preparedness training and certification in the Red Cross Training Services FAQ.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In case of Catch2 they have. Technically it is possible but I guess it’s a bigger investment, would be.
@matepek
Hmmm, subcases are just
{}
blocks afterif()
statements generated from the macros - no return code, and there’s no counting & reporting of failed assertions in subcases, so they don’t have a result.