Why write a post about logging?
As an automated tests developer, I often encounter a bit of confusion regarding two terms which might seem similar, but actually are quite different. Automation engineers sometimes mix "tests reporting" and "test application logging" on their implementation of testing framework. I don't blame them though, reporting and logging may sometimes have common elements which are to be reflected externally. On certain points of the tests building blocks, one might wonder- "where should I write this line of information? To the test's report, or maybe to the log?"
Testing may be a tedious task, but it is an inseparable part of any development routine. Giving a reliable and easy-to-read status picture of the system under test, is an essential requirement from every automated testing framework. Furthermore, decision making based on reliable testing results, should seamlessly blend into the application life-cycle management process. Assuming that the application's information to be reflected, is reliable, you still need to choose the right platform to expose it through. You wouldn't want business information on your implementation logs, and your manager wouldn't know what to do with exception information, presented on the test's report. The relevant information is to be presented to the right eyes.
Definition of Terms
Let's start with automation logging. Just like any regular, non-testing-related application, logging is writing technical information to a designated file (or to multiple files), during program execution. On each stage that the application is executing, there should be a line of log information, to trace problematic events later on, if required. The data on the logs includes information about the implementation of the software being executed. One can write to the logs things like methods calling, classes the flow uses, loops the application goes through, conditional branches, exceptions thrown, etc.
As tests developers, we usually would not place data regarding the business into the test logs, (later on, I'll explain why I chose to write- 'usually'). Information like: "Test xyz passed/failed", won't have any meaning and wouldn't help in any way, when you debug your automation code.
Automation tests reports, on the other hand, should include information of all AUT related tests/checks executed. The data reported is a business oriented info regarding the actual purpose of the execution (which is to test a portion of a product), but in a detailed manner. Most of the report is to include pass/fail statuses, and the dominated colors on it, should be green and red (preferably green of course).
There's no point in placing logical-implementation information, (such as classes used by the execution) on the test report, since it wouldn't say anything to the manager who receives the mail with the execution results. The automated tests are executed to test an application, therefor, test report is to include all data indicating the execution and outcome of the automated tests.
Figure_1. Here's a sketch representing the idea:
As seen on the figure_1 above (sorry for over simplifying :)), the result of executing any application is its goal. It could be any functionality intended, and it might be a solution to a problem. But with automated tests, the result of execution is the test report. The tests are executed in order to give us a reliable status-picture of the application / system under test, and the test report should present us this output. There's no other purpose to executing automated tests- it all comes down to executing test scenarios on the AUT, and reporting the outcome.
Logs on the other hand, are a by product of both test automation application, and any other app. These are aimed for the eyes of developers mainly (and also for the QA & support tears), but never intended to be seen by decision makers, since the logs contain technical data.
Figure_2. Which layer writes to the reports, and which one to the logs:
The opposite view- Do not split the data
There's an approach which recognizes that automated test logs, are only the interest of automation developers (and sometimes of a specific test developer), and therefor there's no need to split related data into two separate destination file types. The supporters of this view claim that as opposed to application logs, which can be analyzed by developers, testers and support engineers, test logs could easily be merged into the reports, since the information types of the tests and the application's actions (loops, conditions, methods, classes etc.) are linked.
When logs and reports are separated, You start troubleshoot a problem with the red label on the report. That would direct you to the implementation logs to track down the problem. One would need to locate the time and context with two data sources. This approach suggests putting the logs with the reports, or merge the reports with the logs so that you won't exhaust yourself going back and forth between the logs and reports, pinpointing a problem.
Continuous Integration solves the dilemma
Extending the limits of automation even further, continuous integration systems support common testing frameworks, and can determine the status of a build based on the success or failure results, reported by these frameworks (JUnit, TestNG etc). Though they were originally and mainly targeted unit tests, these well known and thoroughly debugged testing systems, might as well be leveraged for complete system / end-2-end tests. Executed tests information is thrown to the logs, where all exceptions / successes are seen on the CI tracking solution. If one insists on seeing reports as well, some CI systems offer APIs for any extension plug ins.
This basically solves our problem. With continuous integration, the discussion on test logs or reports, is not relevant. The main advantage of integrating end-to-end tests with CI systems, is that the decision on the build's status is taken out of the hands of humans (automation or not? :)). It is all automatic, hence requires reliable deployment procedure, and much more robust and well written tests. Just write all of your data to the logs, and if a problem occurs, the continuous integration mechanism would raise a failure flag, and point you to the error on the logs.
This basically solves our problem. With continuous integration, the discussion on test logs or reports, is not relevant. The main advantage of integrating end-to-end tests with CI systems, is that the decision on the build's status is taken out of the hands of humans (automation or not? :)). It is all automatic, hence requires reliable deployment procedure, and much more robust and well written tests. Just write all of your data to the logs, and if a problem occurs, the continuous integration mechanism would raise a failure flag, and point you to the error on the logs.
We are specialized in programming in Australia, here are options for plc programming and industrial automation engineer. You can get services about factory automation, scada programming, plc programmer, allen bradley programming, plant pax, PlantPAx, plc programming Melbourne and plc programming Australia.
ReplyDeleteI really appreciate for your efforts you to put in this article, this is very informative. I really enjoyed to read this blog. Keep sharing and give us updates.
ReplyDeleteBoiler systems
This comment has been removed by the author.
ReplyDeleteVery well written article. I really enjoy reading your blog. Thank you for sharing productive content with us. Visit Us: http://www.intactautomation.com
ReplyDeleteThed blog gave idea about automation logging and reporting Ny sincere Thanks for sharing this post Please Continue to share this kind of post
ReplyDeleteSoftware Testing Training in Chennai
This article is so informatic and it really helped me to know more about the Software Testing. This Software Testing article helps the beginners to learn the best training course. So keep updating the content regularly. Software Testing Training in Chennai | Selenium Training in Chennai
ReplyDeleteThis comment has been removed by the author.
ReplyDeletePretty article! I found some useful information in your blog, it was awesome to read, thanks for sharing this great content to my vision, keep sharing..
ReplyDeleteSoftware Testing Training in Bangalore
Software Testing Training in BTM Layout
Software Testing Training in Marathahalli
Very well written article. I really enjoy reading your blog. Thank you for sharing productive content with us. Keep sharing this kind of useful information to our vision.
ReplyDeleteSelenium Training in Chennai
It's Really A Great Post. Looking For Some More Stuff
ReplyDeleteI really enjoyed reading the Post. It was very informative and useful for me.
Best Java Training institute in Bangalore
It's Really A Great Post. Looking For Some More Stuff. Best Salesforce CRM training institute in Bangalore
ReplyDeleteBest Oracle DBA Training Institute in Bangalore
Best Oracle SQL Training institute in Bangalore
Best Java Training in Bangalore
It's Really Great Post, Thank you for posting,Looking For Some More stuff.
ReplyDeleteBest Web Designing Training in Bangalore
Best SAP Training in Bangalore
Its a nice post thank you for posting.
ReplyDeleteBest Oracle Training in Bangalore
ReplyDeleteWonderful post. I am learning so many things from your blog.keep posting.
Abinitio Online Training
Hadoop Online Training
Cognos Online Training
It's Really A Great Post. Looking For Some More Stuff.
ReplyDeleteshriram break free
Post was good and really helpful for more stuff click on the link below.
ReplyDeleteshriram earth
That was really a very good post. Please check our IP Phone website to know more about our IP Phones and its uses.
ReplyDeleteWhat is web and digital design?
ReplyDeleteThe aim of the Master’s course in net and Digital design is that the creation of various skilled profiles with in the web media design space that ar ready to set up, turn out and share through the online communities a replacement generation of content and services in an efficient manner. If you want courses oriented any details to contact us : Web Design Training Courses
Information provided by you is very helpful and informative. Keep On updating such information.
ReplyDeleteprestige elysian
ReplyDeleteYour info is really amazing with impressive content..Excellent blog with informative concept. Really I feel happy to see this useful blog, Thanks for sharing such a nice blog..
If you are looking for any Big data Hadoop Related information please visit our website Big Data Hadoop Training In Bangalore page!
Very informative...
ReplyDeleteinplant training in chennai
inplant training in chennai
inplant training in chennai for it.php
Australia hosting
mexico web hosting
moldova web hosting
albania web hosting
andorra hosting
australia web hosting
denmark web hosting
Ui Path training center in Noida
ReplyDeletedigital marketing training center in noida sector 18
linux training center in noida sector 15
python training in noida sector 62
linux training center in noida sector 63
android training center in noida sector 62
digital marketing training center in noida sector 15
ReplyDeletepython training in noida sector 63
sap sd training in noida
devops training in noida
Email marketing training course in noida sector 62
devops training in center noida
blue prism training center in noida
cloud computing training in noida sector 15
hadoop training center in noida
ReplyDeletedata science training course in noida
data science training center in noida
php training center in noida
php training course in noida
web design training course in noida
web design training center in noida
oracle training center in noida
Email marketing training course in noida sector 62
ReplyDeletedevops training in center noida
blue prism training center in noida
cloud computing training in noida sector 15
hadoop training center in noida
python training in noida sector 15
sap sd training center in noida
linux training center in noida sector 62
Email marketing training course in noida sector 15
salesforce training in noida sector 63
ReplyDeleteopenstack training in noida sector 15
machine learning training in Noida sector 62
salesforce training in noida sector 64
AWS training institute center in Noida sector 63
android training center in noida sector 15
salesforce training in noida sector 18
sap sd training course in noida
sap fico training in noida
hadoop training center in noida
ReplyDeletedata science training course in noida
data science training center in noida
php training center in noida
php training course in noida
web design training course in noida
web design training center in noida
oracle training center in noida
oracle training course in noida
Best-AWS-training-institute-center-in-Noida-sector-62.php
ReplyDeletemachine learning training in Noida sector 63
salesforce training in noida sector 62
Email marketing training course in noida sector 63
AWS training institute center in Noida sector 64
android training center in noida sector 63
digital marketing training center in noida sector 16
Ui Path training center in Noida
It is Very nice and Informative website.Excellent Work
ReplyDeleteSelenium Training in chennai | Selenium Training in annanagar | Selenium Training in omr | Selenium Training in porur | Selenium Training in tambaram | Selenium Training in velachery
Awesome post with lots of data and I have bookmarked this page for my reference. Share more ideas frequently.
ReplyDeleteAWS training in chennai | AWS training in annanagar | AWS training in omr | AWS training in porur | AWS training in tambaram | AWS training in velachery
Really it was an awesome article...very interesting to read..You have provided an nice article....Thanks for sharing..
ReplyDeleteDigital Marketing Training in Chennai
Digital Marketing Course in Chennai
Wow, What a Excellent post. I really found this to much informatics. It is what I was searching for. I would like to suggest you that please keep sharing such type of info. Thanks
ReplyDeleteMedium Justpaste Mystrikingly Articleted
I would like to thank you for the efforts you have made in writing this article about Software Testing Services in Boston. I am hoping the same best work from you in the future as well Software Testing Companies in Chicago. Thank you for sharing such a great blog post Software Testing Companies in Dallas with us this blog is really informative and useful, keep it up..
ReplyDeleteRead more - Software Testing Services in Florida
If you desire to pursue a Bachelor Of Computer Application, the multi-faceted career has masses of blessings for an aspirant. Aspirants with BCA levels can method sectors like IT, transport, software program, finance, buying and selling, training, and so forth. https://www.georgecollege.org/bca-course
ReplyDelete