Matt W
Matt W

Reputation: 12423

How to test after VSTS release pipeline runs?

I have a build pipeline and a release pipeline. The solution I'm building contains a web project and a class library project containing selenium tests.

Currently, the web project is copied to the artifact staging location and then published. The release pipeline takes care of publishing the web application to the hosting location.

I would like to run the tests in the class library but without publishing the project build to the hosting location.

This page appears to indicate that the build should produce the output of both the web project and the test project:

https://learn.microsoft.com/en-us/vsts/build-release/test/getting-started-with-continuous-testing?view=vsts

As I don't want to publish the test project, how should I configure a build to provide me with both sets of binaries while hosting only one?

Upvotes: 1

Views: 1062

Answers (2)

starian chen-MSFT
starian chen-MSFT

Reputation: 33698

There are many ways to get test project/assembly, but publish the files to artifact is better and simple.

  • Add additional artifact with Git/GitHub/TFVC … source type (where the test project source in) to release definition, then build the test project and run test
  • Add additional task(s) to download the test project/assembly, such as windows machine copy, FTP download … or you can do it programming (e.g. PowerShell)

Upvotes: 0

Daniel Mann
Daniel Mann

Reputation: 59020

Publish two sets of artifacts with your build: One containing the application, one containing the tests.

You can then deploy the application normally and skip deploying the tests, then run the tests at the point in your pipeline that it makes sense.

Upvotes: 2

Related Questions