A ready-to-use boilerplate for API testing using SuperTest and Cucumber with TypeScript.
- 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
features/: Contains Cucumber feature filesfeatures/support/: Contains step definitions and support files for Cucumberspecs/: Contains SuperTest specification filesreport.js: Script to generate HTML reports
jest.config.js: Jest configurationcucumber.js: Cucumber configuration (if needed)tsconfig.json: TypeScript configuration
π§ Run the following command to install all the project dependencies:
npm installTo run both SuperTest and Cucumber tests:
npm run testTo run the SuperTest proof-of-concept tests:
npm run test:supertestTo execute the end-to-end tests using Cucumber:
npm run test:cucumberAfter running the Cucumber tests, generate an HTML report:
npm run generate:reportYou can view the latest Cucumber report on GitHub Pages:
π Copyright Β© 2023 tooniez.
This project is MIT licensed.