Skip to content

Instantly share code, notes, and snippets.

@safestudent
Last active September 12, 2019 09:30
Show Gist options
  • Save safestudent/bb0d3418c62b3b4075917977dcf32819 to your computer and use it in GitHub Desktop.
Save safestudent/bb0d3418c62b3b4075917977dcf32819 to your computer and use it in GitHub Desktop.
CI Pipeline MAT DotNet
resources:
# The 'repo' section defines the code repository (self means 'this one' i.e. ToolsList)
- repo: self
# The 'queue' section defines the machine on which we'll run our code and what are the tools we'll need to run the tests
queue:
# We'll use a standard machine that Azure provides for free. It comes pre-installed with Visual Studio 2017
name: Hosted Windows 2019 with VS2019
# This just checks that the following software is installed on our 'Hosted VS2017' machine, as we need it to run our tests.
demands:
- msbuild
- visualstudio
- vstest
# This is our pipeline (currently one step with a series of tasks)
steps:
# Resolve our project dependencies with NuGet
- task: NuGetCommand@2
displayName: 'NuGet restore'
# Build our solution
- task: VSBuild@1
displayName: 'Build solution **\*.sln'
# We run our tests here
- task: VSTest@2
displayName: 'Run Acceptance Tests'
inputs:
# 'ToolsList.AcceptanceTests.dll' is the project file after it has been built.
testAssemblyVer2: |
**\ToolsList.AcceptanceTests.dll
!**\*TestAdapter.dll
!**\obj\**
# This is the folder that contains 'ToolsList.AcceptanceTests.dll' (the built project)
searchFolder: '$(System.DefaultWorkingDirectory)\ToolsList.AcceptanceTests\bin\Debug'
# We are running UI tests (i.e. we need ChromeDriver etc).
uiTests: true
# This is our test run title.
testRunTitle: 'Login Tests'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment