Skip to content

Latest commit

 

History

History
60 lines (44 loc) · 3.04 KB

README.md

File metadata and controls

60 lines (44 loc) · 3.04 KB

K6 Tests Badge ServeRest

K6 Serverest

This is a sample project using K6 API Load testing in the application https://serverest.dev.

Pre-requisites

Install

Clone this repo

  git clone https://github.com/Samska/k6-serverest

Install the dependencies

  npm install

Running the tests/scripts

npm run start:server - Start serverest server application

npm run test:load - Clean the reports folder, run the e2e-load-test.js and creates the json and html reports inside /reports

Project structure

k6-serverest/          
 ├── .github/                               
 │    ├── workflows/                        
 │        ├── k6.yml                                # Configuration for the tests on CI           
 ├── config/                                                                
 │    ├── config.js                                 # Settings for the project such as baseURL
 ├── data/                                                                
 │    ├── *.js                                      # Data files used in the tests 
 ├── reports/                                       # Reports created after the test execution                        
 │    ├── *   
 ├── support/                                                                
 │    ├── helpers.js                                # Test helpers such as reusable functions                                                                 
 ├── tests/                                         # Tests folder                               
 │    ├── *.js                                      # Load tests                    
 ├── .gitignore                                     # Untracked folder and files
 ├── k6.config.js                                   # The main configuration file for k6
 ├── package-lock.json                              # File that is auto generated when a package is installed via npm      
 ├── package.json                                   # Core file in node.js projects, used for dependency management, scripts, project metadata and configs
 ├── README.md                                      # README with project overview and instructions

Continuous integration

This project has continuous integration with GitHub Actions. The configuration file is located at the path .github/workflows/k6.yml. Every time a push is made to the main branch, the pipeline is executed. With each execution, an artifact is generated with the test results and saved in that execution, as well as the results are published on the gh-pages and are available for consultation on this page.