Forum Discussion
https://stackoverflow.com/questions/41700437/creating-a-test-report-from-project-level-tear-down-script
appreciate your reply but, can you take a look my script and help me what i need to change based on this below comment
"not mapped out the testSuites. You will have to map out the test suites the same way you mapped out the test cases."
- 6785 years agoRegular Contributor
Added project Map but still getting error
Here is updated code :
import com.eviware.soapui.model.testsuite.TestStepResult.TestStepStatus
import com.eviware.soapui.model.testsuite.TestRunner.Status
import com.eviware.soapui.impl.wsdl.*
import com.eviware.soapui.impl.wsdl.testcase.*
import com.eviware.soapui.model.testsuite.*def projectMap = [:]
def projectStatusMap = [:]
def testCaseMap = [:]
def testCaseStatusMap = [:]
testSuite.testCaseList.each{def reportMap=[:]
it.testSteps.each{def testCaseStatus =true
try{reportMap << [(it.value.name):(it.value.getAssertionStatus().toString())]
tempStatus = (it.value.getAssertionStatus().toString()=='PASS')?true:false
testCaseStatus = testCaseStatus && tempStatustestSuite.setPropertyValue("Status", testCaseStatus.toString())
}catch (e){
//log.info e
}
}
testCaseStatus = testSuite.getPropertyValue("Status")
def testCaseStatusStr = (testCaseStatus=='true')?'PASS': 'FAIL'testCaseStatusMap << [(it.name):(testCaseStatusStr.toString())]
}
Related Content
Recent Discussions
- 19 hours agoarmygrad