Forum Discussion

Beice's avatar
Beice
Occasional Contributor
14 years ago

Can we add assert information into SoapUI's log ?

Hi

When we run the case , the step status will be saved as a log file like "Web_TestSuite-Web_TestCase-Get_UserList-0-FAILED.txt"

But I want to know , whether we can add some customize information into this txt log file .

For example , I have a assert fail and I want to add "It is fail due to shop id error !" into the "Web_TestSuite-Web_TestCase-Get_UserList-0-FAILED.txt"

Do we have some built-in method ?

2 Replies

  • Maybe some code in a TestCase TearDown script? Not sure what the code would be though. Hopefull it's as simple as something like:
    return "It is fail due to shop id error !"


    I haven't tried this, just making a suggestion.
  • Hi!

    Good point! Actually this isn't possible for the built in assertions, exception being the Script Assertion which can return any error message it wants when it throws an Exception. So either you use a Script Assertion or validate your response with a separate Groovy Script Step that can do the same (ie throw an exception with a descriptive message).

    hope this helps!

    regards,

    /Ole
    eviware.com