SoapUI - Continuous Integration with TFS/VNext Builds using TestRunner
Here is a walk through of cookbook to perform continuous integration of SoapUI Tests with VNext builds using TestRunner.
Pre-Requisites:
1. Install Ready API - With license from here
2.Visual Studio Profile
Steps:
Create a SoapUI Project
1.Create a test suite in ReadyAPI tool. Have created a REST based project using the tutorial here.
2. Two test cases have been created, one which passes and another having a failure.
Test Case:1 with valid request and assertion.
Test Case: 2 with valid request and invalid assertion.
3. Run the test using the test runner and capture the command line highlighted which will be used in future. (Test Suite1 is captured here)
4. Save the project as *.xml in your local desktop.
Creating a Build Agent
In the below process, i have created a build agent targeting my local as i have installed my soapui(licensed) in my local machine.
- Download agent from one of the agent queues in your visual studio account.
- Configure your agent as mentioned below
- In the config command, enter your visual studio server details and enter your authentication code.
4. Type the Run command and it will establish the connectivity between your machine and visual studio agent.
Create a Build Definition
- Goto builds in your visual studio account.
- Create a empty build definition
- Add a Command Line Task
- Point the tool to the testrunner.bat location in your local
- Pass the testrunner arguments that you copied when you ran the test runner from SoapUI
6. Build the queue. In the Build Summary the link to the report will be available. You can copy the path and mail it to recipients using powershell scripts here
Common Issues:
1.ReadyApi License is needed to run testrunner from command line.
2.The service account used to run the test in the build agent should be an administrator having access to all path in your system.
3.Command line in Visual Studio should be entered properly.
4. You can customize reports in testrunner. (html/junit reports). For junit reports you need to install ANT from here. And point to C:\ANT. Add this to Path variable in your System Environment variables.
Please comment here if you face any issues !