Running hosted xunit integration tests on Azure DevOps

You can not at the time of writing pass arguments to xunit test runner. Therefor, some “integration” tests I wrote on top of an IClassFixture of my startup class refused to work as my app was unable to fetch the required secrets from the keyvault. I managed to solve it by passing in AzureServicesAuthConnectionString as per this and then running dotnet tests in a shell script on the Azure DevOps pipeline. Granted, the output is not as pretty as with the native test task – at least it works.

Leave a Reply

Your email address will not be published. Required fields are marked *