VSTS and TFS integration
![tfs1.png 404](https://files.readme.io/d30e448-tfs1.png)
In order to integrate your tests with VSTS/TFS, first you need to have docker installed on the VSTS/TFS agent.
Now, just follow these steps:
- Go to Build page
![tfs2.png 600](https://files.readme.io/e8e8d07-tfs2.png)
2. Create a new build
![tfs3.png 591](https://files.readme.io/c4affba-tfs3.png)
3. Select your repository
![tfs4.png 961](https://files.readme.io/3f92a44-tfs4.png)
- Select empty job
![tfs5.png 961](https://files.readme.io/a3f06a9-tfs5.png)
- Add task
![tfs6.png 429](https://files.readme.io/6175fc6-tfs6.png)
- Add Docker task
![tfs7.png 758](https://files.readme.io/c4e0e7a-tfs7.png)
- Select Action: Run a Docker command
![tfs8.png 759](https://files.readme.io/93a38c4-tfs8.png)
- Set the Command with the appropriate parameters, as described in the CLI page. Here is the basic command template.
run --rm -v $(Build.BinariesDirectory):/opt/testim-runner testim/docker-cli --token <TOKEN> --project <PROJECT-ID> --grid <GRID-NAME> --report-file /opt/testim-runner/testim-sanity-$(Build.BuildId)-report.xml
![tfs9.png 708](https://files.readme.io/76b5b0e-tfs9.png)
Note: For the grid name, read here how to set up your grid.
- In order for VSTS/TFS to store, analyze and show the results, we generate a standard JUnitXMLReporter XML file.
For VSTS/TFS to use the file you need to add a Publish Test Results task
![tfs10.png 753](https://files.readme.io/a99d051-tfs10.png)
- Select Test result format: JUnit
![tfs11.png 659](https://files.readme.io/c8ae6c1-tfs11.png)
- Set the Test results files value, according to the "report-file" parameter in section 8 and set the
![tfs12.png 654](https://files.readme.io/83f530c-tfs12.png)
- Set the Search folder $(Build.BinariesDirectory)
![tfs13.png 654](https://files.readme.io/254a96d-tfs13.png)
- Save the build settings
![tfs14.png 221](https://files.readme.io/5d80b20-tfs14.png)
Updated over 4 years ago
What’s Next