Forum Discussion

bk201's avatar
bk201
New Contributor
12 years ago

Manually Change TestCase

Hey,

As i understood this:
testRunner.testCase.getPropertyValue( "value" ).toInteger() 

testRunner.testCase always point to the "active" TestCase.

My Problem: I need access to a Property from an other TestCase with a groovy Scipt.
And i dont want to set the Property in the TestSuite.

Thank you for your Help.

(Please excuse my bad English)

greetings

2 Replies

  • SiKing's avatar
    SiKing
    Community Expert
    Imagine everything like a hierarchy.
    You are correct,
    testRunner.testCase
    is the current test case, so
    testRunner.testCase.testSuite
    would be the current test suite, and
    testRunner.testCase.testSuite.project
    would be the current project. To navigate to a different test case within the current test suite, you could do something like
    testRunner.testCase.testSuite.getTestCaseByName("my TestCase")
    From there you can find that case's properties.
    Try the documentation: http://www.soapui.org/apidocs/index.htm ... Suite.html