Come let us explore together…

Posts tagged ‘Log items’

Walking through TestComplete logs – Part 2


Hi All, 

Let me continue with my next post in “Walking through TestComplete logs” 

Previous : http://automate101.blogspot.com/2010/06/walking-through-testcomplete-logs.html 

Q2:How was the log useful?
The answer can be found throughout this series of post 🙂 

TestComplete has log panels which can be customized (Added/Delete/Align). The log panels are very informative when you want to investigate the execution. 

The panels in Log explorer are

  • LogItems (Has TestComplete items like Project Suite,Project,Test Items…) 
  • Information (Has time and file information for the current log)
  • Log (Has detailed information about the selected item from LogItems)
  • Remarks (additional information for the selected item in log)
  • Also has – Call Stack, Messages and Extended Messages – I am yet to explore/use this features
Note : When you double-click the a log, it will take you to the code which generates it or to its sub item if clicked on a parent log item.
 Q4:What should be and shouldn’t be in the Log?

According the my understanding a log should convey all the information a user needs. Yes either by default or option to add details in to it. 

By default TestComplete reports an Event, Error, Success, Message, Warning and Picture

In addition to it we can add our own logs using specific functions supplied by “Log” object. 

  

I cannot exactly classify the list of items should and shouldn’t present in the log! It is purely based on the business requirement. 

But importantly TestComplete allows to add our logs in to its TestLog during the script execution and even we can block ( Using functions – Log.LockEvents & Log.UnlockEvents ) the default logs. 

If a test fails, the steps which led to failure must be available and also the event with complete information is that led to failure need to be there in the logs.

Also the log should post respective error/warning messages when the object required is changed/not available/disabled/out of window boundary etc., 

Q5: Is the generated Log can be saved for future reference? If so how?
TestComplete allow us to save/export log both at test run time and completion time. 

During Run Time:
We can save the logs generated at run time (Upto that time) in to (.XML),(.HTML),(.MHTML) formats. 

After run time:
The logs in TestComplete can be exported for reference as (.mhtml), unpacked storage etc. 

Also the results can be viewed in IE (only) from the TestComplete Logs. (Since FireFox and Chrome doesn’t support .mhtml files) 

Other than exporting the logs we can,
  • Create an issue based on failure (Issue tracking must be enabled) 
  • Send the results through email (As .mhtml attachment Using BuiltIn.SendMail method)
Will meet in the next post…
Hope there is 101 ways to Automate…
Thanks and Regards,
Giri Prasad

Walking through TestComplete logs


Hi All,

In this post I talk about my helper named “LOG” (a.k.a. Test Log). A automation script developer knows how crucial is the information in test log is important in resolving a failing script (that’s why called as helper).

TestComplete has an excellent and compact way of reporting the logs resulted from execution of test cases. Reporting functionality of TestComplete is taken care by the object called “Log”. Similar to its name, it is very easy to handle and customize for our need.

“Log” holds many features which cannot be detailed in one post. So I will taking few versions(post) for this feature.

Before starting let me ask few question? (Don’t run… Answering is optional)

  1. Why we need Test Logs?
  2. How is it useful?
  3. What are the basic features a log should have?
  4. What should be and shouldn’t be in the Log?
  5. Is the generated Log can be saved for future reference? If so how?

I think these questions are general to any automation tool and I try to answer my thoughts related to TestComplete.
(Just try to guess some answers and lets see how close/apart we are?)

Q1 : Need for Test Logs?
The main objective of automation is to avoid human intervention during test case execution or Play back. Once the execution is completed we need to know the result. Only based on the execution logs we can determine the success of execution(Sometimes even the whole Automation…).
Just imagine how a developer automate the cases, tester analyze the execution, manager knows QA status and finally how the automation tool will be popularized?

There may be difference in log produced among various tools but is there any tool which doesn’t give any execution logs? (Curios to know!).

I will touch the above questions while going through the log functionality…

Hope there is 101 ways to Automate…

Thanks and Regards,
Giri Prasad