Forum Discussion

BA_Service_Haus's avatar
BA_Service_Haus
Regular Contributor
12 years ago

[Resolved] Validate Request

Hi everyone,

we mainly use soapUI by testrunner.bat.
Now we want to enable a request validation for each testcase.
But enabling "Validate Request" in the preference settings doesn't seem to have any effect.
(I cannot find a corresponding error message in the logs)

Is there simple way to validate the request (e.g. by an event or a script assertion)?

Best regards
Nico
  • BA_Service_Haus's avatar
    BA_Service_Haus
    Regular Contributor
    Hi Manne,

    I want to do a schema compliance - check for the request.
    Out of the box, soapUI Pro only offers me a schema compliance assertion for responses.

    Best regards
    Nico
  • Sorry, I missed that you were talking about *requests*, even though I wrote "requests" myself.

    Validate Request is an editor preference, so unfortunately this will not prevent requests from being sent by testrunner.bat, unfortunately. Isn't it possible for you to validate your requests in the GUI as you add them? They should then be valid when they are submitted by the test runner.

    Regards,
    Manne
  • BA_Service_Haus's avatar
    BA_Service_Haus
    Regular Contributor
    Hi Manne,

    we have a very special strategy, as we are automatically writing the request to the soapUI project-file and executing the testcase, all without using the UI.
    So.. no I cannot validate the testcase before, as it will be generated just before it is executed.

    Is there a simple way, scripting an assertion to check the schema of the request?

    Best regards
    Nico
  • BA_Service_Haus's avatar
    BA_Service_Haus
    Regular Contributor
    Hi Michael,

    thanks a lot.
    That was (almost) exactly what I was looking for.
    I only had to change the code a little bit, to load the wsdl during test execution (not using the cached one).

    Best regards
    Nico