Ask a Question

How to Integrate SOAPUI in VSTS(Visual Studio Team Services)


How to Integrate SOAPUI in VSTS(Visual Studio Team Services)



Can any one please help me in configuring SOAPUI in VSTS, I am getting error while configuring it. I want to know the parameters we need to define/set while integrating it.

Frequent Contributor

Hi pervindrap,


Indeed, more detailing your use case could be helpful. 

Perhaps this posts that could guide you in the right direction concerning using SOAPui in build pipeline of VS:



 Concerning the expiration of your token:

I have below test case which generates a token from an openidprovider. This token remains valid for only 10 minutes. 


The get-set properties_openId & expiration groovy step = 



import groovy.time.TimeCategory TimeZone.setDefault(TimeZone.getTimeZone('CET')) def expires_in = context.expand( '${Token#Response#$[\'expires_in\']}' ) int expires_in_seconds = expires_in as Integer // expires_in_seconds currentDate = new Date() // "currentdate" + currentDate use( TimeCategory )  { expirydate = currentDate + expires_in_seconds.seconds } // "expirydate" + expirydate String expirydate_string = expirydate as String testRunner.testCase.testSuite.project.setPropertyValue ("openid_expirydate", expirydate_string) def id= context.expand( '${DataSource_OpenId#id}' ) def firstname = context.expand( '${DataSource_OpenId#first name}' ) def lastname = context.expand( '${DataSource_OpenId#last name}' ) def rol_claim = context.expand( '${DataSource_OpenId#rol_claim}' ) def description = context.expand( '${DataSource_OpenId#description }' ) def token_response = context.expand( '${Token#Response#$[\'id_token\']}' ) // ("Forproperty "+description +" with id \""+id+"\" we generated following JWT token (valid until "+ expirydate + "): " +token_response) testRunner.testCase.testSuite.project.setPropertyValue ("authorization_"+description , token_response) def authorization = context.expand( '${#Project#authorization_'+description +'}' ) // ("auhtorization in property = " + authorization) return expirydate



To check on the expiration date, so to make sure I always have a valid (not-expired) token I have to do some extra stuff. Otherwise there's a risk the automated tests (build agent level) would still be running after 10 minutes and thus getting an expired token into the authorization header (see previous post on the automation of authorization:


There are different ways to do this. Below script is an eventhandler TestRunListener.beforeRun.

I'd like to do this at test run level , mimicking a setup script at test case level. You could also do it at testStep level, but I feel this might be a bit overkill. Ideally, this should be somehow included in the RequestFilter.filterRequest, (so to focus only on those requests that actually use the open id ) but that script cannot invoke testRunner, which is needed to re-launch the openid-generation test case.


So I will check at every start of a test case whether the token does not expire within 30 seconds. First of all: I am aware there is kind of a hole: if the expiration is reached during a test case that consumes openid tokens (so after 30 seconds that the test started) then some of the steps might fail due to expired tokens. 

But for that checking each and every step whether the time is reached seems too much. In my case the whole set of test cases would take around 15 minutes. So there would be one point where there needs to be a re-generation of tokens. Not all of my testcases use openid (and definitely not all of my test steps) + only a few test cases contain that many steps/loops that it takes more than 30 seconds to complete. So I think I'm safe with a 30 seconds margin.


 PS: I kept my "" comments in there, just for ease of use so you can check what the code is doing in the script log tab.


import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import groovy.time.TimeCategory

def project = testRunner.getTestCase().getTestSuite().getProject()
def testsuite = project.getTestSuiteByName("_Authentication")
def testcase = testsuite.getTestCaseByName("openid")

def tcname = testRunner.getTestCase().getName()
def tsname = testRunner.getTestCase().getTestSuite().getName()
// ("tcname = " +tcname)
if (tsname != "_Authentication")
//I do not need to run the TestRunListener.beforeRun when we actually run the _Authentication test Suite, otherwise we might create an infinite loop!
def expirydate_string = context.expand('${#Project#openid_expirydate}')
// expirydate_string

Date now = new Date()

// ("current date plus 30 seconden : "+ now_plus_30_seconds)
//expiry date is in string format. We need to convert it to a Date
DateFormat date_format = new SimpleDateFormat("EEE MMM d HH:mm:ss z yyyy", Locale.US)
Date expirydate_convertedtodate = date_format.parse(expirydate_string)
// ("expirydate converted: " + expirydate_convertedtodate)
use (TimeCategory)
expiry_min_30_seconds = expirydate_convertedtodate - 30.seconds

if (expiry_min_30_seconds > now)
{ ("Event handler TestRunListener.beforeRun for test case: \"" + tcname + "\". Expiry date openid not yet reached :"+expiry_min_30_seconds+" > " +now)
{ ("!! Openid expired (or will expire in 30 seconds)!! " +expiry_min_30_seconds+" > " +now+ ". We run the Authorization openid  testcase again to get new valid tokens."),false)
else ("No event handler testRunListener.beforeRun run for the openid requests test case! Otherwise we may end up in an infinite loop.")






I am trying to integrate SOAPUI in VSTS and for that I am seeking help.


I am looking for the parameters which we need to pass when we add SOAPUI task in build definition?


I have the project in .xml file and when I am trying to to execute the build then I am getting errors as below:


1. Missing endpoint for request [XYZ]

2. 08:19:32,383 ERROR [AbstractTestRunner] Exception during Test Execution

at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(
at java.util.concurrent.Executors$
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$
can you please help me on this.
New Contributor

Step 1 : Create your SOap UI Projects and save the mas .xml files , the soapui projects should be inclusive of your authentication , data etc.... 

Step 2 : Assuming your pipelines etc are already there . Add Soaui as a task , provide the path to where the the projects is placed . 

Step 3 : Create build and the task picks up the project file and invokes the suite mentioned as arguments 

Showing results for 
Search instead for 
Did you mean: