ReadyAPI allows development teams to create, execute and manage automated functional performance and security tests on a centralized interface. It helps accelerate API(Application Programming Interface) quality for Agile and DevOps software teams.
Sometimes, we want to store some data to use the data later. This article will discuss how to store data in Ready API in an external MySQL database.
Features of Ready API
The key features of the ready API include
Performance Testing - It is based on the availability of functional tests. It enables you to run load tests on several agents and machines.
Functional Testing - It tests more than one API in simple or complex testing scenarios.
Security Testing - It consists of a wide range of security tests to ensure that your API is not vulnerable to attacks.
API management - Used to import, update, create, and refactor your APIs and their corresponding tests.
Provide support for complex control mechanisms for your test.
Support chained tests to support complex scenarios where you can pass data between tests.
Support for properties and their dynamic usage of data.
Provide support for mocking and virtualization with local or remote virtual servers and services.
Competent assertions to validate a wide variety of test conditions and scenarios.
Collaborate and sync a wide range of source control via Git-based integrations.
Support for using Groovy Scripts for more complex scenarios.
Use ReadyAPI in various setups - dedicated machines, WMs, and Docker instances.
Configurable ReadyAPI user experience.
This was a glimpse about ready API and its features. Let’s jump into the topics i.e,. Store data in ready API. To store data in ready API, you need to install MySQL workbench. So let’s see the steps to install the MySQL workbench.
Install MySQL
For storing data in the MySQL workbench, you need to install it first. Let's discuss the steps to install the MySQL workbench.
Download MySQL Installer from their official website. Click here to visit the official download page.
Click on this 'download' button. Then you will be directed to the community download page.
Click on "No thanks, just start my download."
After downloading, install and run it.
Click the 'add' option in the installer wizard to install MySQL Server.
After the installation, configure the server.
Customize it if required, or leave them to default.
Select the MySQL workbench option and click Execute.
After installing, the MySQL workbench, the next step is to import a sample database.
We are done with the first step to store data in ready API. Jump to the next step i.e,. Import sample database.
Import Sample Database
Run the above-installed MySQL Workbench.
Select the local instance from the list of MySQL Connections.
Go to the “Navigator” panel.
Click “Management”. And select the “Data Import/Restore” option.
Select the option "Import from Dump Project Folder".
Mention the path of the directory containing the sample database.
Select your schema from the "database object to import" section.
Hit the "Start Import" button.
Your database import is successful. Refresh to see the updated list.
Import Project
You can import any Ready API project whose data you want to store. So, let’s discuss the steps to import your project.
Go to files. Open the menu and select the import-packed project option.
Select your project.
Now select the virtual API and click the run button.
As of now, your project is imported, now, set up a data sink test. And configure it to add data to the schema
Go to Navigator > Functional Test.
Click on the hamburger icon .
Add data sink test step.
Drag and drop the data sink test step below the request step.
Open the configuration and add JDBC to configure.
Select the already configured MySQL driver.
To verify all the settings, click on the test connection option.
Click YES to execute the build operation.
You will be directed to create a query page. Select your table name from the menu. And check the 'ID,' 'TEAM,' and 'Affect Property' checkboxes.
Click OK to complete the operation. Now you can transfer the data to be stored.
Transfer the Data
After meeting all the requirements, the final step is to transfer the data to the store. Perform the following steps to transfer the data.
Go to Request option > Outline.
Click on the 'Transfer to' property.
In the "Property Transfer" option, select the property to transfer.
Click on OK to create and transfer the property.
Repeat the above steps to transfer more data as per your requirements.
Now can click on the run button to see the data.
As an example for this blog, we transferred data of 4 students. After transfer, the data will be displayed as:
This was all about how to store data in ready API. Let's now discuss some frequently asked questions related to our topic.
Frequently Asked Questions
What is ReadyAPI?
ReadyAPI allows development teams to create, execute and manage automated functional performance and security tests on a centralized interface. It helps accelerate the quality of API for Agile and DevOps software teams.
What is the use of MySQL workbench?
MySQL Workbench is a visual database. It is used in development, migration, modeling, configuration, etc,.
What is an API?
The API refers to Application Programming Interface. It helps in providing services to various parts of the application.
What is the minimum system RAM required for ready API?
A minimum of 2 GB of RAM and 500 MB of free RAM is required to start ReadyAPI.Also, 500 MB of free disk space for installation.
What are the requirements to store data in ready API?
For storing data in ready API, download your ready API project, and install MySQL workbench. A sample database and an updated version of JDBC(Java Database Connectivity).
Conclusion
In this article, we discussed how to store data in ready API. We have discussed the introduction of ready API and its features. Along with the discussion of how to install MySQL and import project. The reader can carry out a thorough understanding of the topic by referring to the Official Documentation. For more information, Refer-