I'm trying to get our Playwright tests to run in our CI/CD pipeline. I'm finding scant documentation on how to do so with regards to our specific situation. Here are the key components:
- Code is .NET Framework 4.7.2 MVC
- Build Server Azure DevOps Server 2019
- IIS 10 is our webserver
- Windows Authentication is used for IIS
- CI/CD pipeline is written in YAML
- Deployment Pipeline is Classic because YAML is not supported in 2019
So, I can point the tests towards our development IIS server and run them locally from Visual Studio 2022 with no problems. However, when I run them in the pipeline, I get a "401 Unauthorized" error. It would seem this is obviously due to my local using my Windows Auth credentials, whereas the Build Server, quite obviously, does not have my credentials.
So my question is: What strategies are there for running Playwright tests in an Azure DevOps Server pipeline against an IIS website that uses Windows Authentication?"
For what it's worth, here are the references I found, but they either had no answers or were closed w/o a solution:
- PlayWright test in Chrome with a different Windows user than the one currently logged in?
- https://github.com/microsoft/playwright/issues/20521
I just haven't seen much documentation or guides that deal with how to make these tests work. Finally, for security reasons, we need to keep Windows Auth enabled and as the only authentication mechanism for our site. It's not really an option to circumvent security. Maybe this isn't possible, but then I'd like it explicitly called out somewhere.
Thanks, Michael
