ReadyAPI includes a number of samples that show how you can work with ReadyAPI.
Downloadable sample projects
Project | Description |
---|---|
XML and JSON data sources |
This example shows how to use data sources of XML and JSON types. Such data sources are convenient when you need to iterate through an array of values from an API's XML/JSON response and use these values in subsequent test steps. |
Nested data source sample |
This sample project demonstrates how to use the nested data source loop. |
Working with headers sample |
This sample project shows how to work with headers: remove, add, and save their values to test case properties using Groovy scripts. |
Set property value sample |
This sample shows how to set values of properties at the project, test suite, and test case levels through a Groovy script. |
REST VirtResponse sample |
You use a REST VirtResponse test step to return some predefined response to a REST request. This sample project demonstrates how you can use this step in your API tests. |
Rerun failed test steps sample |
This sample shows how to rerun failed test cases using a test suite teardown script. |
Clear property values sample |
This project shows how to clear all custom property values at the test case, test suite, and project levels in a project teardown script using Groovy. This is useful for clearing any custom property values that should be blank when the project finished running. |
Iterate through results sample |
This sample illustrates how to iterate through test step results using Groovy to write the results of test steps to a file. It is done in a test case teardown Groovy script. |
Report scripting sample |
This example shows how to add basic Report Scripts and Subreports at the test case and project levels using Groovy. |
ReadyAPI Virtualization scripting sample |
This project shows how to use ReadyAPI Virtualization scripts for various tasks: reading request content to select a response, reading file content to send it in a response, and clearing virtual service properties when that virtual service starts. |
Bundled sample projects
Functional testing
Project | Description | ||
---|---|---|---|
SOAP Sample Project |
Contains a large variety of tests that send requests to the included SOAP virtual API. |
||
REST Sample Project |
Simulates a user looking at the authorization form and logging in to the attached REST virtual service. |
||
Data-Driven Sample Project |
Takes data from a Grid data source and sends multiple requests to the Google Maps API. |
||
Authentication Sample Project |
Contains the test cases that show how you can authenticate to a service in ReadyAPI:
|
||
Kafka Sample Project |
Contains a test case that simulates a publisher and a subscriber that interact with a topic. This sample project uses a Kafka broker running in Docker. You can find the docker-compose.yml file used to start the Docker image in the <ReadyAPI>/tutorials/ folder:
To run the image, use the following command: docker-compose -f docker-compose.yml up
To learn more about Docker Compose, see Docker documentation. |
||
gRPC Sample Project |
Contains a gRPC service with a Unary operation and a test case simulating a gRPC request. This sample project uses a gRPC service running in Docker. You can run it by using the following commands: docker run -p <host-port>:50051 smartbear/readyapi-grpc-service-sample:1.0.0
Replace <host-port> with any available port at the machine, where you run docker. To learn more about the |
Load testing
Project | Description |
---|---|
Baseline Load Sample |
Tests the attached virtual service with a constant load of 3 virtual users. |
Fixed Load Sample |
Simulates 5 virtual users arriving to the attached virtual service every second. |
Variable Load Sample |
Simulates a load against the target service varying from 0 to 10 virtual users in sine-wave pattern. |
Virtualization
Project | Description |
---|---|
Virtualization Sample Project |
Demonstrates how to use ReadyAPI to test both REST and SOAP services in the same project. Contains two test cases working with SOAP and REST virtual APIs. |
Data-Driven Virtual Service Sample Project |
This project contains a REST virtual service that inserts data from a Grid data source into responses. |
Sample APIs
Project | Description |
---|---|
Facebook Sample |
User-feed related requests to Facebook API. |
Flickr Sample |
Search requests to Flickr API. |
YouTube Sample |
Requests for videos and playlists from YouTube API. |
How to open
From the Dashboard
Find the project you need in the Sample Projects section:
Tip: | By default, this section displays sample projects of all applications in the ReadyAPI application suite. Click and clear all the check boxes in the popup list except for ReadyAPI Test Projects to limit the options to ReadyAPI Test and API examples only. |
From the main menu
-
Download the archive and unpack it.
-
Select File > Import Project from the main menu, and then choose the project file in the subsequent dialog:
-
Download the archive and unpack it.
-
Select File > Import Project from the main menu, and then choose the project file in the subsequent dialog:
-
Download the archive and unpack it.
-
Select File > Import Project from the main menu, and then choose the project file in the subsequent dialog:
-
Download the archive and unpack it.
-
Select File > Import Project from the main menu, and then choose the project file in the subsequent dialog:
-
Download the archive and unpack it.
-
Select File > Import Project from the main menu, and then choose the project file in the subsequent dialog:
-
Download the archive and unpack it.
-
Select File > Import Project from the main menu, and then choose the project file in the subsequent dialog:
-
Download the archive and unpack it.
-
Select File > Import Project from the main menu, and then choose the project file in the subsequent dialog:
-
Download the archive and unpack it.
-
Select File > Import Project from the main menu, and then choose the project file in the subsequent dialog:
-
Download the archive and unpack it.
-
Select File > Import Project from the main menu, and then choose the project file in the subsequent dialog:
-
Download the archive and unpack it.
-
Select File > Import Project from the main menu, and then choose the project file in the subsequent dialog: