What is Ready API?
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.
To learn more, visit Ready API | Learn & Practice from Coding Ninjas Studio.
Now that we know the basics, let's move on to TCP Requests virtual service in Ready API.
TCP Request Log
TCP Request Log is where you can find all the information regarding the TCP requests received by your virtual service. A virtual service is an abstraction of the actual API that imitates the behavior of an existing API.
Credit: support.smartbear.com
To view this information, visit the transaction log page and select the request. It contains a single category:
- Result: This section displays the incoming request data in a tabular form.
TCP Response Log
TCP Response Log is where you can find all the information regarding the TCP 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 TCP 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.
TCP 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 TCP 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 dialogue 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 socket: The general socket through which the virtual services can be accessed
- Autostart on server: It is a checkbox that specifies whether or not to start the virtual service automatically after it is deployed to a remote computer.
-
Enable SSL: It is a checkbox. It specifies the virtual service to work through only secure connections.
-
Request Delimiter: The incoming requests are in the form of the data stream. So, the request delimiter recognizes requests from the data stream by the virtual service. It can be Char/Byte sequence, Fixed length, Groovy script, or Segment forwarding.
-
Response Delimiter: The outgoing responses are in the form of the data stream. So, the response delimiter is used to separate responses in the data stream by the virtual service. It can be Char/Byte sequence, Fixed length, Groovy script, or Segment forwarding.
-
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 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
-
TCP 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.
TCP 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
It only contains one property:
- Request body: It is the TCP request body.
TCP 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 on the window's right part and organized in a single category.
Credit: support.smartbear.com
It only contains one property:
- Response body: It is the response body of the TCP virtual service.
Frequently Asked Questions
What is TCP?
TCP or Transmission control protocol, is a transport layer protocol. It is a lower-level protocol on which the higher application layer protocols rely. TCP and IP are the most important protocols of the internet.
What is the TCP Request Log?
TCP Request Log is where you can find all the information regarding the TCP 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 TCP Response Log?
TCP Response Log is where you can find all the information regarding the TCP 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.
Conclusion
This article discussed the TCP Requests Virtual Service in Ready API. To learn more about Ready API, visit Ready API | Learn at Code Studios.
I hope you would have gained a better understanding of these topics now!
Are you planning to ace the interviews with reputed product-based companies like Amazon, Google, Microsoft, and more?
Attempt our Online Mock Test Series on Coding Ninjas Studio now!
Happy Coding!