Service Virtualization

  • 1.  How to transfer a property from one test case to other test cases in a Project

    Posted Nov 16, 2017 05:57 AM

    Hi Team,

     

    In my Project i need to utilise one property to multiple test cases and suites. Do we have any configuration for that.

     

    Ex : TS1 consists of below TestCases.

    Test Case A -> I m storing one variable value in property as {{PropertyA}}

    Test Case B -> I m utilising the TestCaseA property value in one of my db step {{PropertyA}}

    Test Case C

    Test Case D....

     

    I tried by providing under Configs -> Project -> Key, Value

     

    key -> propertyA; Value -> {{PropertyA}}

     

    Note: {{PropertyA}} is dynamic, the value will change whenever i run Test Case A.

     

    I saved and run this via ITR. But, Test Case B, C, D is failing... Can anyone please help in resolving this issue. 

     

    monika_mehta



  • 2.  Re: How to transfer a property from one test case to other test cases in a Project

    Posted Nov 16, 2017 09:25 AM

    You might research using the Persistent Model Map (PMM).

    See the scripting guide located here: DevTest 8.0 - Scripting Guide - V1.1.pdf  (discussed approx. page 25) 

    The Persistent Model Map uses a <namespace>, <key / value> concept and is stored in the DevTest database.  Values written to the PMM are String. Entries in the map are cleaned out based on an aging criteria (overrideable default is 30 days, I believe). 



  • 3.  Re: How to transfer a property from one test case to other test cases in a Project

    Posted Nov 16, 2017 10:31 AM

    As Joel said you can explore PMM.

    I used shared model map (SMM) for the same and that worked perfectly for me. 

    You can refer an old post :

    How to pass a property, set by one Lisa Test Case to other Lisa Test Cases 

    Also, you can refer the scripting guide for the same (reference provided by Joel).



  • 4.  Re: How to transfer a property from one test case to other test cases in a Project

    Posted Nov 16, 2017 11:23 AM

    Hi Joel and Monica,

                                    How about writing the filter or property value from first test case into a file and reading the value from file from next test case and so on.What are the disadvantages of doing this way compared to using PMM method.

     Thanks,

    Vish



  • 5.  Re: How to transfer a property from one test case to other test cases in a Project
    Best Answer

    Posted Nov 16, 2017 12:53 PM

    LearnNow yes, there are multiple ways to solve this. Writing to the file system is a viable option. 

     

    If running concurrent, simultaneous instances of the test the key to the model map or filename may need to cater for this.

     

    If initiating the test / suite via Jenkins, a different approach may be to allow Jenkins to pass the value. There was a Communities post Pass Jenkins Parameters to DevTest  discussing options a few months back.