Parameterizing within collections?

LegacyForumLegacyForum Posts: 1,669 ✭✭
edited December 2016 in SOAtest
is parameterizing a word?
Hey folks - first post here... go easy on me...



I'm in the process of setting up my first set of parameterized tests in SOATest, using the SOAP Client in Form XML mode/view. My question pertains to stuffing data into an element within a collection - primarily, how is it accomplished and persisted for instance 2-n of the collection?

I've got a marker within the collection element to say which item is represents, and that is passed through the system and returned to the output, but do the built-in tools for stuffing parameters (and even reading them back in the response) exist, or am I going to be venturing into the land of scripting in order to pick up the key within the collection element?

TIA,
Houston Haynes
Tagged:

Comments

  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    If the number of elements is dynamic, then SOAtest can handle this in some cases. I've attached an example test suite. In the example, the number of authors in the response is dynamic. In this case it is 2 or 4. The authors element in the request has been parameterized to this dynamic value. If you right click on the element, there should be an option called Replace Content with Data Source Values. This allows you to choose what dynamic data source to use.

    If you want to select the marker element within the response, you could use a XML Data Bank like in the example. You could also use a XML Transformer and then add a Diff tool to that to check the output.

    Let me know if this answers your question.
  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    This is a much more complete answer than I was expecting. On the face of it, I expect that the comment:

    If the number of elements is dynamic, then SOAtest can handle this in some cases.

    ...to mean that if the collection element that I want to change will be in a different position with each substitution, which is *not* what I want to do. It seems like your answer is right up my alley. I'll put it to the test tomorrow, or as soon as I get clear of the work I have on my plate. I'll report back as soon as I get "a bite at the apple". Thanks!
Sign In or Register to comment.