azure-devopsplaywright-dotnet

How do I build and build a C#/Playwright test app and the deploy this to azure for inclusion in release pipelines?


So I now have a suite of working smoke tests using VS/C# and Playwright. These are working very well as part of a release pipeline in this format below.

enter image description here

This all works well and these stages take on average a total of 8 minutes to complete. So now we are thinking if we build the test project and then have this built and deployed ready for use on azure then we call it from within the pipeline can we shave minutes off this?

To clarify tihs means are pipeline simply executes a pre-built and pre-deployed app which contains the tests.

The pipeline itself deployed the candidate release to a staging env, then the tests are executed. If this step passes then we deploy to live.

Is that possible? Has anyone done it and if so can anyone give me some pointers, guidance in how to achieve this please. Is Docker the way to go or a function app?

Thanks in advance for any help


Solution

  • According to your two posts, you're aiming to pre-complete the NuGet restore and build tasks for your smoke tests and store the results for later use.

    One approach could be to create a build pipeline that runs the restore and build tasks, publishes the output as an artifact, and then uses a Download Pipeline Artifacts task in the release pipeline to download and test it.

    Another way is to publish the output as the Universal Packages. You can Publish and download Universal Packages with Azure Pipelines. Each package is uniquely identified with a name and a version number, and this may be useful to do some version control.

    By the way, I know a new service named Microsoft Playwright Testing for your reference.