Do you think IIT Guwahati certified course can help you in your career?
No
Introduction
ReadyAPI is an API testing platform. It allows developers to automate testing.
It can be used for different types of testing -
⭐ Functional Testing - You can set tests for each application's functionality and check if your service works as expected. You can also test the security of your service and verify that it can resist the most common attacks.
⭐ Performance Testing - You can test the performance of the service against various situations.
Virtualization allows you to test the performance of API in real-world scenarios. It imitates real-world experiences and runs your API against them.
Any API needs to be protected from malicious attacks. ReadyAPI provides several security scans that will test your API against these attacks.
You can refer this blog - to learn about how to scan your API for security risks.
In this article, we will discuss how to analyze and compare test results. We will also discuss how to configure test properties and write security scripts.
Analyze Test Scripts
After running the test script a full report will be presented to you. This report contains information about the time taken to execute all the tests, the time and date of initiation and much more information.
🐻 Switch to transaction logs.
🐻 On the left-hand side, you will see the description of the scan and on the right-hand side, you will see whether the test PASSED or FAIL and the time taken to finish the scan.
🐻 If you right-click on the PASS or FAIL status tab, a new inspector tab will open which will contain more information about the test script.
🐻 If you want to save the log in a file, click on and save the file.
Compare Test Results
🐻 Switch to the Compare Tab.
🐻 Run the test multiple times by clicking on the Run security test button.
🐻 You can compare all or some of the tests. You can specify the number of tests you want to compare from theNumber of runs to save drop-down list.
For this example we are using the https://petstore.swagger.io/v2/petendpoint.
Read how to run security test scripts if you want to learn to run security test runs.
Comparison happens between two or more things. For comparison we require a base case against which we test all the other results.
🐻 To create a baseline test, right-click on the name of the run you want to create the baseline, then select Set as Baseline.
🐻 Run the test one more time.
✅ You can see the differences between the scripts from the log tab. Click on the node to see the differences in the node
Reports
Security Issues Report
After running all the scans, ReadyAPI creates a complete report and displays the summary of the report on the screen.
🐻 Click on View Full Report. The report will open in your device’s default PDF reader.
OR
🐻 Switch to setup tab.
🐻 Click on View Summary Report.
🐻 Click on the View Full Report. The report will open in your device’s PDF reader.
OR
🐻 After the test run is over, click on the Report button at the top.
🐻 A new window will open. Select Security Issues Report.
🐻 Specify the path where you want to save the report.
🐻 Click OK.
Security Test Report
🐻 Click on Report.
🐻 A new window will open. Select Security Test Report.
You will be presented with some options -
Include Project Overview - Include information about the project, such as the number of test suites and the time the test run took.
Include Latest Results- Include detailed information about the checks performed during the test run.
Security Test Overview - Include information about the security scans performed during the test run.
Flow Layout - Set paragraphs and components in the report body to flow from one page to another.
🐻 Select the options according to your needs.
🐻 Click OK.
Data Export
If you want to save the data in the form of a CSV file or an XML file, you can do so by exporting the file by clicking on Data Export for automation.
🐻 Click Report.
🐻 A new window will open. Select Data Export for automation option.
🐻 Many options are available.
Data sets - Select the data to export.
Format - Select the format of the created file. Available formats: XML, CSV.
Headers - Generate the header row in the resulting document.
Folder - Specify the folder where you want to save the report.
🐻 Select options according to your requirements.
🐻 Click OK.
Configure Test Properties
You can change the custom properties of the project also. Custom properties are used to store values in the project.
Properties
Click on the test run from the navigator tab.
Expand properties. Enter the property as name-value pairs.
Description
In the description box, enter information about the API.
Execution
You can also configure the test run options.
Abort test on first assertion failure - Command the test execution to stop when an assertion failure occurs.
Fail test if there are assertion failures - Command ReadyAPI to fail the test on assertion failures but proceed with the execution.
Ignore Data Source Loop - Command ReadyAPI to run the test once, regardless of data source loops. It is useful if data is not important for the security test.
Setup Scripts
These scripts will be executed before the test runs. You can think of this script as a pre-test script. It can be used to open databases, create shared objects that can also be used by other tests, clear logs, etc.
🐻 From the navigator tab, click on the test which you want to run.
🐻 From the security test inspector tab, click on setup scripts.
🐻 Enter the test script in the text field given.
Teardown Scripts
These scripts will be executed after the test run is over. Think of them as post-test scripts. They can be used to cancel a test, close data sets, display total execution time, etc.
Frequently Asked Questions
Why automate tests?
If all the testing is done by developers/testers, it wastes human resources. We can optimise these tests and automate them for similar tests. It is more efficient and saves a lot of resources.
How can we use SmartBear ReadyAPI?
To use ReadyAPI, download and install the product. There is a 14 days free trial of the product. After the free trial has ended you can buy the license to use the product for commercial use. There are two types of licenses- File Based and SmartBear ID based. These licenses are valid for 1-3 years.
What is the difference between ReadyAPI and Postman?
Since Postman is designed to work with each individual API endpoint, it is nearly hard to manage and monitor end-to-end testing over time. Since each test case is customised for ReadyAPI, tests may include a variety of endpoints, resources, or data sets. Then, inside a Test Suite and, ultimately, a Test Project, each test case can be added, copied, or deleted. As a result, managing and keeping up with test cases is easy.
Conclusion
Congratulations🎉for finishing this article. We have discussed how to create different types of test reports and how to analyze and compare the test scripts. We discussed what are test properties and how to configure them according to our needs. Lastly, we discussed about setup and teardown scripts.
Do not stop learning! We recommend you read some of our ReadyAPI articles -