Skip to content

avantika21/dockerise-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Dockerised Test Framework

A containerized end-to-end test suite built with Playwright and TypeScript. Tests run against playwright.dev and are packaged in Docker for consistent execution across environments.

Tech Stack

  • Playwright 1.58.2 — browser automation & testing
  • TypeScript 5.4+ — type-safe test authoring
  • Node.js 18+ — runtime
  • Docker — containerized test execution (based on mcr.microsoft.com/playwright:v1.58.2-jammy)

Project Structure

dockerise-app/
├── Dockerfile              # Container definition
├── playwright.config.ts    # Playwright configuration
├── tsconfig.json           # TypeScript configuration
├── package.json            # Scripts and dependencies
├── .dockerignore
├── .gitignore
└── tests/
    └── example.spec.ts     # E2E test suite

Test Cases

All tests run against https://playwright.dev using a Chromium browser:

  1. Homepage loads with correct title
  2. "Get started" navigation link is visible
  3. Clicking "Get started" navigates to the intro page

Getting Started

Local

# Install dependencies (installs Playwright browsers too)
npm install

# Run tests headlessly
npm test

# Run with interactive UI
npm run test:ui

# Run with visible browser windows
npm run test:headed

Docker

# Build the image
docker build -t playwright-tests:latest .

# Run tests
docker run playwright-tests:latest

# Run and export test results to host
docker run -v $(pwd)/test-results:/app/test-results playwright-tests:latest

Configuration

Setting Value
Base URL https://playwright.dev
Browser Chromium (Desktop Chrome)
Parallel execution Enabled
Retries 0
Reporter List (console)
Screenshots On failure only
Traces On first retry

Dependencies

Package Version Purpose
@playwright/test ^1.58.2 Testing framework
playwright 1.58.2 Browser automation
typescript ^5.9.3 TypeScript compiler

All dependencies are dev-only — this project has no production dependencies.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors