Ready-to-use API Test Automation Architecture using Java and REST Assured.
In order to use the framework:
- Fork the repository.
- Clone, i.e, download your copy of the repository to your local machine using
git clone https://github.com/[your_username]/rest-assured-api-test-automation-architecture.git
- Import the project in IntelliJ IDEA.
- Make your desired changes.
- Use IntelliJ IDEA to run your desired tests. Alternatively, you can use the terminal to run the tests, for example
./gradlew test
. - Build and browse the allure report using
./gradlew allureServe
The project uses the following:
- Java 11 as the programming language.
- REST Assured as the HTTP client.
- Jackson as the JSON parser.
- Univocity Parsers to parse and handle CSV files.
- JUnit 5 as the testing framework.
- Lombok to generate getters, setters, builders and more.
- Owner to minimize the code to handle properties file.
- Allure Report as the test reporting strategy.
- Gradle as the Java build tool.
- IntelliJ IDEA as the IDE.
The project is structured as follows:
📦 rest-assured-api-test-automation-architecture ├─ .github │ └─ workflows │ └─ test-execution.yml ├─ .gitignore ├─ LICENSE ├─ README.md ├─ build.gradle ├─ gradle │ └─ wrapper │ ├─ gradle-wrapper.jar │ └─ gradle-wrapper.properties ├─ gradlew ├─ gradlew.bat ├─ settings.gradle └─ src ├─ main │ ├─ java │ │ └─ io │ │ └─ github │ │ └─ tahanima │ │ ├─ client │ │ │ └─ UserClient.java │ │ ├─ config │ │ │ ├─ Configuration.java │ │ │ └─ ConfigurationManager.java │ │ ├─ dto │ │ │ ├─ BaseDto.java │ │ │ └─ UserDto.java │ │ ├─ model │ │ │ └─ User.java │ │ ├─ report │ │ │ └─ AllureManager.java │ │ └─ util │ │ ├─ Endpoint.java │ │ └─ RequestSpec.java │ └─ resources │ ├─ allure.properties │ └─ config.properties └─ test ├─ java │ └─ io │ └─ github │ └─ tahanima │ ├─ annotation │ │ └─ DataSource.java │ ├─ e2e │ │ ├─ BaseE2ETest.java │ │ └─ UserE2ETest.java │ └─ util │ ├─ CsvToDtoMapper.java │ ├─ DataArgumentsProvider.java │ └─ JsonFormatter.java └─ resources └─ testdata └─ user.csv