Hello Stephane,
need one help
I did performance testing with JSON its working properly into gatling but now another requirement to do performance testing for the SOAP XML
my response is below into the SOAP format.
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/”>
soapenv:Body
<ns4:IATA_AirShoppingRS xmlns:ns2=“http://www.iata.org/IATA/2015/00/2018.2/IATA_AirDocIssueRQ” xmlns:ns3=“http://www.iata.org/IATA/2015/00/2018.2/IATA_AirShoppingRQ” xmlns:ns4=“http://www.iata.org/IATA/2015/00/2018.2/IATA_AirShoppingRS” xmlns:ns5=“http://www.iata.org/IATA/2015/00/2018.2/IATA_OfferPriceRQ” xmlns:ns6=“http://www.iata.org/IATA/2015/00/2018.2/IATA_OfferPriceRS” xmlns:ns7=“http://www.iata.org/IATA/2015/00/2018.2/IATA_OrderCancelRQ” xmlns:ns8=“http://www.iata.org/IATA/2015/00/2018.2/IATA_OrderCancelRS” xmlns:ns9=“http://www.iata.org/IATA/2015/00/2018.2/IATA_OrderChangeRQ” xmlns:ns10=“http://www.iata.org/IATA/2015/00/2018.2/IATA_OrderCreateRQ” xmlns:ns11=“http://www.iata.org/IATA/2015/00/2018.2/IATA_OrderReshopRQ” xmlns:ns12=“http://www.iata.org/IATA/2015/00/2018.2/IATA_OrderReshopRS” xmlns:ns13=“http://www.iata.org/IATA/2015/00/2018.2/IATA_OrderRetrieveRQ” xmlns:ns14=“http://www.iata.org/IATA/2015/00/2018.2/IATA_OrderRulesRQ” xmlns:ns15=“http://www.iata.org/IATA/2015/00/2018.2/IATA_OrderRulesRS” xmlns:ns16=“http://www.iata.org/IATA/2015/00/2018.2/IATA_OrderViewRS” xmlns:ns17=“http://www.iata.org/IATA/2015/00/2018.2/IATA_SeatAvailabilityRQ” xmlns:ns18=“http://www.iata.org/IATA/2015/00/2018.2/IATA_SeatAvailabilityRS” xmlns:ns19=“http://www.iata.org/IATA/2015/00/2018.2/IATA_ServiceListRQ” xmlns:ns20=“http://www.iata.org/IATA/2015/00/2018.2/IATA_ServiceListRS” xmlns:ns21=“http://test.com/security/header”>
ns4:Response
ns4:DataLists
ns4:BaggageAllowanceList
ns4:BaggageAllowance
ns4:ApplicableBagTextChecked Bag</ns4:ApplicableBagText>
ns4:ApplicablePartyTextTraveler</ns4:ApplicablePartyText>
ns4:BaggageAllowanceID30KG</ns4:BaggageAllowanceID>
ns4:TypeCodeChecked</ns4:TypeCode>
ns4:WeightAllowance
ns4:MaximumWeightMeasure30</ns4:MaximumWeightMeasure>
</ns4:WeightAllowance>
</ns4:BaggageAllowance>
Now I want to fetch the value of ApplicationBag text then I can easily fetch through postman but how to to fetch the value through galting.
For galting I tried with xpath but its not working.could you please inform me how it will work in gatling,
Postman Code:-
var parseString = require(‘xml2js’).parseString;
var stripNS = require(‘xml2js’).processors.stripPrefix;
responseResult = “”;
parseString(responseBody, { tagNameProcessors: [stripNS] },function(err, result) {
// test = result.Envelope.Body[0].IATA_AirShoppingRS[0].Response[0].DataLists[0].BaggageAllowanceList[0].BaggageAllowance[0].ApplicableBagText[0] ;