Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

How to extract URL from response of one test and launch that URL in a separate window

LegacyForum
LegacyForum Posts: 1,664 ✭✭
edited December 2016 in SOAtest
Launch URL from response in a browser
I am trying to grab the data from <sURL> returned from one test and launch a browser with the URL data in SOAtest. The goal is to continue the web functional testing separately.

Here's what I have tried so far:
Add Output > SOAP Envelope > XML Data Bank > Add XPath
Add Output > SOAP Envelope > Browse > Arguments (%1) but not sure how to set %1.

Any help is appreciated. Thanks.

- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/&quot; xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
<soapenv:Header />
- <soapenv:Body>
- <p179:prepareSessionResponse xmlns:p179="http://esignature.cmc.com/EES/"&gt;
<sURL>https://demo.net/Member/StartInSession.aspx?t=ab951ee9-4da7</sURL&gt;
</p179:prepareSessionResponse>
</soapenv:Body>
</soapenv:Envelope>

Comments

  • LegacyForum
    LegacyForum Posts: 1,664 ✭✭
    edited December 2016

    Hi Winnie,

    I'd be happy to help you with this question. Based on your description, it looks as though your test case spans the service layer to the web UI layer. This is where SOAtest shines in its ability to test multiple layers within an Application's technology stack. An End To End scenario such as this is easily accomplished in SOAtest as follows:

    1) Attach an XML Databank to the Response SOAP Envelope of the SOAP Client whose Response returns the sURL Element
    2) Add the XPath of the sURL Element in the XML Databank to be used in a subsequent test.
    3) Manually add a Browser Testing Tool to the Test Suite that contains your SOAP Client so it comes after it (e.g. Test 1: SOAP Client, Test 2: Browser Testing Tool)
    4) Under the User Action Tab of the Browser Testing Tool, set the Action to be "Navigate" and parameterize it with the extracted URL from the SOAP Client.
    5) Select the Browser Testing Tool from the Test Case Explorer and click the "Add recorded tests" toolbar button (it's next to the Add test suite button)
    6) Record your Web UI steps
    7) Add any Web UI validations afterwards as appropriate

    I've attached an example TST file and a Screenshot that should help you out.