MSTest

noun

say it: “EM-ESS-test” /ˌɛm ˈɛs tɛst/

Microsoft's testing framework for .NET, which finds, runs and reports C# tests.

What is MSTest?

MSTest — Microsoft's testing framework for .NET. You mark classes and methods with its attributes, check results with Assert, and dotnet test or Visual Studio's Test Explorer finds, runs and reports every test.

[TestClass]
public class CartTests
{
    [TestMethod]
    public void Total_WhenEmpty_IsZero()
    {
        Assert.AreEqual(0m, new Cart().Total);
    }
}

In a sentence

  • “Our tests use MSTest, so every test class is marked [TestClass].”

Level: Apprentice · More Unit Testing terms at this level

Updated