Auto-generation of .NET unit tests

后端 未结 12 1740
故里飘歌
故里飘歌 2020-12-14 14:59

Is there such a thing as unit test generation? If so...

...does it work well?

...What are the auto generation solutions that are available for .NET?

12条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-14 15:28

    Take a look at Pex. Its a Microsoft Research project. From the website:

    Pex generates Unit Tests from hand-written Parameterized Unit Tests through Automated Exploratory Testing based on Dynamic Symbolic Execution.

    UPDATE for 2019:

    As mentioned in the comments, Pex is now called IntelliTest and is a feature of Visual Studio Enterprise Edition. It supports emitting tests in MSTest, MSTest V2, NUnit, and xUnit format and it is extensible so you can use it with other unit test frameworks.

    But be aware of the following caveats:

    • Supports only C# code that targets the .NET Framework.
    • Does not support x64 configurations.
    • Available in Visual Studio Enterprise Edition only

提交回复
热议问题