Forum Discussion
- SiKingCommunity Expert
Depending on what exactly you want to do, you could create a custom event to be run before each test case.
- Vallalarasu_PFrequent Contributor
Writing a Script to manage an Excel where the Flag (Yes/No) can decide on execution of the Test cases/Test Steps under Test Suite.
Refer to my youtube video which I created for the same. SOAPUI Framework
- SumitMOccasional Contributor
Hello Vallalarasu_P,
Maybe I am not very clear in my issue. Appologies from my end.
Actually I need to create groovy Test steps in my Test cases dynamically (on the go).
The Test cases I am running now, do not have a perticular function, which is needed to execute. So I need to add
a groovy Test Step to execute some groovy codes. I can manually add the groovy Test Step in each test case and
run my test suite. But, manually adding test step is taking too much of my effort. So i was wondering that if I can
a groovy code in my Startup script, which will in turn add groovy Test steps in all my Test cases. if this scenario is
possible, then can someone please share how to achieve this.
Thanks,
SumitM
- Vallalarasu_PFrequent Contributor
Adding New TestSuite
def suite = context.testCase.testSuite.project.addNewTestSuite("AutomatedTestSuite")Adding New TestCase
def tc = suite.addNewTestCase("automatedTestCase")// get a Test Step
def project = context.testCase.testSuite.projectDefining the Test Step for the Suite,Testcase and TestStep
def testStep = project.testSuites['TestSuiteName'].testCases['TestCaseName'].testSteps['testStepName']
// add it to your new generated testCase
tc.cloneStep(testStep,testStep.name + "_Copy")Hope this helps
Related Content
- 6 years ago
Recent Discussions
- 5 days ago
- 9 days ago