Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space FUNCTDEV and version SOAVIRT_9.10.6_CTP_3.1.2

...

Want to dynamically specify different data sources for the same tool?

You can achieve this with data groups. See See Configuring a Data Group Data Source that Lets You Switch Between Multiple Data Sources for details.

Understanding Data Source Iteration

It is important to understand how the test Execution Options will affect Data Source iteration. For more information on Test Execution settings, see Specifying Execution Options (Configuring Test Suite Properties - Test Flow Logic, Regression OptionsVariables, etc.). The following Execution Options will affect Data Source Iteration:

...

If an XML Data Bank is used to pass values between test cases in a Test Suite, this will automatically put the Test Suite in "Scenario Mode" regardless of whether Individually Runnable is selected. The Data Source iteration will behave as if Individually Runnable is not selected. For more information on using an XML Data Bank see XML Data Bank.

Configuring the SOAP Client and Diff Tools to Use Data Sources

...

  1. If you have not already done so, add the data sources you want to use as described in Adding a Data Source at the Test Suite, Project, or Global Level.
  2. Double-click the desired SOAP Client node in the Test Case Explorer and choose the appropriate data source from the Data Source combo box in the right GUI panel.
    • The Data Source combo box will not display unless a data source was previously added to the test suite. If there is only one data source available, the SOAP Client tool will default to that data source. If there is more than one data source available, the SOAP Client tool will default to the first data source listed in the Tests tab.
  3. Complete the rest of the fields in the Project Configuration panel for the SOAP Client node as explained in SOAP Client.
  4. Select the SOAP Client node and click the Add Test or Output toolbar button. An Add Output wizard displays.
  5. From the Add Output wizard, select Request> SOAP Envelope from the left pane, and select Diff from the right pane and click Finish. A Diff node is added to the SOAP Client Node.
  6. Double-click the Diff node to open the tool configuration panel.
  7. Choose the appropriate data source from the Data Source box. The data source you choose must be the same data source specified for the SOAP Client.
  8. In the Regression control source box, choose Data Source.
  9. In the Data Source Column box, choose the column from the combo box that you would like the Diff tool to compare responses to.
  10. Complete the rest of the Diff tool configuration settings as explained in Diff.

You can now perform a functional test by selecting the SOAP Client node and clicking the Test toolbar button. The results will display in the right GUI panel.

...

Suppose that you have a web service that collects information to construct family trees. The information sent looks like the following:

No Format
<ns1:People xmlns:ns1="http://www.example.org/ParentChildGrandChild">

...


 <ns1:Person>

...


  <ns1:Name>GrandPa</ns1:

...

Name>  
  <ns1:

...

Age>85</ns1:Age>

...


  <ns1:Child>

...


   <ns1:Name>Daddy</ns1:

...

Name>   
   <ns1:Age>55</ns1:Age>

...


   <ns1:Child>

...


    <ns1:Name>FirstSon</ns1:Name>

...


    <ns1:

...

Age>25</ns1:Age>

...


   </ns1:Child>

...


   <ns1:Child>

...


    <ns1:Name>SecondSon</ns1:Name>

...


    <ns1:

...

Age>22</ns1:Age>

...


   </ns1:Child>

...


  </ns1:Child>

...


 </ns1:Person> </ns1:People>

It represents a family tree as follows:

...

  1. Create a new .tst file called ArrayDataSource.tst.
  2. Add an Excel Data Source that points to the Excel spreadsheet created in previous steps. Select FirstGeneration as the sheet.
  3. Create a new Messaging Client.
  4. Configure the Messaging Client as follows:
    • Set Schema URL to http://soatest.parasoft.com/ParentChildGrandChild.xsd
    • Seе RtouterEndpoint to http://ws1.parasoft.com:8080/examples/servlets/Echo
  5. Set up the Form Input as follows:
     People
    • Person
      • Name – Parameterized to: Name
      • Age - Parameterized to: Age
        • Child
        • Name - Parameterized to: SecondGeneration:Name (Name column in SecondGeneration Sheet)
        • Age - Parameterized to: SecondGeneration:Age (Age column in SecondGeneration Sheet)
          • Child
          • Name - Parameterized to: SecondGeneration:ThirdGeneration:Name (Name column in ThirdGeneration Sheet)
          • Age - Parameterized to: SecondGeneration:ThirdGeneration:Age (Age column in ThirdGeneration Sheet)

  6. Run the test.

...