Ask a Question

Can TC show seperate logs for PASS and FAIL result in Project Logs

ritesh_chauhan
Contributor

Can TC show seperate logs for PASS and FAIL result in Project Logs

Can TestComplete show seperate logs for PASS and FAIL result in Project Logs (Summary>>Project Test Item Results)?

We are able to see Sucess and Error but we want to keep error (for System issue/crashs etc.) and fail (for requirement failure) results seperately.

 

Please provide some inputs.

8 REPLIES 8
Marsha_R
Community Hero

I think you can see from the graph you attached that TestComplete consideres an error to be the same thing as a failure.  

 

Is there something in your tests that gives a different result between a software issue and a hardware issue?


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame

Actual what we need is that we should be able to distinguish between the two types of failures in the output graph:

1. Failure due to any random issue (where requirement execution was interupted by some system issue).

2. Requirement failure (application under test did not work as per requirement). 

The way I do it is by customizing log messages:

 

1) For requirement fail condition: I log messages to the project log as below

 

Log.Error("REQ:" & log_message) where log_message is a message string that I want to show e.g. "Email address not verified"

 

2) For requirement pass condition: I log messages to the project log as below

 

Log.Checkpoint("REQ:" & log_message) where log_message is a message string that I want to show e.g. "Login success message displayed"

 

Then, we can filter the log as shown to display only the requirement failure and success messages.

TestComplete_Logging.png

 

Since we are adding the search condition ('REQ'), any other non requirement related issues will not show.

That works for specific tests, but for something like "Object not found", I don't think there's a way to have TestComplete sort out why the failure happened.  It could be either of those reasons.


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
djadhav
Regular Contributor

If, as the original post mentions, the goal is to separately 'see' requirement failures and other failures, the solution I proposed works. An 'Object not found' error can lead upto a requirement failure message only if I explicitly post that message, else it gets filtered out in my log.

Obviously for debugging purposes, you will have to remove the 'REQ' search condition to see what other errors occured. Customization of the log is neccessary since there is no way for TC to tell when a requirement fails.

Which is exactly my point.  TestComplete can't know.  🙂


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
Ravik
Super Contributor

TC should have such machanism.

Ravik
Super Contributor

I think we may achive this kind of result by implementing "Event" (On Error, On Stop).

 

In On Error/On Stop Event we will specifying system errors like - File NOT,Object NOT found,Array Index out of bounds. If any error occured then log those as a system failur error with a specific prefix.  

cancel
Showing results for 
Search instead for 
Did you mean: