An API testing automation suite using Spring boot, cucumber and Rest Assured.
GPL-3.0 License
This repository contains an API testing automation suite using Spring Boot, Cucumber and Rest Assured. The current feature is to test the Fixer time series API, which provides historical exchange rates. See: https://apilayer.com/marketplace/fixer-api
This suite can test other APIs by adding new feature files and step definitions.
src/main/java/com/api/testauto/steps
: Contains the Cucumber step definitions.src/main/java/com/api/testauto/services
: Contains the services used in the step definitions.src/main/java/com/api/testauto/utils
: Contains utility classes.src/main/java/com/api/testauto/worlds
: Contains the world objects that share state between steps.To set up the project, you can execute the following commands:
git clone https://github.com/Anasss/api-testauto.git
cd api-testauto
mvn install
You can launch the tests by executing the following command:
mvn test
In Cucumber, tags are used to filter scenarios that you want to execute. You can add tags to your scenarios in your feature files using the @test
For example:
@test
Scenario Outline: Get valid historical rates between two valid dates
Given User makes a GET request to the Fixer API endpoint with <start_date> and <end_date>
Then The response matches the schema <valid_rates_schema> and the status code should be <status_code>
For further reference, please consider the following sections: