Logging in AST

 Thank you all for the feedback on Flaky testing. I received many questions about logging capabilities in AST and thought I would touch on this again, albeit briefly, in the hopes that you all can rid yourself of these flaky tests and get a better understanding of what your test cases are checking.

Building on the previous blog, I assume the following:

  • You are using a regression set,
  • some cases fail and then pass when rerun, and
  • nothing has changed in the environment or the test case.

A little about logging. Logging is the practice of documenting events, messages, or data that can be used to debug, examine, or track the behavior of a system or application. Because it gives developers and system administrators a mechanism to understand what is happening in a software system and to find problems, flaws, or abnormalities, logging is a crucial tool.

These are some crucial logging components:

Log files: The information produced by logging is frequently kept in a file called a log file. Error messages, cautions, application events, performance indicators, and other data can all be found in log files.

Frameworks for logging: Many frameworks include logging libraries or modules to make the process of logging easier and AST is no different. In our AST Core Training, we encourage Testers to use cases, scenarios, methods, or functions to log data at various levels, including info, warning, and error. As you will see later different situations require different amounts of information.

Analysis of log data: After log data has been gathered, it can be examined to spot trends, abnormalities, or patterns. Log analysis can be done manually by looking through log files.

Choosing an appropriate logging level, being to ensure data is logged, to make sure that logging is effective and efficient is critical in Avaloq testing.

Logging in AST is a crucial tool for comprehending the behavior of AST Testing of Core Avaloq Banking. Now let’s look closer at AST logging.

Logging in AST

There are different levels of logging in AST.

  1. Test case,
  2. Step,
  3. Operation, and
  4. Details.

As an AST test case creator, you can decide what information you want to be logged. The first three levels allow it to provide relevant information for the test case, step, or operations.

As a rule of thumb, you can use the logging capabilities for the following purposes:

  • Testcase, use this when you want more details regarding the test case.
  • Step, use this when you wish to receive more details regarding the step being executed.
  • Operation, use this when you want more information about a particular operation being executed.
  • Detail gives information about how an operation is processed. Note: This cannot be customized.

I know that many of you have different needs, so I am keeping it general. I encourage you to play around with these and determine what works best for your organization. Where does it start? It all starts in your AST.Properties. For most of you I assume you have the following default setting: AST.base.log_level=detail

However, the following or logging options are available valid: testcase, step, operation. Thanks for the information, Paul, but how do I use it?

The application log level can be easily changed in a test case. The log level change lets the user set a different application logging level for a particular part of a test case. As I said, it should be used to get more information than what is set in ast.properties.

The example below explains how this can be done with the setting operation.

<setting property=”ast.base.log_level” value=”step”/>

Note: The new log level is valid until a new setting operation is invoked. Setting it back to the default at the end of the test case is very important.

Now let’s look at another example.

<testcaseversion=”1.0″ user=”avaloq” bu=”AAA” name=”description”>

<descn>Description of test case</descn>

<setting property=”ast.base.log_level” value=”operation”/>

<query>

<obj id=”#9″ object-type=”bp” property=”name” select=”v”

descn=”Description of operation“/>

</query>

Note: The new log level is valid until a new setting operation is invoked. Setting it back to the default at the end of the test case is very important.

Log report

The new information will be visible in the log report. Currently, the HTML and the XML do not report this information. To do this you would need to modify the HTML report. Customizing your own HTML report is a topic all to itself. If you are interested, let me know.

I have said, many times AST is very flexible, scalable, and customizable. It mostly depends on what you are trying to achieve in your testing and what you want to see in a report.

Let me know if it helps.

If you have issues with getting the logging levels running or other problems, send us an email at info@ast-suite.com. Perhaps with some training, we can help you create cases that provide you with more efficient logging capabilities.