A hybrid test automation framework (E2E & API) built with CodeceptJS and TypeScript. It demonstrates SDET engineering practices, including hybrid testing strategies (bypassing UI login via API), Page Object Model (POM), schema validation, and an integrated CI/CD pipeline.
Tests are executed against the ServeRest ecosystem:
- API REST:
https://serverest.dev - Web UI:
https://front.serverest.dev
This repository utilizes a modular architecture focused on reusability, maintainability, and high execution speed:
- Hybrid Strategy: Prepares test data and authenticates directly via API prior to UI execution (reducing total suite execution time by up to 70%).
- Page Object Model (POM): Encapsulates locators and user interactions within dedicated page classes.
- Strict Typing: TypeScript applied across all layers (requests, responses, and page objects).
- Integrated CI/CD: GitHub Actions workflow with parallel execution, test report generation, and failure artifact archiving.
├── .github/workflows/ # CI/CD Workflows (GitHub Actions)
├── config/ # Global & Environment configurations
├── features/ # Gherkin feature files
├── step_definitions/ # Gherkin step definitions
├── src/
│ ├── api/ # API helpers and typings
│ ├── web/ # Page Objects and UI components
└── codecept.conf.ts # Main CodeceptJS configuration file
- Language: TypeScript
- Test Framework: CodeceptJS (with Playwright & REST Helpers)
- Data Generator: @faker-js/faker
- Reporting: Allure Report / HTML Reporter
- CI/CD & Containers: GitHub Actions & Docker
- Node.js v18+ installed
- npm or yarn
git clone https://github.com/bfsouza/codeceptjs-typescript-sdet-framework.git
cd codeceptjs-typescript-sdet-frameworknpm install# Run all Gherkin feature tests
npm run test
# Run API feature tests only
npm run test:api
# Run Web (UI) feature tests only
npm run test:web
# Run Hybrid feature tests only
npm run test:hybrid
# Print steps while running Gherkin features
npm run test:ui
# Generate the Allure report from the latest results
npm run reportTo run the entire test suite inside an isolated container environment:
# Build the Docker image
docker build -t codeceptjs-sdet .
# Execute the test suite
docker run --rm codeceptjs-sdetAfter executing tests, detailed reports containing screenshots and videos of failed scenarios can be generated using:
npm run reportTest artifacts from PRs or main branch builds are also available for download under the Actions tab on GitHub.