Skip to content

kharaone/MSTest2XUnit

Repository files navigation

MSTest2XUnit

Build status

Download this extension from the VS Gallery or get the CI build.


This extension allows to migrate a test suite written with MSTest to XUnit.net 2. It is based on dotnet/codeformatter with some additional converters. The dotnet converter didn't remove some elements and were letting too much manual refactoring that could have still been automated.

See the changelog for changes and roadmap.

Features

  • Removes TestClass attribute
  • Replace MSTest Asserts calls with XUnit.Asserts calls
  • Replace Ignore attributes with Skipped Fact attributes
  • Replace TestCategory attributes with Trait attributes
  • Replace ExpectedException with Assert.Throws<> wrapped block
  • Remove MSTest reference and add XUnit nuget packages

TestClass attribute

Before launching the command:
Testclass Before
Testinitialize Before
Testcleanup Before
After the command:
Test Setup After

Ignore attributes

Before launching the command:
Ignore Before
After the command:
Ignore After

Assert calls

Before launching the command:
Assert Before
After the command:
Assert After

TestCategory attributes

Before launching the command:
Testcategory Before
After the command:
Testcategory After

ExpectedException attribute

Before launching the command:
Expectedexception Before
After the command:
Expectedexception After

References

Before launching the command:
Using Before
Reference Before
After the command:
Using After
Reference After

For cloning and building this project yourself, make sure to install the Extensibility Tools 2015 extension for Visual Studio which enables some features used by this project.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages