Skip to content

πŸ“‹ Develop API Integration tests with SuperTest and Cucumber BDD TS with reports deployed on Github pages!

License

Notifications You must be signed in to change notification settings

tooniez/supertest-cucumber-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SuperTest Cucumber API Testing Boilerplate πŸš€πŸ”¬

Test and Publish Cucumber Report

A ready-to-use boilerplate for API testing using SuperTest and Cucumber with TypeScript.

Features

  • SuperTest for making HTTP requests and assertions
  • Cucumber for behavior-driven development (BDD) testing
  • TypeScript for type-safe code
  • Jest as the test runner
  • HTML report generation for test results

Project Structure

  • features/: Contains Cucumber feature files
  • features/support/: Contains step definitions and support files for Cucumber
  • specs/: Contains SuperTest specification files
  • report.js: Script to generate HTML reports

Configuration Files

  • jest.config.js: Jest configuration
  • cucumber.js: Cucumber configuration (if needed)
  • tsconfig.json: TypeScript configuration

Project Setup

πŸ”§ Run the following command to install all the project dependencies:

npm install

Running Tests

Run All Tests

To run both SuperTest and Cucumber tests:

npm run test

Run SuperTest POC Tests

To run the SuperTest proof-of-concept tests:

npm run test:supertest

Run Cucumber E2E Tests

To execute the end-to-end tests using Cucumber:

npm run test:cucumber

Generate HTML Report

After running the Cucumber tests, generate an HTML report:

npm run generate:report

View Cucumber Report

You can view the latest Cucumber report on GitHub Pages:

View Cucumber Report

License

πŸ“ Copyright Β© 2023 tooniez.
This project is MIT licensed.