Forum Discussion

shabar's avatar
shabar
Contributor
11 years ago

[Resolved] Access different test suite property

Hi All,

Is that possible to access different test suite property in s same project from another test suite?
The property is created under Properties step

I tried following code from another test suite in same project but didn't work


def proVal = testRunner.testSuite["TestSuite 1"].testCase["TestCase -Simple Search"].getPropertyValue( "QA_PROP_LOCATION" )

log.info proVal



Error:

groovy.lang.MissingPropertyException: No such property: testSuite for class: com.eviware.soapui.impl.wsdl.panels.support.MockTestRunner error at line: 2


Cheers

3 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Ideally that should then be a project level or global level property. But you should still be able to do what you are trying to do with the following code:
    log.info testRunner.testCase.testSuite.project.getTestSuiteByName("Other TestSuite Name").getPropertyValue( "QA_PROP_LOCATION" )


    Thanks,
    Michael Giller
    SmartBear Software
  • Nice post to hang on. I really loved it the way of the stuff provided in this article. This has given very useful information.