Do you think IIT Guwahati certified course can help you in your career?
No
Introduction 📃
Hello there! Welcome to yet another article on Ready API.
We all work with APIs. An API helps in integrating new features into existing software architecture. Ready API is an API test automation tool. When we develop an API, it needs to be tested. You must test your API against all possible cases to validate it's working.
Ready API is an API test automation tool. It is used to test the working and functionality of APIs. The tests are performed using assertions on virtual services of actual APIs. A virtual service is an abstraction of the actual API that imitates the behavior of an existing API. You can scale and automate the testing process for API with the help of Ready API. You do not have to write code to perform tests on Ready API.
JDBC stands for Java Database Connectivity. It acts as an interface that defines how the clients will interact with the database using Java. It is the best way to connect the database to your java application.
JDBC Request Log is where you can find all the information regarding the JDBC requests received by your virtual service. A virtual service is an abstraction of the actual API that imitates the behavior of an existing API. To view this information, visit the transaction log page and select the request.
Credit: support.smartbear.com
Following are the entries you will find in JDBC Request Log:
Catalog: This gives the catalog used for the corresponding request. Mostly it is the same as the name of the database.
Schema: Schema corresponding to the request.
Statement SQL: The actual SQL statements are provided here, which are responsible for the incoming JDBC request. It can be edited on the Setup page.
For instance, in the above image, you can see that the request to create a table Registration is made. After clicking on the request in the transaction log, you can see the JDBC request log appears on the right. This window contains the above-mentioned entries.
JDBC Response Log
JDBC Response Log is where you can find all the information regarding the JDBC response sent to the client by your virtual service. To view this information, visit the transaction log page and select the response.
Credit: support.smartbear.com
Following are the entries you will find in JDBC Response Log:
Title: It corresponds to the response sent to the client by the virtual service. If no response is sent, then it contains No data value.
Result: The response content is displayed in this section.
For instance, in the above image, by clicking on Response 1, the JDBC response log appears on the right. It contains the Title and the Result. The request was to select all the records of table1. You can see in the Result that the records of table 1 are fetched.
JDBC Virtual Service Properties
A virtual service is very similar to an existing API and is used to imitate the behavior of a real API. The JDBC virtual service has specific properties which can be modified. You can select the virtual service from the Navigator panel to look at the properties or modify them. The virtual services can be found under your project's APIs. Upon selection, a tab will appear in the right part of the window where you can see the properties of your virtual service. Some additional properties can also be seen in the Navigator panel.
Credit: support.smartbear.com
Properties that will Appear on the Right
Info: This section contains some properties that define the general information about virtual services. It contains properties -
Location: The physical location of the virtual service is the computer it is on.
Time running: The time duration for which the virtual service is running. 0 is displayed if the service is not running.
Status: specifies the running status of the service.
Received: It indicates the number of requests received by the virtual service, even for the services with no virtual operations.
Sent: It indicates the number of responses sent by the service to the clients.
Port: It specifies the port number used by the service for the run.
Virtual service URL: The URL through which requests can be sent to the service.
Autostart on server: It is a checkbox that specifies whether or not to start the virtual service automatically right after it is deployed to a remote computer.
Ignore unknown writes: It is a checkbox. For unrecorded write queries, this command instructs the virtual service to provide a synthetic response.
Description: General Text describing your virtual API. It can also be viewed and modified from the property list in the Navigation Panel.
Start Script: This Script is executed as soon as the virtual service starts. It is the first script to be executed. There are some available script objects that you can use to write the start scripts.
Stop Script: This Script is executed just before the virtual service ends. It is the last script to be executed. You can use the available script objects or write your own to define the stop scripts.
OnRequest Script: The script is executed as soon as a request is received by your virtual service. It runs for all the incoming requests, even for the services with no virtual operations.
AfterRequest Script: This Script is executed just after your virtual service sends the response to the received request. It runs for all incoming requests, even for the services with no virtual operations.
Properties that will appear in the Navigation Panel
JDBC Virtual Service Properties Page: It contains the standard properties, including:
Name: Name of the Virtual Service
Description: General Text describing your virtual API. It can also be viewed and modified from the properties on the window's right part.
Port: It specifies the port number used by the service for the run.
Custom JDBC Virtual Service Properties Page: Here, the user-defined properties of the virtual service can be created, modified, or deleted. Once created, these properties can also be viewed in the properties that appear on the right part of the window.
JDBC Request Properties
All the incoming requests have some properties. You can view and modify those properties by selecting a request in the Incoming column of the Setup page. The properties are viewed in the right part of the window.
Credit: support.smartbear.com
Following are the JDBC Request Properties:
Catalog: The catalog corresponding to the request.
Schema: It defines the schema used for the particular request.
Statement SQL: SQL query for the incoming request.
JDBC Response Properties
All the outgoing responses have some properties and content. You can view and modify those properties and content by selecting a response in the Outgoing column of the Setup page. The properties are viewed in the window's right part and organized in a single category.
Credit: support.smartbear.com
Result: The single category where the response properties are organized. It includes:
Read Queries: This is a table generated to be sent to respond to the received request. To add rows click on Clone Row or Add Empty Row option. Double-click the cell to change its value. To remove any row from the table, right-click on the row and select Remove Rows.
Write Queries: It specifies the number of rows changed as a result of a query. To return a different number, change the value in the Rows Modified textbox.
Frequently Asked Questions
What is JDBC?
JDBC stands for Java Database Connectivity. It acts as an interface that defines how the clients will interact with the database using Java. It is the best way to connect the database to your java application.
What is the JDBC Request Log?
JDBC Request Log is where you can find all the information regarding the JDBC requests received by your virtual service. To view this information, visit the transaction log page and select the request.
What is virtual service in Ready API?
A virtual service is an abstraction of the actual API that imitates the behavior of an existing API. It is also called API Virtual.
What is the JDBC Response log?
JDBC Response Log is where you can find all the information regarding the JDBC response sent to the client by your virtual service. To view this information, visit the transaction log page and select the response.
What is an API?
Application programming interface(API) acts as a mediator between two applications allowing them to communicate. An existing API can be integrated with your application to provide new functionalities.