locked
Webservice Testing using Visual Studio Web Performance and Load Testing RRS feed

  • Question

  • Hi All,

     

    I have been struggling with below requirement, hope you can help.

    I need to test web-service request response in a data driven framework using visual studio web and performance test project. I have been struggling to get proper documentation / samples.  Any  pointers  / samples would be highly appreciated.

    Below is the  Requirement

    Send a  CREATE htpps SOAP request to create a specific data object  and subsequently send a GET https SOAP    request to reterive same data object as response message and verify response against the input criteria which are being set for CREAT request.

    So this is a data driven test framework wherein the CREAT request should take input values from data source ( csv, xml, etc) and verify it aginst the response message from the GET request.

    i.e. pseudo code would be

    step-1 Read input test data from Data source ( csv,xmt,etc)

    step -2 Create soap request for get using the data input data source 

     step-3 Send GET request

    step-4  Verify GET  request RESPONS against input data source.

    I have seen MSDN help for sending the request using datasource option (CSV,XML etc) but the format is not pretty clear..Example is required for the below sample request and response message..

    Posting below the sample request and response message..#

    Request:Get

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v1="http://www.xyz.com/ABC/Searchs/V1">

                            <soapenv:Header>

                            <Security xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">

                            <UsernameToken Id="UsernameToken-101">

                <Username>xyz</Username>

                <Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">xyz</Password>

                            </UsernameToken>

                            </Security>

                </soapenv:Header>

           <soapenv:Body>

                   <v1:createSearchEventRequest>

                       <v1:searchCriteria name="TestFilterCriteria5" pollingSearch="false">

                   <v1:multiValueCriteria criteriaName="OwningCompany">

                      <v1:value>xyzOI-OTS</v1:value>

                   </v1:multiValueCriteria>

                   <v1:multiValueCriteria criteriaName="Grade">

                      <v1:value>C3</v1:value>

                      <v1:value>C4</v1:value>

                   </v1:multiValueCriteria>

                   <v1:multiValueCriteria criteriaName="AssignedOperator">

                      <v1:value>ngj005</v1:value>

                   </v1:multiValueCriteria>

                   <v1:multiValueCriteria criteriaName="Trader">

                      <v1:value>hewlanr</v1:value>

                   </v1:multiValueCriteria>

                   <v1:multiValueCriteria criteriaName="DealNumber">

                      <v1:value>E110031811</v1:value>

                   </v1:multiValueCriteria>

                   <v1:groupedCriteria criteriaName="ZeroOut">

                      <v1:field fieldName="ShowNone" value="true"/>

                      <v1:field fieldName="ShowCandidate" value="true"/>

                      <v1:field fieldName="ShowZeroedOut" value="false"/>

                      <v1:field fieldName="ShowZeroedOutSch" value="true"/>

                   </v1:groupedCriteria>

                   <v1:multiValueCriteria criteriaName="IncludeHouseDeals">

                      <v1:value>NONE</v1:value>

                   </v1:multiValueCriteria>

                   <v1:date criteriaName="ContractStartDate">

                      <v1:fixeddates fieldName="ContractDate" fromDate="2012-08-01" toDate="2012-08-02"/>

                   </v1:date>

                </v1:searchCriteria>

              </v1:createSearchEventRequest>

        </soapenv:Body>

    </soapenv:Envelope>

    Response

    <?xml version="1.0" encoding="UTF-8" ?>

    - <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">

    - <S:Body>

    - <ns3:searchEventResponse xmlns="http://www.xyz.com/ABC/GOIL/CST/Data/Vocabulary/V1" xmlns:ns2="http://www.xyz.com/ABC/GOIL/CSL/Common/Vocabulary/V1" xmlns:ns3="http://www.xyz.com/ABC/GOIL/CST/WS/Searchs/V1" xmlns:ns4="http://www.xyz.com/ABC/GOIL/CST/WS/Vocabulary/V1" xmlns:ns5="http://www.xyz.com/ABC/GOIL/CST/WS/Security/V1" xmlns:ns6="http://www.xyz.com/ABC/GOIL/CST/WS/Codes/V1" xmlns:ns7="http://www.xyz.com/ABC/GOIL/CST/WS/Views/V1" xmlns:ns8="http://www.xyz.com/ABC/GOIL/CST/WS/DPL/V1">

    - <ns4:appMessages>

      <ns4:appMessages severity="INFO">Success</ns4:appMessages>

      </ns4:appMessages>

    - <ns3:event>

    - <ns3:searchCriteria name="TestFilterCriteria6" pollingSearch="false">

    - <ns3:multiValueCriteria criteriaName="OwningCompany">

      <ns3:value>xyzOI-OTS</ns3:value>

      </ns3:multiValueCriteria>

    - <ns3:multiValueCriteria criteriaName="Grade">

      <ns3:value>C3</ns3:value>

      <ns3:value>C4</ns3:value>

      </ns3:multiValueCriteria>

    - <ns3:multiValueCriteria criteriaName="AssignedOperator">

      <ns3:value>ngj005</ns3:value>

      </ns3:multiValueCriteria>

    - <ns3:multiValueCriteria criteriaName="Trader">

      <ns3:value>hewlanr</ns3:value>

      </ns3:multiValueCriteria>

    - <ns3:multiValueCriteria criteriaName="DealNumber">

      <ns3:value>E110031811</ns3:value>

      </ns3:multiValueCriteria>

    - <ns3:groupedCriteria criteriaName="ZeroOut">

      <ns3:field fieldName="ShowNone" value="true" />

      <ns3:field fieldName="ShowCandidate" value="true" />

      <ns3:field fieldName="ShowZeroedOut" value="false" />

      <ns3:field fieldName="ShowZeroedOutSch" value="true" />

      </ns3:groupedCriteria>

    - <ns3:multiValueCriteria criteriaName="IncludeHouseDeals">

      <ns3:value>NONE</ns3:value>

      </ns3:multiValueCriteria>

    - <ns3:date criteriaName="ContractStartDate">

      <ns3:fixeddates fieldName="ContractDate" fromDate="2012-08-01" toDate="2012-08-02" />

      </ns3:date>

      </ns3:searchCriteria>

      </ns3:event>

      </ns3:searchEventResponse>

      </S:Body>

      </S:Envelope>

     

     

    • Moved by Barry Wang Tuesday, February 5, 2013 6:44 AM
    Wednesday, January 23, 2013 9:21 PM

All replies