I've noticed this happening occasionally (Note: I'm running version 1.7), though I've never been able reproduce on demand, or been certain enough to be sure I didn't do something wrong.
My solution was to add the below script as the "TestRunListener.beforeRun" event, this checks all of my test step assertions for common mistakes or issues I've seen, on finding a problem it just logs a warning message. At the very least I'm alerted to an issue immediately while things are fresh in my mind, this and source control help me a lot.
This script could easily be expanded as required.
import com.eviware.soapui.impl.wsdl.teststeps.assertions.basic.*
import com.eviware.soapui.impl.wsdl.teststeps.assertions.http.*
import com.eviware.soapui.impl.wsdl.teststeps.assertions.jdbc.*
import com.eviware.soapui.impl.wsdl.teststeps.assertions.jms.*
import com.eviware.soapui.impl.wsdl.teststeps.assertions.soap.*
import com.eviware.soapui.impl.wsdl.teststeps.assertions.GroupAssertion
import com.eviware.soapui.impl.wsdl.teststeps.assertions.MessageContentAssertion
import com.eviware.soapui.impl.wsdl.teststeps.assertions.ProXPathContainsAssertion
import com.eviware.soapui.impl.wsdl.teststeps.assertions.ProGroovyScriptAssertion
import com.eviware.soapui.impl.wsdl.teststeps.ProJdbcRequestTestStep
def logPrefix = 'TestRunListener.beforeRun:' + testRunner.getTestCase().getName() + ": "
testRunner.getTestCase().getTestSteps().each{testStepName, testStep ->
logPrefix = 'TestRunListener.beforeRun:' + testRunner.getTestCase().getName() + ':' + testStepName + ": "
// Only check enabled test steps.
if(!testStep.isDisabled()){
// Test step specific checks.
if(testStep in ProJdbcRequestTestStep){
if(testStep.getAssertionList().find{ jdbcAssertion -> jdbcAssertion in JdbcStatusAssertion } == null){
log.warn(logPrefix + 'This is a JDBC Test Step, but does not have a JDBC Status assertion.')
}
}
if (testStep in com.eviware.soapui.model.testsuite.Assertable){
testStep.getAssertionList().each{ testAssertion ->
// Generic assertion checks
if(testAssertion.isDisabled()){
log.warn(logPrefix + 'Assertion "' + testAssertion.getName() + '" is disabled.')
}
// Specific assertion type checks
switch (testAssertion) {
case ProXPathContainsAssertion:
case XPathContainsAssertion:
if(!testAssertion.getPath().trim()){
log.warn(logPrefix + 'Assertion "' + testAssertion.getName() + '" XPath Expression is blank.')
}
if(!testAssertion.getExpectedContent().trim()){
log.warn(logPrefix + 'Assertion "' + testAssertion.getName() + '" Expected Result is blank.')
}
if(testAssertion.getName().equals('XPath Match')){
log.warn(logPrefix + 'Assertion "' + testAssertion.getName() + '" still has the default name.')
}
break
case ProGroovyScriptAssertion:
case GroovyScriptAssertion:
if(!testAssertion.getScriptText().trim()){
log.warn(logPrefix + 'Assertion "' + testAssertion.getName() + '" Script is blank.')
}
if(testAssertion.getName().equals('Script Assertion')){
log.warn(logPrefix + 'Assertion "' + testAssertion.getName() + '" still has the default name.')
}
break
}
}
}
}
}