Forum Discussion

Madhav's avatar
Madhav
Occasional Contributor
6 years ago
Solved

Unable to Call Test Step in another test case by using Groovy scripts

project = testRunner.testCase.testSuite.project; tcase = project.testSuites {"TestSuite"}.testCase{"TestCaseName"} hello = tcase.getTestStepByName("Hello"); testStep.run(testRunner,context) cont...
  • JHunt's avatar
    6 years ago

    Hi,

     

    tcase = project.testSuites {"TestSuite"}.testCase{"TestCaseName"}

    These curly brackets should be square brackets:

    tcase = project.testSuites ["TestSuite"].testCase["TestCaseName"]

     

  • Madhav's avatar
    Madhav
    6 years ago

    Error is :- Missing PropertyException:No such property:testStep for class:Script27 error lat ine:4