Unit testing improvements in Rider 2017.3
In the latest Rider 2017.3 EAP builds, we have been hard at work improving the test runner experience. We’ve added a couple of new actions to re-run failed tests and repeat tests until failure. The Tests menu is now a separate menu entry, featuring all test runner actions. Filters are now visible based on context. Various UI improvements were made, making the test runner tool window nicer to work with.
Several bugs were fixed as well: when a filter is set (e.g. “show only failed tests”), unit test actions now use this filter. Some problems with NUnit on Linux and macOS were resolved as well.
Let’s look at a few of the unit test runner improvements!
New actions: Rerun Failed Tests / Repeat Tests Until Failure
When a test fails, we typically want to be able to quickly run it again after making a code change, to see if it passes. Both the toolbar as well as the Unit Testing quick list (Shift+Alt+U in Visual Studio keyboard scheme) now allow to Rerun Failed Tests (Ctrl+U, F).
Imagine having a test that is green and passes 99.9% of the time, but every now and then fails – a so-called “flaky test”. Instead of having to manually re-run the test over and over again, Rider 2017.3 now comes with a new action Repeat Tests Until Failure which lets us continuously run a given test session until one of the tests fails. This helps in reproducing the “red test” situation locally and checking out the logs.
UI improvements and keyboard shortcuts
A number of improvements were made to the unit tests tool window UI. For example, the filter panel now only displays filters that are applicable. In other words: there will not be a “show only failed tests” filter when all tests succeeded:
We have moved the Tests menu from Tools to its own top-level menu. Context menu entries have been re-ordered and extended: actions for Show source and Copy are now available.
We also made various small UI fixes, such as removing of unnecessary toolbar buttons (e.g. rename test session which is now only available from the context menu), double borders, etc.
The Unit Testing quick list (Shift+Alt+U in Visual Studio keyboard scheme) is now also context-aware and displays different entries when invoked from the editor or from the unit test tool window.
Note that the available actions can be configured from Rider’s settings under Keymap, then Tests | Unit Tests Tool Window Actions.
Several keyboard shortcuts were added to the unit test tool window. When browsing a unit test session, we can now use the Delete key to remove a test from the current session, Shift+Enter will run selected tests and Ctrl+D (Command+D on Mac) will debug selected tests.
Also when browsing a unit test tree, we can just start typing to search for a given unit test. Rider will now search in all nodes, even when they are not expanded.
Give Rider 2017.3 EAP a try! We’d love to hear your thoughts and comments.
Subscribe to Blog updates
Thanks, we've got you!
Another Look into the Future with Rider’s Predictive Debugger
In the 2023.2 release cycle, we’ve introduced the Predictive Debugger in ReSharper, which gives you predictions about code paths and variables beyond the current execution pointer. We’ve written extensively about its advantages compared to alternative debugging strategies like thorough thinking, log…
Visualize Entity Framework Relationships and Additional Query Analysis in ReSharper 2023.3
A lot of teams are using Entity Framework or EF Core to work with their database. As an Object-Relational Mapper (ORM), it bridges objects in code to a relational database model, so that as a developer you don’t have to worry too much about the actual database. We all know: that’s not entirely tr…
Automatically Analyze ASP.NET Core Performance With Dynamic Program Analysis
Slow web pages may make your users or customers abandon your web application, even before they’ve had a proper look at it. You’ve likely also been frustrated working with a web application that is slow to load. The good news is that the latest versions of ReSharper and JetBrains Rider’s Dynamic P…
OSS Power-Ups: MassTransit – Webinar Recording
The recording of our webinar, OSS Power-Ups: MassTransit, with Chris Patterson, is available. This was the thirteenth episode of our OSS Power-Ups series, where we put a spotlight on open-source .NET projects. Subscribe to our community newsletter to receive notifications about future webinars.…