We have a test pipeline which runs a set of regression tests daily. These are built with C#, Playwright and Reqnroll. First steps link to the test solution download required packages from NuGet and then builds the solution.
We now have a VM which is all set up as an Environment and ready for use but what I cannot figure is how to access the solution once the pipeline is running from the VM, the test YAML I am using is shown below. So what is the best approach here? Any tips or guides please?
variables:
solution: '/RegressionTests.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
system.debug: false
stages:
- stage: Deploy
displayName: Deploy to QA VM
jobs:
- deployment: DeployVM
displayName: Deploying to QA VM
pool:
name: Azure Pipelines
vmImage: 'windows-latest'
demands: msbuild
timeoutInMinutes: 30
environment: QA
strategy:
runOnce:
deploy:
steps:
- script: echo QA VM
- task: NuGetToolInstaller@1
displayName: 'Install NuGetTool'
- task: NuGetCommand@2
displayName: 'NuGet Restore'
inputs:
restoreSolution: '$(solution)'
- task: VSBuild@1
displayName: 'QA Tests Build'
inputs:
solution: '$(solution)'
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'