问题
I was trying to follow the documentation for using boilerplate startup project. and in you extracted project the tests directory only has [ProjectName].Tests while the documentation shows that there should be two projects in the test directory the second being [ProjectName].Web.Tests
I am very interested in using the integration tests that appear to be available, however the template (apparently 4.1.0) does not have the Web.Test project. I attempted to download the Web.Tests project from the github template project, but it feels like the Tests project is now different and I'm having to jump through a lot of hoops to get it to work.
If there is a reason why it was removed, I would love to understand why, if not, what is the easiest way to get it into my project?
回答1:
I suppose you are referring to this article: https://aspnetboilerplate.com/Pages/Documents/Articles/Introduction-With-AspNet-Core-And-Entity-Framework-Core-Part-1/index.html
Web.Tests is only in the ASP.NET Core template: https://github.com/aspnetboilerplate/aspnet-core-template/tree/8659b97f960a04eacdd5d148bdb48ef6f352bf97/test/AbpCompanyName.AbpProjectName.Web.Tests
...for this combination mentioned in the article:
- ASP.NET Core 2.x
- .NET Core (Cross Platform)
- Multi Page Web Application
- no Authentication
来源:https://stackoverflow.com/questions/52559572/what-happened-to-web-tests-project-in-startup-project