Forum Discussion
3 Replies
Sort By
- Nastya_KhovrinaSmartBear Alumni (Retired)
Hi Sachin,
You need to use the cloneStep(com.eviware.soapui.impl.wsdl.teststeps.WsdlTestStep, java.lang.String) method.
Please see a sample script:
def sourceStep = testRunner.testCase.testSuite.project.getTestSuiteByName("Test Suite 1").getTestCaseByName("Test Case 1").getTestStepByName("Test Step 1"); testRunner.testCase.testSuite.project.getTestSuiteByName("Test Suite 2").getTestCaseByName("Test Case 2").cloneStep(sourceStep,"NewTestStepName");
- nmraoChampion Level 3Have you tried any?
- sachin-chanchalOccasional Contributor
I have tried
def workspace = testRunner.testCase.testSuite.project.workspace
project = workspace.getProjectByName('ProjectName');
apiTestSuite = project.getTestSuiteByName(TestSuite1);
apiTestCase = apiTestSuite.getTestCaseByName('TestCase1');
apiTestStep = apiTestCase.getTestStepByName('TestStep1');testRunner.testCase.testSuite.project.getTestSuiteByName("TestSuite2").getTestCaseByName("TestCase2").cloneTesStep(TestStep1,TestStep1)
But, this code is not working
Related Content
- 11 months ago
- 2 years ago
Recent Discussions
- 3 days ago