breveTest is a lightweight, declarative API testing framework that enables you to test REST APIs without writing any code.
You define your tests using simple .breve files, and breveTest automatically executes them during your Maven build.
- ✅ No Java / JUnit / TestNG code required
- ✅ Simple key-value based test definitions
- ✅ Built-in authentication handling
- ✅ Supports GET, POST, PUT, DELETE
- ✅ Seamless Maven integration
- ✅ CI/CD friendly
- Write API test definitions in
.brevefiles - Place them under
src/test/breve - Run:
mvn clean install
- breveTest discovers and executes all test cases automatically
src
└── test
└── breve
├── credentials.breve
├── product-tests.breve
- All test files must be inside
src/test/breve - File extension must be
.breve
Add the breveTest dependency to your project:
<dependency>
<groupId>com.brevetest</groupId>
<artifactId>brevetest</artifactId>
<version>1.0.0</version>
<scope>test</scope>
</dependency>A .breve file contains simple key-value pairs that describe API requests and expected responses.
username=emilys
password=emilyspass
auth_url=https://dummyjson.com/auth/login- Performs authentication
- Extracts and stores the auth token
- Reuses the token for all subsequent requests
get_url=https://dummyjson.com/products/1
get_expected_status_code=200
get_expected_status_message=OK✔ Fetches a resource and validates the response
post_url=https://dummyjson.com/products/add
post_json={"title": "Breve Phone", "price": 799}
post_expected_status_code=201
post_expected_status_message=Created✔ Creates a new resource with JSON payload
put_url=https://dummyjson.com/products/1
put_json={"title": "Updated Phone", "price": 999}
put_expected_status_code=200
put_expected_status_message=OK✔ Updates an existing resource
delete_url=https://dummyjson.com/products/1
delete_expected_status_code=200
delete_expected_status_message=OK✔ Deletes a resource and validates the response
username=emilys
password=emilyspass
auth_url=https://dummyjson.com/auth/login
get_url=https://dummyjson.com/products/1
get_expected_status_code=200
get_expected_status_message=OK
post_url=https://dummyjson.com/products/add
post_json={"title": "Breve Phone", "price": 799}
post_expected_status_code=201
post_expected_status_message=Created
put_url=https://dummyjson.com/products/1
put_json={"title": "Updated Phone", "price": 999}
put_expected_status_code=200
put_expected_status_message=OK
delete_url=https://dummyjson.com/products/1
delete_expected_status_code=200
delete_expected_status_message=OKExecute:
mvn clean installThis will:
- Discover all
.brevefiles - Execute all API test cases
- Fail the build if any test fails
| Key | Description |
|---|---|
*_url |
API endpoint |
*_json |
Request body (POST / PUT) |
*_expected_status_code |
Expected HTTP status code |
*_expected_status_message |
Expected HTTP status message |
- Microservices API testing
- Regression testing
- CI/CD pipeline validation
- Contract testing
- Quick API sanity checks
- ⏳ API testing using
.brevefiles - ⏳ Unit testing support using
.brevefiles - ⏳ JSON response body assertions
- ⏳ Header validation
- ⏳ Environment-based configuration
- ⏳ Data-driven testing
- ⏳ HTML and JSON test reports
MIT License