I followed the tutorials in the docs for azure devops with regards to running Selenium tests as part of the build.
My local tests run fine with the browsers I have webdrivers installed for, but when the VSTest task runs, it doesn't unpack any tests from anything under NUnit attributes.
Now a few things to point out with my project structure:
My current azure devops pipeline config:
Working local tests setup:
Now, I can easily add a new project using the NUnit template which for whatever reason allows the azure build to see these tests, but that causes my project structure to change and it defaults to netcoreapp2.1 instead of 4.6, and then the azure build can't find all sorts of stuff.
Please follow the below steps may it resolve your issue
or
You might need to search the test dll into $(System.DefaultStagingDirectory) folder. sometimes azure agent place the dlls in staging directory instead of defaultworkingdirectory.
When adding a new NUnit project by the visual studio template like so It defaults the framework version to netcoreapp2.1
If I change this to my build framework (net461), although the build states the same "These dlls will be skipped" message, the NUnit3Adapter is somehow now recognized and picks up the NUnit tests:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.