In order to assist in migrating unit tests from MSTest V2
to xUnit.net, it can often be helpful to have unit tests from MSTest and xUnit.net side by side.
Tests can then be migrated gradually without breaking the compiler nor the test results in
most cases.
Note: The version numbers in this example may change over time. Please always use the latest versions of
packages that are available.
The xunit package replaces MSTest.TestFramework, and the
xunit.runner.visualstudio package replaces MSTest.TestAdapter.
The xunit.MSTest package provides a backward compatibility layer that makes
porting your tests easier, and will be removed after all your tests have been ported.
Step 2: Apply changes
Apply all suggested changes from compiler warnings. Example:
Some of these text replacements can be automated with the command line tool from
XUnitConverter.
Step 3: Switch to xUnit.net
Change import statements from MSTest to xUnit.net. Example: