Aymalla / api-testing

Apply learning examples on API End-to-End testing and Load testing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

APIs Testing

This repository shows how to use Http files and Rest Client to automate the end-to-end (e2e) testing of APIs.

Prerequisites

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.

Documentation

Running

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 or mvn clean install

To run the service in development mode, use:

  • make run or mvn 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

Run e2e test

To run e2e test, you need to:

  • Install [httpyac] CLI tool by running make e2e-init or npm install -g httpyac
  • Run the API service in dev mode by running make run or mvn spring-boot:run
  • Run the e2e test by running make e2e-local or httpyac testing/e2e-test/*.http --all -e local -o response

About

Apply learning examples on API End-to-End testing and Load testing

License:MIT License


Languages

Language:Java 52.2%Language:JavaScript 28.0%Language:Makefile 12.4%Language:Shell 4.4%Language:Dockerfile 2.9%