Service Virtualization

  • 1.  Integrating Sub Process in one flow (one browser)

    Posted Oct 13, 2015 02:40 PM

    Hi all,

     

    I have a testcase imported with Selenium:

     

    - steps towards an authentication service

    - I want to use a sub process to log in, since these log in steps will be done often. Moreover, I would like to use these steps as a subproces to make it easy to change the username&password combinations read from excel rows.

     

    When I run a test where I put the sub proces in between the selenium steps, ITR opens a new instance of a browser for the sub proces, failing the test.

     

    How can I run the log in steps as a subproces, and make it one big uninterupted flow?  selenium steps -> sub proces -> selenium steps (all in one browser)

     

    Kind regards,

     

    Frank



  • 2.  Re: Integrating Sub Process in one flow (one browser)

    Posted Oct 13, 2015 02:54 PM

    Hi Frank,

     

    To share the session between your main test and your subprocess, you need to define two DevTest properties below in the subprocess's Input and Output.

                    selenium.testrun

                    selenium.testrun.params

     

    Depends on the version of DevTest, you might need a patch. Please see the discussion at https://communities.ca.com/message/241803381#241803381 for more details.

     

    Hope this helps.



  • 3.  Re: Integrating Sub Process in one flow (one browser)

    Posted Oct 13, 2015 03:18 PM

    Dear Ching Yi Kung,

     

    My version is 8.4.0, can you explain how to do this?

    you need to define two DevTest properties below in the subprocess's Input and Output.

                    selenium.testrun

                    selenium.testrun.params

     

    I do see these two at EventID (Test Events).

     

    Thank you for your time!



  • 4.  Re: Integrating Sub Process in one flow (one browser)
    Best Answer

    Posted Oct 13, 2015 06:02 PM

    Hi Frank,

     

    You should not need patch for 8.4.0 release.

     

    In the sub process test case, add these two property names in both Subprocess Input Parameters and Subprocess Output Properties, like below.

         1.jpg

    Then in the Execute Subprocecss Step of the main test case, add these two property names in Parameters to Sub Process with the values from DevTest in {{ }} form, and mark both properties in Result Properties, like below.

    3.jpg

    These two properties are created by the first Selenium step.



  • 5.  Re: Integrating Sub Process in one flow (one browser)

    Posted Nov 17, 2015 07:04 AM

    Hi Ching,

     

    With Subprocess, though we can resolve login issue, opening different browsers. But how to close the already open browser, because that instance is still open and we need to close it manually.

     

    Thanks,

    Ankush



  • 6.  Re: Integrating Sub Process in one flow (one browser)

    Posted Nov 17, 2015 12:36 PM

    Hi Ankush,

     

    Which version of DevTest are you using? Depends on the DevTest version, you may need a patch.



  • 7.  Re: Integrating Sub Process in one flow (one browser)

    Posted Nov 18, 2015 04:14 AM

    Hi Ching,

     

    We are using 8.3.0.