cancel
Showing results for 
Search instead for 
Did you mean: 

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

SOLVED
Highlighted
New Contributor

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. 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

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

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"


Regards,
Rao.

View solution in original post

3 REPLIES 3
Community Hero

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

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"


Regards,
Rao.

View solution in original post

New Contributor

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

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

New Contributor

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

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

New Here?
Join us and watch the welcome video:
Watch the new Interview
Top Kudoed Authors