Forum Discussion

lea_chch's avatar
lea_chch
New Contributor
9 years ago
Solved

how to show attribute details for each assertion in the Test Case logging

My test check if a list of attributes are present in the returned result:

 

Product ID: 123

Product Name; Glare Screen

Product Color: black

 

When an assertion fails, the logging doesn't display the details of what we are looking for. It just says the step failed. 

I was expecting to see something like: 

Step 2 failed; expected "Product Name: Glare Screen"; observed "Product Name: Monitor Screen"

 

How do I configure the logging so I can see more details of what we are looking for, and what we actually get?

thanks. 

  • What kind of assertion are you using currently?
    If it needs to be done, I would use script assertion something like below:

    assert expected==actual, "Your customized message"

3 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    What kind of assertion are you using currently?
    If it needs to be done, I would use script assertion something like below:

    assert expected==actual, "Your customized message"
    • lea_chch's avatar
      lea_chch
      New Contributor

      Hi Rao,

      Thank you very much for your reply. 

      Currently my assertions are:

      1) Under a Soap Request, add an assertion by using the green plus button "+"

      2) Under a Test Case, Add Step - Assertion, and we have a table with columns Assertion, Source, Property, and Message

       

      thanks,

      lea

    • lea_chch's avatar
      lea_chch
      New Contributor

      Hi Rao,

      I tried adding a string after assertion, and it does show up in the logging for the test case. 

      thank you very much. 

      lea