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