maarten
13 years agoOccasional Contributor
Script Assertion works manually, fails executing Testcase
I have a script assertion added to an Assertion Teststep that is working when I run it manually but that fails when executing the Testcase.
The TestCase has:
- 21 Test Requests,
- a 45 minute Delay Teststep and
- 21 Assertion Teststeps using data retrieved from the 21 raw requests of the Test Requests executed earlier
My script assertion only has a call to a script I have in the script Library I created.
When I execute the 21 Script Assertions inside the 21 Assertion Teststeps manually, they all pass.
When I execute the TestCase as a whole, all 21 Assertion Teststeps FAIL and the Message column in the Script Assertion Line of the Assertion Teststep states FAILED - null.
Any idea why it works manually but seems fail executed in the TestCase?
This is the content of the function I call:
The TestCase has:
- 21 Test Requests,
- a 45 minute Delay Teststep and
- 21 Assertion Teststeps using data retrieved from the 21 raw requests of the Test Requests executed earlier
My script assertion only has a call to a script I have in the script Library I created.
company.aProject.aSubProject.aFunction(log, context, messageExchange, anID, anotherID, '15');
When I execute the 21 Script Assertions inside the 21 Assertion Teststeps manually, they all pass.
When I execute the TestCase as a whole, all 21 Assertion Teststeps FAIL and the Message column in the Script Assertion Line of the Assertion Teststep states FAILED - null.
Any idea why it works manually but seems fail executed in the TestCase?
This is the content of the function I call:
def static company.aProject.aSubProject.aFunction(log, context, messageExchange, anID, anotherID, interval)
{
def groovyUtils = new com.eviware.soapui.support.GroovyUtilsPro( context )
def requestHolder = groovyUtils.getXmlHolder( messageExchange.requestContent );
def ID = requestHolder.getNodeValue("//*[local-name()='anID']");
def keystore = messageExchange.request.getSslKeystore();
log.info keystore;
log.info ID ;
..
Lots of code that is not relevant to this issue
..
}