We use parameterized TestFixtures (https://www.nunit.org/index.php?p=testFixture&r=2.5) in our unit tests and I think support for these in Coderush could be better.
- When viewing tests in the TestRunner window, all TestFixture instances are listed without reference to their parameters, so when you have a large number it is very difficult to tell which one is which, ie: some may have failed and some succeeded.
So if you have test:
C#[TestFixture("A")]
[TestFixture("B")]
[TestFixture("C")]
public class MyTests
{
...
public void Test1() {}
}
What you see in the test runner window is:
MyTests
Test1
Test1
Test1
Classic Coderush used to display the parameters against each fixture instance, which would be very useful here.
- It is not possible to run a single test fixture instance. Our tests in this case are actually integration tests which take a long time to run. It is very useful to be able to run a specific one only.
In the code editor, it is only possible to click the run icon which appears against the first fixture instance, and it runs all of them
In the Test Runner window, it is possible to right click a test fixture instance and select Run, but it still runs all of them
Ideally the Run icon would appear against each test fixture, and in both cases would run only the selected test fixture.
Thanks
Hi Wade,
Thank you for your suggestions and their detailed descriptions.
We agree that displaying parameterized test fixtures in CodeRush Classic is more useful than in CodeRush for Roslyn. We will add separate test fixture instances. Please note that CodeRush Classic separates test fixtures by instances only after running tests for the first time. CodeRush for Roslyn will keep this limitation as well.
As for the second point, we have some tasks to improve separate running both for parameterized tests and parameterized test fixtures in our backlog and have plans to implement them in one of future releases. We will notify you on our progress in these tasks in the context of this ticket.
Great, thanks
You are welcome.
Hi Wade,
We have good news for you. In the 18.1.7 CodeRush, we have added the capability to run tests and test fixtures with certain parameters from the editor icon menu. To learn more about this and other new CodeRush features, please refer to our What's New. This version is already available in Visual Studio's Marketplace and Download Manager. We suggest you install it and look forward to your feedback.