0

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.

0

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you @Leo - I set up an interactive mode self-hosted agent and this helped me get to the bottom of why the tests were failing! Thanks again!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.