Forum Discussion

mohbubur_rahman's avatar
mohbubur_rahman
Contributor
16 years ago

Form view is not being used as default for requests

My current SoapUI instalation is configured to use the Form view for requests. However this does not seem to be working. I am data driving the request and have created a property transfer for all the fields. I am having to specify which fields I require before running the test in the outline view. if I use the Form view then I am required to enter a value in the fields otherwise empty fields are removed when viewing in outline.

This is fine for the first iteration but for the second iteration it fails, the outline view changes to what was used in the first iteration. Any fields that are not present in the outline view fail on the property transfer for these fields.

How can I get SoapUI to use the form view and get it to use the same initial request at each iteration

6 Replies

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi,

    I'm not exactly sure what you mean here.. could you attach some screenshots that describe the issue?

    regards!

    /Ole
    eviware.com
  • Hi Ole,

    I have attached a document full of screenshots, hope it helps. A propertyTransfer fails for a field that is not present in the outline view of the request, the outline view changes after each iteration, so if in the first iteration you send a request with 10/15 fields, the outline view will display those 10 fields, the propertyTransfer will fail for the additonal 5 fields. If in the second iteration, you send 5/10 fileds, the outline view wll display these 5 fields and the propertyTransfer for any of the other 10 fields will fail.
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi,

    ok.. thanks for your detailed info. I suggest you use property-expansions together with the "Remove Empty" setting for your request instead of using property-transfers;

    1) Disable the property-transfer step (right-click menu)

    2) Use the "getdata-button" in the form editor in each field to select the corresponding property from the DataSource step.. you should see content like ${DataSource#Case} in the different fields. These will be replaced by the corresponding values when the request is sent.

    3) Set the "Remove Empty" option in the bottom left properties list for the request to true; this will remove empty elements from the outgoing request after the property values have been populated.

    Hope this works out for you.. let me know!

    regards,

    /Ole
    eviware.com
  • Hi Ole,

    Thanks for the help it has resolved this issue however I am also capturing the requests and responses and writing these to file. The response is fine, it is what I am expecting but the request does not display the data used.

    The request is using the property expansion method and displays the data in the request like '${DataSource#InstrumentCode}'. When the request is captured and saved to file, the request also shows this property expansion as the value i.e. ${DataSource#InstrumentCode}. This makes it slightly difficult to reconcile with the data file used, although the workaround I used for this is using row id to identify. Could this be changed/configured to show the values in the request or am I capturing the request at the wrong time?

    Thanks

    Moks
  • omatzura's avatar
    omatzura
    Super Contributor
    Hi!

    exactly how are you writing the Request xml to a file? You need to get hold of the WsdlTestRequesStepResult object for the corresponding TestStep which exposes a requestContent property containing the actual xml sent, after all properties have been expanded..

    regards!

    /Ole
    eviware.com
  • Hi,

    I am using the following syntax to catch the request.

    // get the request object
    def request = testRunner.testCase.testSteps["Request_1"].testRequest

    // get the actual messages
    def SOAPrequestContent = request.requestContent

    Regards,

    Moks