Invoke multiple services and consolidate output

yeluriyeluri Posts: 4

I have two steps requirement to be part of single test suite
1) Invoke different operations from several webservices, extract few elements' output from each service
2) Consolidate output of all operations into one source.

I want to know how to implement #2, please share you thoughts. Thanks for help.


  • benken_parasoftbenken_parasoft Posts: 890 ✭✭✭

    For item 2, it might be helpful if you can provide an example of what you are looking to achieve. Then we can suggest the best way of accomplishing that. For example, SOAtest can generate an HTML report that includes the traffic for each test case in addition to the pass/fail information.

  • yeluriyeluri Posts: 4

    Thank you for response. Let me try to explain requirement with example - Webservice1 has operations Op11, Op12 and Op13, Webservice2 has operations Op21, Op22 and Webservice3 has Op31 and Op32. All these operations return XML responses. I have requirement to call Op12, Op21, Op31 and Op32 sequentially, extract first three elements from each operations' response and generate single output file from all operations(3 elements from each operations, totally 12 elements from four operations). Hope it helps, please let me if you have any thoughts. Thanks again.

  • OmarROmarR Posts: 224 admin

    Good morning Yeluri,

    Your inquiry looks quite similar to the post here.

    1) Use REST or Messaging Client to invoke operations and chain an XML databank or transformer to your clients to extract and store the desired response values.

    2) Use a Write File tool to write out the extracted values into a text file.

    Give this a try and let us know how it goes. :)

  • benken_parasoftbenken_parasoft Posts: 890 ✭✭✭
    edited June 2017

    You can generate a file with the WriteFile tool or using a script. However, why are you trying to write a file like this? For example, if your goal is to be able to extract values and then reuse values then you should be parameterizing your tests directly. In other words, I would not recommend using the file system as a way of passing data between test cases.

    A typical functional scenario involves extracting values from responses to data bank columns and then using those to parameterize subsequent requests. If you are building your requests in a Form Input/JSON/XML view then look for the "Parameterized" option next to each field you need to configure. Otherwise, data bank columns can be referenced using ${var_or_column_name} syntax in any Literal or Fixed text fields:

  • yeluriyeluri Posts: 4

    Thank you OmaR for link. I am not quite sure how to use WriteFile tools to extract elements from XML Databank, would you be able to provide instructions. Thank you.

  • yeluriyeluri Posts: 4

    Thank you benken for details. My requirement is not to pass the data between each operation, want to consolidate data received from different operation and generate a report out of it. Please share your thoughts, Thank you.

  • benken_parasoftbenken_parasoft Posts: 890 ✭✭✭
    edited June 2017

    Thank you for explaining your requirement (I no longer have to guess what you mean :) ). For reporting purposes, I generally recommend using our existing reports which can be configured to collect all traffic. Updating each of your traffic generating test to write out its own traffic doesn't scale (imagine having to manually update thousands of tests). It also isn't necessarily safe, like if you were to re-use your functional test as part of a load/performance test. Otherwise, if you only need to do this on a small number of test cases, then using the Write File tool is definitely a simple way to do what you are asking.

Sign In or Register to comment.