Forum Discussion

glouis42's avatar
glouis42
Occasional Contributor
13 years ago

soapUI web service test never fails

soapUI functional web service test:

I have a test suite with a small number of steps, (6), where I want to test the login to a secure URL page.

What I am trying to achieve, is if the login actually fails, I want to fail the suite if possible. If not possible, how can I obtain the error that it fails, etc.

My inquiry is two fold:

1.) How can I fail the suite as a condition of one of the steps in the test suite fail?
2.) I have tried to deliberately "Change" the credentials to force a fail, and it still passes. I checked the project.xml file and changed the creds, tried removing and reloading the test suite and the suite in the gui still shows valid creds. Is there a cache that can be cleared? I also tried updating the distinct step with false creds and the suite still runs to completion.

(this point is only valid on the initial creation of the test suite)
There is one thing I noted and "Follow Redirects" equal to the default of "True", the script never actually works until I turn off the "Follow Redirects" equal to "False", then it succeeds. Once it suceeds, ALL subsequent launches succeed, thus soapUI web service test never fails, this is great if you want a successful run all of the time, but I cannot get my test step to fail when I enter false credentials.

I am new at this soapUI, please advise.

3 Replies

  • HammerTime's avatar
    HammerTime
    Occasional Contributor
    This may be an obvious question, but do you have any assertions set up on the test step in question?

    If not then how would it know to fail? Try adding a simple assertion that checks the content of a positive response.
  • glouis42's avatar
    glouis42
    Occasional Contributor
    I do have an assertion, but I obviously do not have it setup correctly. The error that is returned from the web page is as follows:

    HPDIA0200W Authentication failed. You have used an invalid user name, password or client certificate.

    so;

    The error does not show up in the log file(s).

    I am not sure how to check for that message.

    I may have the wrong config settings on my test step.

    And probably most important: the error is returned as "content" displayed in the web page, it is not showing up in the header passed back.

    Thanks for the reply.
  • glouis42's avatar
    glouis42
    Occasional Contributor
    I was able to recreate the test suite, and by entering false credentials it was able to fail with the assertion.

    The problem is once it fails, I cannot get it to succeed.

    Once it succeeds, I am not able to get it to fail by clearing the credentials and saving it.

    Does the cache cause this static behavior? If so, how can I know I am able to successfully remove parameters? And Re-add them to steps?

    One behavior I noticed is that when you click on the "clear Parameters" button, it doesn't always clear the parameters.

    if anyone has any advice, it would be appreciated.

    Plus, does anyone know if there is a beta release that addresses any of these concerns?

    Thanks.