Forum Discussion

MulticomTest's avatar
MulticomTest
New Contributor
13 years ago

Assertions in DataSource Loop not updating.

Hello All,

I'm having a problem where my assert step in a DataSource loop appears not to be updating correctly with each loop. I am running a suite of about 50 tests from a DataSource file. The assert step itself behaves correctly in the first loop, but after that it doesn't update based on further loops of data. Basically, if the first Assert passes, all 50 do, if it fails, all 50 do. Is there a means to make the Assert step run with each iteration of the loop?

I would be appreciative of any help,
Emanuele

p.s. if you require further information, please ask

----------------------------------------------------------------------------------

Im having the issue using SoapUI Pro 4.5.1 (licensed) where I have the following setup;

DataSource (xls file)
PropertyTransfer1 (DataSource to HTTPRequest1)
HTTPRequest1
Assert (ResponseAsXML of HTTPRequest1)
GroovyConditionalGoTo
PropertyTransfer2 (HTTPRequest1 ResponseAsXML to HTTPRequest2)
HTTPRequest2
DataSink
DataSourceLoop (Loops to DataSource)

----------------------------------------------------------------------------------

The "GroovyConditionalGoTo" does the following;

import com.eviware.soapui.model.testsuite.Assertable

def lastResult = testRunner.testCase.testSteps["Assert"]
def lastResultName = lastResult.getTestStep().getLabel().toString()
def lastResultStatus = lastResult.getAssertionEntryAt(0).getStatus().toString()

log.info 'Test Step [' + lastResultName + '] status: ' + lastResultStatus

if( lastResultStatus.contains('FAILED') )
{

testRunner.gotoStepByName("DataSink")
log.info 'Goto step Output'
}
else
{
log.info 'Continue to next step'
log.info lastResultName
log.info lastResultStatus
}

----------------------------------------------------------------------------------