Forum Discussion

Kev_Martin's avatar
Kev_Martin
Copper Contributor
Jun 21, 2024
Solved

Is it possible to run VsTest in azure pipelines against pre-installed test project

Hi All

I have an azure pipeline that deploys candidate releases to a staging server. When the server update is complete a series of automated tests are then run, this is the current layout.

 

Now the completion speed for all tasks is not bad but as always the question is can we make it faster? So because these are smoke tests they do not change very often which makes me think instead of the Restore and Build steps can we not simply have a ready built solution installed on Azure so then all we have to do is run the final VsTest step?

 

We are using VS and Playwright for the test project

 

I have never done it that way before so my questions are. Can it be done? and how please?

 

Thanks in advance for any help here.

  • One option I can suggest is you devide the build part (restore and build) to a seperate pipline and add a publish artifact step to publish the built test projects as pipeline artifact. then use a second pipline to run tests with downloading the artifacts from the first pipeline. This way if you do not have a change in your test code you do not have to run the build pipline to produce new test artifacts. You can always run with previously built artifacts. Then when there is a change you can run the build pipline first to get the new smoke test artifacts published.

  • chamindac's avatar
    chamindac
    Brass Contributor

    One option I can suggest is you devide the build part (restore and build) to a seperate pipline and add a publish artifact step to publish the built test projects as pipeline artifact. then use a second pipline to run tests with downloading the artifacts from the first pipeline. This way if you do not have a change in your test code you do not have to run the build pipline to produce new test artifacts. You can always run with previously built artifacts. Then when there is a change you can run the build pipline first to get the new smoke test artifacts published.

    • Kev_Martin's avatar
      Kev_Martin
      Copper Contributor
      That sounds like a good way forward, many thanks

Resources