How to create Functional Tests in ReadyAPI

HOME

ReadyAPI can be used to perform functional tests of SOAP, RESTful, GraphQL, Kafka, JMS or other API or web services. ReadyAPI functional tests verify that an API or a web service follows the required business logic.

This tutorial provides a detailed description of steps to be followed for creating a Functional Test

  1. Create a Functional Test.
  2. Run the Functional Test
  3. Test Result of a Functional Test
  4. Test Report Generation
  5. Sample Test Report

Create a Functional Test

Step 1 – Open the start page, click Create Functional Test 

Step 2 – Select Endpoint option in this dialog.

Step 3 – In the subsequent wizard, specify the method, URL of the web service’s definition. Then select the Next Button.

Endpoint – http://dummy.restapiexample.com/api/v1/employee/1

Step 4 – Select if you want to create a new project for the definition you have added, or add it to the existing project. Click the Next button to continue.

Step 5 – On this page of the wizard, you can select assertions to be added to the test. ReadyAPI adds the selected assertions to new test requests.

Assertions verify that your API works as expected. Select the selection and click the Next button.

Run the Functional Test

Step 6 – ReadyAPI will create a test project and add test cases to it. After that, it will display one more dialog box, where you can run the created tests or add a data source to them. Assume you don’t want to add a data source, so can run the tests by clicking the “Run” option.

Step 7 – This screen shows that a new project is created and a new functional test as shown in the image is created.

Step 8 – To run an individual request test step, select it in the Navigator panel on the left, and then click  Green arrow on the main toolbar or click on Send button on the request editor toolbar.

Test Result of a Functional Test

Step 9 – Image of a failed test result. When the test fails, the Request color as shown in the image will be red.

Step 10 – When the test is passed, the Request icon shown in the image will be green.

Step 11 – The Assertions panel lists the assertions you added to a test step or operation. Here, you can add and modify the assertions.

Test Report Generation

Step 12 – To open the Create Report dialog, click Report in functional tests at any level. Here, I have clicked on the Test Case – (http://dummy//rest..) and a Report tab is displayed.

Step 13 – The Create Report dialog configuration varies depending on the report type you select. You can create project reports only on the level of the Functional test in the Navigator. After selecting the required options, click on the OK button. This generates a Test Report as shown in the below image.

Sample Test Report

Congratulations!! We are able to create, run a Functional Test as well as able to generate the Test Report.

How to create Security Test from Functional test in ReadyAPI

HOME

The previous tutorial has explained the creation of a new Security Test. This tutorial explains the process to create a Security test from the existing Functional Test.

Steps to be followed to create a security test from a functional test case:

  1. Create the Security Test from Functional Test
  2. Run the Security Test
  3. Analyse Security Test Results
  4. Generation of Security Test Report
  5. Sample Test Report
  6. Analyse Security Test Report

Create the Security Test from Functional Test

Step 1 – Right-click the test case present under Functional Tests in the Navigator and select Create Security Test.

Step 2 – Click Select Test Target. Select the test case you want to apply the security scan to. All the applicable scans are selected by default

Leave the scans you want to have in your test checked and uncheck the other scans.

There is a list of Scans, you can select either one scan or multiple scans. I have selected all the scans.

  1. Boundary Scan
  2. Cross Site Scripting
  3. Fuzzing Scan
  4. Invalid Types
  5. SQL Injection
  6. XPath Injection
  7. HTTP Method Fuzzing
  8. Sensitive Files Exposure
  9. Weak Authentication

Click the OK button.

Step 3 – This screen shows all the scans added to the Security Test.

Run the Security Test

Step 4 – Click the Green arrow “Run” to start the test.

Step 5 – ReadyAPI will start sending modified requests and checking responses.

Step 6 – The security test window shows the progress of each test step and matching security scans. This screen shows all the configurations of Cross Site Scripting. Similarly, all the scans have their own in-built configurations.

Analyse Security Test Results

Step 7 – The Transaction Log shows additional information about security scans.

Step 8 – The details of a particular request or response are available in the inspector.

The Setup pane contains the detail about the configuration used for the tests.

Generation of Security Test Report

Step 9 – After the security test run finishes, click View Summary Report:

Step 10 – In the dialog that appears, click View Full Report.

Step 11 – After that, ReadyAPI will open the report in the default PDF viewer.

Sample Test Report

Analyse Security Test Report

 Step 12 – Example of HTTP Method Fuzzing

Example of Cross Site Scripting

Congratulations!! We have successfully created the Security Test from the Functional Test. We are also run the test and generated the Security Test Report also. That’s a great accomplishment.