Forum Discussion

aovaici's avatar
aovaici
Senior Member
4 years ago

Automating Sending Soap Messages

Hi Guys, so I am using SoapUI as a GUI to send soap messages like the one seen below, I have generated the SOAP messages and replaced the XXXXXX below with the proper message. I copy the message from...
  • richie's avatar
    4 years ago
    Hey aovaici,

    When you say "do it automatically" cos youre unfamiliar with SoapUI.

    You mention youre sourcing the payloads from a .txt file, is that correct?

    Youre testing a SOAP message so id expect a .wsdl file (which is the definition file that describes the SOAP service and payload content). If you ask people at work for the .wsdl file, you can then create the SOAP service within SoapUI which will dynamically generate the payload content for the SOAP requests.

    Each of the payloads defined in the txt files are where all your payloads are defined, right?

    Ok. So

    Step1. id load in the .wsdl, this will create your SOAP service APIs.

    Count the number of soap messages defined in your .txt file and create a single test case.....one for each SOAP message defined in your .txt file.

    Within each testcase, id right click on the testcase object, select insert teststep and select SOAP.
    This then launches a form where you select the relevant SOAP service (you might have multiple operations in your SOAP service but for now to explain this easily as possible im pretending you have only one.)

    Select the relevant SOAP service.

    This will add in a SOAP teststep into your testcase and dynamically populate the payload content based on the
    .wsdl definition.

    At this point i would look at the payload in the .txt file and update the content of the payload in the SOAP teststep with whats defined in the .txt file.

    This is about the easiest way i can think of creating some tests based on what youve said (or at least my interpretation of what youve said). There are alternative approaches (looping or adding multiple SOAP test steps in the same testcase, etc., etc.) but at least the above will at least get the job done, although its not very pretty.

    Hit me back if ive misinterpreted anything or if you need more help or if you need to change your approach.

    Nice one,

    Rich