Table of contents
1.
Introduction
2.
Transaction Log Page
3.
Successful and Failed Transactions
4.
Applying Filter
5.
Log Capacity
6.
Number of Requests and Responses
7.
Enable or Disable Logging
8.
Frequently Asked Questions
8.1.
What are logs?
8.2.
What is a transaction?
8.3.
What is a Request?
9.
Conclusion
Last Updated: Mar 27, 2024

Transaction Log In ReadyAPI

Author Manish Kumar
2 upvotes
Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

Introduction

You already know how much logs help in debugging. While working with virtual APIs in ReadyAPI, we are bound to get a ton of errors, and sometimes, our code might run just fine 😝. Logs maintain a record of everything that happens with our execution of test steps. ReadyAPI has a dedicated page to record logs of all the transactions that take place. In this blog, we will learn about the transaction log page and its features. ❄️❄️❄️❄️

Transaction_log_in_ready_api

Transaction Log Page

The virtual service editor contains the transaction log page. It is responsible for logging all the transactions taking place in real time. All the incoming requests and outgoing responses get recorded while the service runs. Below is the sample look of the same:

 

Transaction log page

 

The page you see above contains all the records, everything that happens with the virtual API gets recorded. It includes information on all the requests that were sent to this virtual API, including those for which no response is designed. 

To see the information about a request, click on the request, and a new dialogue box opens on the right. The requests body, headers, and other information are present here.

Successful and Failed Transactions

The transaction log page marks all the transactions as either failed or passed with red and green dots, respectively. You might notice from the image below that even if the response contains error codes; it passes because ReadyAPI considers a failure only if assertions are not fulfilled. ❄️❄️

Successful and Failed Transaction

Virtual services classify transactions as failed or successful based on the assertions. To find out what assertions failed:  

 

Step 1: Click on the request, and a panel will get expanded on the right side.

Step 2: Click on the assertions and find the failed assertion. It will also mention the reason for failure.

Applying Filter

Filters are an excellent way to find a request based on keywords and phrases. The transaction log page has a text box dedicated to filters. You can filter out based on header detailstimestampsresponse codes, etc. The image below shows the location of the filter text box:

Applying Filter

Log Capacity

Logs

 

Most of the time, we will only need the recent transactions. The log page, by default, displays only 25 current records. We can change it if needed, but keeping this number small is preferable. Small numbers of records will result in better performance and memory management. To change the log capacity, press the button and then change the "Transaction logs to keep" setting.

ReadyAPI Preferences

 

To erase log data manually, click on the button from the toolbar.

Number of Requests and Responses

To find the number of requests and responses, see the label on the log page, as shown in the image below. 

Number of requests and responses

Enable or Disable Logging

We can easily disable and enable logging on the fly with a button. Follow the images below to learn how to do it.
 

disable logging

 

Let us now understand how we can enable logging once again.
 

Enable logging

Frequently Asked Questions

What are logs?

Logs are a way of recording process history. It helps keep track of all steps taken and allows for efficient debugging and error reporting.

What is a transaction?

A transaction in API testing is any request made to the server. Whether it passes or fails, it is considered a transaction. A transaction is done through a URL with a request body and headers being passed to it.

What is a Request?

A request is a message the client sends to the server asking for specific information or giving the server some data to save. The server is responsible for handling the request and reverting with a response.

Conclusion

In this blog, you learned about Transaction Log Page in ReadyAPI. All the important topics related to the Transaction Log Page in ReadyAPI were covered in detail.

Also, do refer to other API testing-related articles:

Script Editors in ReadyAPI

Creating Functional Tests in ReadyAPI

Internet of Things in ReadyAPI
 

Please refer to our guided paths on Coding Ninjas Studio to learn more about DSA, Competitive Programming, JavaScript, System Design, etc. And also, enrol in our courses and refer to the mock test and problems available. Have a look at the interview experiences and interview bundle for placement preparations.

Please upvote our Transaction Log Page in the ReadyAPI blog if you found it helpful and informative!

Happy learning!

Live masterclass