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