Forum Discussion

BhuvanShanmugam's avatar
BhuvanShanmugam
Contributor
9 years ago

Property transfer into test step of run test case

 

I have a test case (TCBase) that is (planned to be) called in many places.

This contains one operation and couple of property xfer steps.

 

I have a Run Test Case step in a higher level test case which call this TCBase.

I do have a requirement that each call may have to pass in a property into one of the test steps of the TCBase.

From the top level, I could only see the out parameter of the TCBase; none of the internal steps are visible.

 

Is there a way to get data into the TCBase test step?

 

Thanks

Bhuvan.

  • Hi Radford,

     

    The prop xfer doesnt seem to work. so i opened a support case and got it sorted using a groovy script;

    but this is for passing values between RunTestCases.

    However, What I want to achieve is to pass a property from the top level test case into the (sub) - RunTestCase->TestStep.

     

    Here is a example of what I am trying to get - hope this helps with understanding.

     

    Thanks

    Bhuvan.

  • Radford's avatar
    Radford
    Super Contributor

    If I understand you, you want to make a testCase reusable, passing in the appropriate parameters, I do something similar.

     

    For each parameter you need in the "sub" test case create a test case level Custom Property. This custom property can be set by the "calling" test case (set via the RunTestCase test step) and can also be accessed within the "sub" test case. You can also use this method to create return parameters (just remember to mark the relevant custom properties as a return property in the calling RunTestCase test step).

     

    Hope this helps.

    • BhuvanShanmugam's avatar
      BhuvanShanmugam
      Contributor

      Hi Radford,

       

      The prop xfer doesnt seem to work. so i opened a support case and got it sorted using a groovy script;

      but this is for passing values between RunTestCases.

      However, What I want to achieve is to pass a property from the top level test case into the (sub) - RunTestCase->TestStep.

       

      Here is a example of what I am trying to get - hope this helps with understanding.

       

      Thanks

      Bhuvan.

      • JahnaviAkkineni's avatar
        JahnaviAkkineni
        Occasional Contributor

        Hi Bhuvan,

        Were you able to resolve the issue, I am having a similar problem? If you were able to resolve it, can you please post what you did ?