Skip to content

st2f/tests-framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧪 Playwright + CucumberJS + TypeScript + HTML Report Starter

A minimal end-to-end test framework built with:

Tool Purpose Dev Mode Build Mode
CucumberJS Gherkin-style .feature scenarios ✅ via --import ✅ compiled
Playwright Browser automation (Chromium by default)
TypeScript Strong typings for steps and support code tsc compilation
ts-node Run .ts without building ✅ used during npm test
tsc Compile to /dist for reports/CI
multiple-cucumber-html-reporter Generates HTML results ✅ executed after run

📁 Project Structure

.
├── features/               # Gherkin scenarios
│   └── ui/login.feature
├── src/
│   ├── steps/ui.steps.ts   # Step definitions
│   ├── support/hooks.ts    # Hooks (before/after)
│   └── generate-report.ts  # HTML report generator
├── reports/                # Generated HTML reports
├── results/                # Raw cucumber JSON output
├── playwright.config.ts
├── tsconfig.json
├── package.json

🚀 Installation

npm install

Playwright browsers install (only once):

npx playwright install

🛠️ Workflow

Run Tests in Dev Mode (no build)

Runs directly using ts-node:

npm test

📊 Generate HTML Report

Smart fallback: if built version exists → use it. Otherwise → run via ts-node.

npm run report
image image

📦 Full Build (CI Mode)

npm run build
npm run report

About

ESM-compatible Playwright + Cucumber v12 framework with HTML reports

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published