问题
"Create Unit Tests" context menu option is missing in Visual Studio 2017 for .Net core project?
I read some articles saying that "Create Unit Tests" context menu option is removed in VS2017/Core/x64 config. But those were old articles. So, wanted to check if this option is available now? If not, do we have any other alternatives (extensions) to generate the test cases? If so, kindly let me know the steps.
I am working on VS 2017/.NetCore 2.0 project.
Appreciate your help!
回答1:
Perhaps you've found a solution already. For those, still looking for one:
...This issue is expected to be resolved in 15.8 release timeframe so unfortunately, create unit test functionality for .NET Core projects would not be available in the upcoming 15.7 release.
-- quoted from the posted issue (see Sercan's comment).
Until then I use Unit Test Boilerplate Generator (see the picture below).
HTH :)
来源:https://stackoverflow.com/questions/47760377/how-to-generate-unit-test-cases-in-vs-2017-net-core-project