This repository shows how to use Http files and Rest Client to automate the end-to-end (e2e) testing of APIs.
Note: If you are using dev-container, you don't need to install any of the above. Just open the project in VSCode and it will install all the required tools for you.
Before running the application, make sure you have:
- Installed the Pre-requisites mentioned above.
- Created the environment file
.env
under root folder based on the template file .env.template. - the environment file http-client.env.json under
e2e-test
folder is up to date.
To build the service source code and run unit-tests, use:
make build
ormvn clean install
To run the service in development mode, use:
make run
ormvn spring-boot:run
The following is a list of make commands should be run from root folder.
help π¬ This help message :)
build π¨ build the application and run unit-test
run π Run the application
e2e-init π¨ Initialize e2e test environment by installing httpyac CLI
e2e-local π» Run e2e-test on your local environment
e2e-dev π» Run e2e-test on Backbase-msft-dev environment
load-test πͺ Load Test
load-test-dashboard π Load Test with visualizing the results in xk6 dashboard
To run e2e test, you need to:
- Install [httpyac] CLI tool by running
make e2e-init
ornpm install -g httpyac
- Run the API service in dev mode by running
make run
ormvn spring-boot:run
- Run the e2e test by running
make e2e-local
orhttpyac testing/e2e-test/*.http --all -e local -o response