Do you think IIT Guwahati certified course can help you in your career?
No
Introduction
Using built-in plugins, you can include ReadyAPI in your working process. The ReadyAPI toolset integration provides flawless integration with various applications for testing, development, and operations. Almost 15+ apps can seamlessly integrate directly with Ready API. But have you ever wondered what if the application is not there in the Ready API integration list?
This article will give information about how to use the integration when your applications are not on the list of available integrations in Ready API.
Using Command-Line Runners
We can start ready API tests by using command-line runners. We can include Ready API tests in our apps by using command-line runners. It allows us to run our tests and export results.
We need a valid ReadyAPI Test licence to use the command line runner. Sign up for a free trial if you don't have a licence.
Available Command-Line Runners
You can run functional tests with the test runner and export the results. You can use the ReadyAPI user interface or the command line to launch the runner. Here we will discuss the command-line runners.
When you need to create the command line and verify the settings, the latter method is helpful. For each test you can run in ReadyAPI, a runner tool is available:
🔥 For Functional Tests: You can use the Functional TestRunner for the tests.
🔥 For Security Tests: You can use the Security TestRunner for the tests.
🔥 For Load Tests: You can use the Performance TestRunner for the load tests.
🔥 To start and stop virtual services(virtual APIs): You can use VirtRunner for virtual services.
Functional TestRunner
Select the relevant menu command from the ReadyAPI user interface to start the runner.
🧩 Step 1: Choose Project > Launch TestRunner from the main menu after selecting any node in Functional Tests.
🧩Step 2: Launch TestRunner by selecting it from the context menu of the desired test case.
After you choose a command from the menu, ReadyAPI shows you a dialogue box where you may set the execute parameters. This command string can then be used to launch the tool from the command line.
Parameters
The utility parameters are arranged in the following tabs in the configuration dialogue:
🔥 Basic Tab.
🔥 Overrides Tab.
🔥 Reports Tab.
🔥 Tags Tab.
🔥 Properties Tab.
🔥 Custom Args Tab.
Security TestRunner
Use the command line runner to perform ReadyAPI security tests from the command line runner. Start the runner using the ReadyAPI user interface or the command line.
You must have a valid ReadyAPI Test licence in order to use the command line runner. The command line runner will request the path to a licence file if ReadyAPI is started without a licence.
TestRunner Specifics
The Security TestRunner Specifies the following:
Loading Script libraries
Every 5 seconds, ReadyAPI examines the folder given in the Script Library folder. You must wait for it to be loaded before using a dynamically configured script library folder. To accomplish this, after instructing your script to load the script library, add a delay:
The getWorkspace() method returns null because ReadyAPI does not open a workspace when you run tests using the command-line runner. In order to avoid using the workspace object, your script needs to be modified.
Running on a headless machine
You should add the -Djava.awt.headless=true JVM option when running tests on a headless computer. The test runner is unable to interact with UI elements as a result.
Parameters
The utility parameters are arranged in the following tabs in the configuration dialogue:
🔥 Basic Tab.
🔥 Overrides Tab.
🔥 Reports Tab.
🔥 Properties Tab.
🔥 Custom Args Tab.
Performance TestRunner
PerformanceTestRunner conducts load Tests which export the findings as a set. By using the command line, you may utilise it to do ReadyAPI load tests.
We can use the ReadyAPI user interface or the command line to launch the runner.
Get the Generated Command Line
We can get the generated command line in two ways:
Via the get command line option.
Via the runner launch.
Via the Get Command Line Option
🧩 Step 1: Select Get Command Line after entering the necessary parameters in the window.
🧩 Step 2: The command line will be generated by ReadyAPI and displayed in a separate window.
You can select text with the mouse and choose Copy to Clipboard to copy it to the clipboard.
Via the runner launch
🧩 Step 1: Click Launch to launch the runner after entering the desired launch parameters in the dialogue box:
🧩 Step 2: The produced command line can be found at the start of the test log after the run is complete.
VirtRunner
To launch virtual APIs (virtual services) from the command line, use VirtRunner. The file is located in the ReadyAPI directory's bin folder. On Windows, the file is called virtrunner.bat; on Linux and Mac, it is called virtrunner.sh.
ReadyAPI connects to numerous ongoing integration platforms (like Maven, Jenkins and so on).
We can use one of the command-line runners to interact with ReadyAPI regardless of the continuous integration system you employ. To accomplish this, use the Batch Command build step to execute a batch file that contains the command line to be passed to the runner. The step's name could change depending on the CI system you use and the operating system you run it on.
Frequently Asked Questions
What is a Test Runner in Ready API?
The Test runner is a tool in the Ready API. You can run functional tests with the test runner and export the results. Either the ReadyAPI user interface or the command line can be used to launch the runner.
How to execute a Test Runner?
You must double-click on the name of the test or test fixture in the Test Runner window in order to execute a test. You can also utilise the Run option from the context menu by right-clicking on any item in the test tree to have it run along with any applicable children.
Can we use ReadyAPI for performance testing?
You may use ReadyAPI to develop and execute load or performance tests to ensure your APIs can handle a high volume of visitors. You can distribute load generation across several computers, including cloud machines, or execute load tests locally.
Conclusion
We have discussed starting Ready API tests using Command-line runners. We have discussed various Test Runners:
Functional TestRunner.
Security TestRunner.
Performance TestRunner.
VirtRunner.
If you are beginning with ReadyAPI, refer to these articles to proceed: