Forum Discussion
2 Replies
Sort By
- nehavinsOccasional ContributorRight Click on the Test Step from which you want to clone assertions. You can find an option to do so. Now select the target test case to which you want to add assertions.
- AaronliuFrequent ContributorHi sampath,
maybe you can refer toimport com.eviware.soapui.model.testsuite.Assertable
def project = context.testCase.testSuite.project
def testSuite = project.getTestSuiteAt(1)
def testCase = testSuite.getTestCaseAt(0)
def sourceTestStep = context.expand( ‘${#TestCase#SourceTestStep}’ )
def targetTestStep = context.expand( ‘${#TestCase#TargetTestStep}’ )
def testStepsrc=testCase.getTestStepByName(sourceTestStep)
def testStepTrgt = testCase.getTestStepByName(targetTestStep)
def counter = testStepSrc.getAssertionList().size()
for (count in 0..<counter)
{
testStepTrgt.cloneAssertion(testStepSrc.getAssertionAt(count), testStepSrc.getAssertionAt(count).getName())
}
Regards,
Aaron
Related Content
- 4 years agoivanko
- 3 years agoLennSar
- 12 years agoLiberty_Informa