Open ashahabov opened 2 years ago
Looks like there is no such option. The most appropriate option is just comment DataRow
statement.
However, would be good to have something like this [SkipDataRow("because this edge case is postponed", 2, 2, 3)]
, thus enabling to specify ignore reason.
Hi @adamshakhabov,
I'd like to understand why you would prefer to have a property/different attribute... to skip a DataRow
instead of simply commenting it out? Are you interested in building some analyzer or tracking number of skipped tests?
Hello @Evangelink,
thank you for the reply🙂
"DataRow" is a piece of code. Commenting on code is not allowed in our team. I believe it is not a rare case. And yes, in the test result, I would like to have an opportunity to track the number of test cases that were skipped.
@adamshakhabov it perfectly makes sense and you are not the only team with such rule. I just wanted to confirm the intent so we could think about how to implement it.
My case is that I have tests that take a long time (>2 mins) I would like them to not run by default but I would like to be able to run them sometimes without having to change the code.
@tymtam2 Thanks. I would probably recommend for your case to have different tests and use categories to split tests you want to run.
We have failing test cases we'd like to ignore with messages indicating ticket number for resolution of the issues. We'd like to ignore rather than comment to maintain visibility of them in our test reporting.
Any updates on this issue? We're having temporary problems with an integrationtest where some datarows will fail due to problems within the called api. While we're waiting for a hotfix on the api-side, we would like to keep these datarows "alive" with the Ignore-attribute in order to fix them later. Commenting them out will increase the risk to forget about them even when the hotfix is pushed.
Hi @TobiasGPersson,
This is something we are considering for future but we had to prioritize features based on upvotes and criticity for our customers so sadly this wasn't picked yet.
If we have some room left, I will try to fit it in the stretch goal of 3.3.
Description
I am trying to ignore one test case by adding
Ignore
keyword forDataRow
attribute:but it ignores the whole test:
I also asked this on StackOverflow: How to ignore particular test case in MSTest.
Expected behavior
Only
Sum_Test(2,2,3)
test case should be ignored.Actual behavior
It ignores both test cases.
Environment