0
votes

I am trying to build an NUnit Selenium test suite, that I can run from within Azure DevOps, to perform functional testing on my companies web app.

I've built and testing a demo project locally, which creates a browser instance and authenticates the session with the web app in the OneTimeSetUp - the browser instance is then used to run a demo test. Where I encounter my primary issue is that when I run this test in DevOps, it fails during the OneTimeSetUp, and as such, it fails the test also.

I'm unsure how to resolve this, because as mentioned, locally, the test runs as desired. I'm running the tests against the same web app.

A secondary issue I've encountered with this is that I've tried taking screenshots using the ((ITakesScreenshot)driver).GetScreenshot() method, so that I might be able to see where the test is having trouble, but no screenshots appear in the test results (where I understand they should appear (based off this video))

Without being able to see what the tests are doing in DevOps, I'm at a loss as to how to troubleshoot this issue. Any tips, pointers, or resources on how to achieve this are greatly appreciated.

1

1 Answers

1
votes

Troubleshoot failing NUnit Selenium tests in Azure DevOps

Based on your description, you are creates a browser instance and authenticates the session with the web app in the OneTimeSetUp - the browser instance is then used to run a demo test, it shows you are running UI tests.

So, you should make sure run your self-hosted agent as an interactive mode and a special configuration of the agents is required.

Please check the detailed info from the documents UI testing considerations.