This project is a testing framework for the Inar User Management API. It uses Maven for dependency management, Cucumber for behavior-driven development (BDD), Java as the programming language, RestAssured for API interaction, and Log4J2 for logging.
- Java JDK 11 or higher
- Maven installed and configured
- An IDE like IntelliJ IDEA or Eclipse
- Clone the repository to your local machine.
- Open the project in your IDE.
- Make sure to refresh Maven dependencies to download all required libraries.
The framework reads the base URI and other configuration settings from application.properties
located in src/test/resources
.
Example application.properties
content:
base.uri=https://sample/api
To run the tests, you can use the following Maven command:
mvn clean test
Alternatively, you can run the tests directly from your IDE by running the Cucumber test runner class.
To execute the tests with the Cucumber Runner, you can either run the TestRunner
class directly from your IDE or use Maven.
From the IDE:
- Navigate to
src/test/java/com/inar/reqres/usermanagement/runner/TestRunner.java
. - And run it.
src/main/java
: Contains utility classes and POJOs (Plain Old Java Objects) for request and response bodies.src/test/java
: Contains the test code, including step definitions and hooks.src/test/resources
: Contains feature files, properties files, and logging configuration.
ConfigManager
: Utility class for reading properties from the configuration file.TestContext
: Context class used for sharing data between steps.Hooks
: Class containing@Before
and@After
methods for setting up preconditions and postconditions for the tests.BaseSteps
,CommonSteps
,UserDeletionSteps
,UserValidationSteps
: Step definition classes for the Cucumber steps.User
: POJO class representing the user entity.
Logs are configured via log4j2.properties
and output to the console. They provide detailed information about test execution.
For all notable changes to this project, see the CHANGELOG.md
file.
Please read CONTRIBUTING.md
for details on our code of conduct, and the process for submitting pull requests to us.
This project is licensed under the MIT License - see the LICENSE.md
file for details.