How to use log files in your software testing

Posted: June 20, 2018 by Natalya Rahmany

How to use log files in your software testing

A log file is one of the most common tools in daily testing practice, but according to my experience, the software engineer’s knowledge of correct use with log files is very limited.

Usually, the average tester experience is confined to find errors and fatal in logs files, or to find a keyword of some message.

In this post, I’ll try to describe and give some examples of server logging that can help software engineers to configure correct log file and use a log as the main tool in a software testing process.

What is a log file meaning?

log files

A log file definition is a file that contains a list of events, which have been “logged” by a computer.

A log file is a recording of everything that goes in and out of a particular server.

The information is frequently recorded chronologically, and is located in the root directory, or occasionally in a secondary folder, depending on how it is set up with the server.

The point of a log file is to keep track of what is happening with the server.

If something should malfunction within a complex system, there may be no other way of identifying the problem.

Log files are also important to keeping track of applications that have little to no human interaction, such as server applications.

Most log files are saved in a plain text format, which minimizes their file size and allows them to be viewed in a basic text editor.

Most log files have a “.log” file extension, but many use the standard “.txt” extension or another proprietary extension instead.

Before you start to work with the log file you can configure the logging mechanism.

Join the Productive Hut newsletter

Subscribe to get our latest posts and tips!

I will never give away, trade or sell your email address. You can unsubscribe at any time!

There are some types of messages in log files, those messages called the “log level“.

The log levels are All, Info, Debug, Error, Warn, and None.

In server logging. XML file, you can configure the level for each part of the system that you are testing.

The setting log levels described below:

–          ALL –Logs all message in a system

–          Info– Logs info message. Info messages indicate general information to the developer or tester. If you select Info logging level it will include both Info and Error messages in your logging file

–          Debug-Logs debug message. Select the Debug logging level to include Debug, Info, and Warning, Error, Fatal messages.

–          Error– Logs error messages. The Error message is printing in a log file when there is an error in one of the system capacity; also, Error messages indicate when a critical service doesn’t go up or available. Select the Error level to include Error and Fatal messages.

–          Warn-Logs warning messages. Warning messages indicate that Flex encountered a problem with the application, but the application does not stop running. Select the Warn logging level to include Warn, Error, and Fatal messages.

–          None-No messages are logged.

As a default, you can configure a log file to ALL or Debug level, but sometimes this configuration could be problematic because in those levels the system is printing all messages are transferring in system process and this could be the reason for a system loading and sometimes for performance degradation.

The advantages of seeing all messages are a better understanding of the system process and the ability to build test cases in your software test description.

In some cases, you typically can set the logging level to Warn to capture both warnings and error messages.

If you prefer to ignore warning messages, set the level to Error to display only error messages.

If you have a problem finding any message during your testing process, pay attention that you configured the log file to the correct level for your testing.

Each time the server application starts, a new log file is created, and the server will continue to write messages to that log until it reaches the maximum log size.

Once the log file exceeds the maximum size, it is retired and a new log file is created.

The log files provide the information to identify what the errors are, and through the information in the log, infer what to investigate to solve the problem.

Join the Productive Hut newsletter

Subscribe to get our latest posts and tips!

I will never give away, trade or sell your email address. You can unsubscribe at any time!

5 Comments

  • Fae Boxer December 15, 2019 at 3:17 pm

    Woah! I’m really enjoying the template/theme of this site. It’s simple, yet effective. A lot of times it’s tough to get that “perfect balance” between usability and appearance. I must say you’ve done a amazing job with this. Additionally, the blog loads super fast for me on Firefox. Exceptional Blog!|

    Reply
  • schilderwerken October 14, 2020 at 3:33 am

    I would like to thnkx for the efforts you have put in writing this site. I am hoping the same high-grade web site post from you in the upcoming also. In fact your creative writing abilities has inspired me to get my own website now. Actually the blogging is spreading its wings fast. Your write up is a great example of it.

    Reply
    • Natalya Rahmany October 14, 2020 at 6:09 am

      Hi,

      I’m glad you liked the blog.

      You are welcome to Productive Hut all the time!

      Reply
  • Lenard Elter December 28, 2020 at 12:23 pm

    First off I want to say excellent blog! I had a quick question in which I’d like to ask if you don’t mind. I was interested to know how you center yourself and clear your mind before writing. I’ve had a hard time clearing my mind in getting my ideas out. I truly do take pleasure in writing but it just seems like the first 10 to 15 minutes are wasted simply just trying to figure out how to begin. Any recommendations or hints? Kudos!|

    Reply
    • Natalya Rahmany January 2, 2021 at 8:45 am

      Hi Lenard,

      Each idea for the post I write down in the notebook, with time the ideas are pill up. I love work in the early morning before all family is wake up and the workday is beginning. These morning hours I feel more concentrate and much easy for me to focus on a post writing. I hope my answer is helping you. Regards, Natalya

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

I accept that my given data and my IP address is sent to a server in the USA only for the purpose of spam prevention through the Akismet program.More information on Akismet and GDPR.

%d bloggers like this: