How to use "Parasoft Search" on SOAPClient request?

PBelandPBeland Posts: 14
edited August 2017 in SOAtest

My goal: identify all tests for which a value is specified in the CardNumber parameter.

My first guess was to use Parasoft Search with a regular expression:

  • Containing text = CardNumber\>\d+\< (a regular expression created and tested with my prefered regex editor)
  • Check Regular Expression checkbox
  • Tool type = SOAP Client
  • Field types = Literal XML
  • Result -> Find absolutly nothing :open_mouth:

Second try, search for a value I know is specified in at least one test:

  • Containing text = 4530
  • Tool type = SOAP Client
  • Field types = Literal XML
  • Result -> Find absolutly nothing :confused:

What's wrong with my search?



  • benken_parasoftbenken_parasoft Posts: 773 ✭✭✭

    You have to know which field to be searching in. For example, if your SOAP Client has the value configured in Form Input view then you shouldn't be searching for the value in the Literal XML field. Otherwise, you don't have to constrain your search to a particular field type.

  • PBelandPBeland Posts: 14

    I thought Literal XML was always there in the background...
    That said, do you have an idea how I can search for tests in a way equivalent to "WHERE CardNumber IS NOTNULL"?


  • benken_parasoftbenken_parasoft Posts: 773 ✭✭✭
    edited August 2017

    Yes, Literal XML is always there. If you search Literal XML then you will only find values in the Literal XML field, not values in other fields like Form Input. I'm just re-iterating what I wrote in my previous comment. Again, you have to know which fields to look in.

    There is no general way to do what you are asking. You can search values of fields in pretty much everywhere. However, element names are not always values in a field. They would be in Literal XML but not Form Input, for example.

    It would probably be helpful for you to describe a concrete case, stating exactly how the test is configured and the search you are trying to perform on it that isn't doing what you expect.

    On a side note, you can change the format for saving tst files from compressed XML to just plain XML. This is an option in the preferences under Parasoft > Misc. After changing the file format, any tst files you save or resave after that will be in the new format. You can search plain XML with any text editor or tools like "grep".

  • PBelandPBeland Posts: 14

    Ok... In fact, what I thought was that Form Input was only a "view" of what is contained in the Literal XML. But now after a few tries, what I see is that I must save the test with Literal XML view selected to be able to search for its content. All our tests are created in Form Input view. I'll have to open 10's of files and save them back to xml to rely on the grep style search.

    Thanks for your help.

  • PBelandPBeland Posts: 14

    We have 100's of tests for a service that can receive a "CardNumber". We must change the way CardNumber are passed to the service and what I'm trying to do is identify which tests needs to be modified (test where we pass null to CardNumber don't need to be changed).

  • jakubiakjakubiak Posts: 570 admin

    If you know what value you are searching for, or a regular expression that matches the value, then you can input that into Parasoft Search. You can specify the tool type and field type - in your case SOAP Client and Form Input - and it will limit the search field to only SOAP Client tools that are set to Form Input. However, you cannot specify which Form Input field should be searched - all Form Input fields will be searched and any that match the value or regular expression will be found and reported.

Sign In or Register to comment.