Table of contents
1.
Introduction
2.
Using Command-Line Runners
2.1.
Available Command-Line Runners
3.
Functional TestRunner
3.1.
Parameters
4.
Security TestRunner
4.1.
TestRunner Specifics
4.1.1.
Loading Script libraries
4.1.2.
Work-space related scripts
4.1.3.
Running on a headless machine
4.2.
Parameters
5.
Performance TestRunner
5.1.
Get the Generated Command Line
5.1.1.
Via the Get Command Line Option
5.1.2.
Via the runner launch
6.
VirtRunner
7.
Starting Automated Test Runs
8.
Frequently Asked Questions
8.1.
What is a Test Runner in Ready API?
8.2.
How to execute a Test Runner?
8.3.
Can we use ReadyAPI for performance testing?
9.
Conclusion
Last Updated: Mar 27, 2024

What if My Applications are not there in the Ready API?

Author Nidhi Kumari
1 upvote
Career growth poll
Do you think IIT Guwahati certified course can help you in your career?

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?

No applications in Ready API

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.

Launch TestRunner

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:

project.scriptLibrary = project.getPropertyValue("dataPath")

Thread.sleep(12000)

Work-space related scripts

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:

  1. Via the get command line option.
  2. Via the runner launch.

Via the Get Command Line Option

🧩 Step 1: Select Get Command Line after entering the necessary parameters in the window.

Launch Performance TestRunner

🧩 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:

Launch Button

🧩 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.

General Syntax:

virtrunner.bat [optional-arguments] <test-project>

Starting Automated Test Runs

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:

We hope this blog has helped you. We recommend you to visit our articles on different topics of Ready API, such as

If you liked our article, do upvote our article and help other ninjas grow.  You can refer to our Guided Path on Coding Ninjas Studio to upskill yourself in Data Structures and AlgorithmsCompetitive ProgrammingSystem Design, and many more!

Head over to our practice platform Coding Ninjas Studio to practise top problems, attempt mock tests, read interview experiences and interview bundles, follow guided paths for placement preparations, and much more!!

Happy Reading!!

Live masterclass