Skip to content

MSroczynski3/AI-driven-testing

Repository files navigation

AI-driven-testing

AI-driven-testing is a lightweight, example repository for experimenting with AI-assisted test planning and automated test generation. The project demonstrates how to structure end-to-end (E2E) tests using Playwright and TypeScript and is intended as a sandbox for exploring new testing techniques and workflows.

Table of contents

Overview

This repository contains a small set of Playwright-based E2E tests designed to validate core UI flows against a demo application. It's optimized for quick iterations, reproducible test runs, and integration with AI-driven tooling for test generation and planning.

The tests target the demo application hosted by the repository's upstream dependency: https://github.com/jaktestowac/gad-gui-api-demo. Be sure that demo app is running and reachable (see the playwright.config.ts file for the base URL configuration).

Initial workflow

Our Workflow

  1. Metaprompt - .ai-artifacts/agent-plan-draft.md

    • Our needs gathered in a single file
  2. Prompt - .ai-artifacts/agent-explore-plan.md

    • Prepared with precise guidelines and an action plan for the Agent
  3. Review with MCP - .playwright-mcp/

    • MCP helps evaluate the action plan and verifies the real condition of the tested service
  4. Test Plan - docu/TEST_PLAN.md

    • An artifact not only for humans but also for Agents
    • Maintained and continuously improved
  5. Reusable Prompt - .github/prompts/test-from-plan.prompt.md

    • Fast deployment of a repeatable procedure, improved through subsequent iterations
    • Analyze the generated tests and make iterative adjustments to the reusable prompt

Key features

  • Minimal Playwright + TypeScript setup for fast experimentation
  • Example test(s) in tests/example.spec.ts showing conventional test structure
  • Configured playwright.config.ts for cross-browser runs and parallel tests
  • Easy-to-extend structure to try new AI-driven test generation strategies

Getting started

Prerequisites

  • Node.js (recommended version 16 or later)
  • npm or Yarn
  • A running instance of the demo application (see upstream repository linked above)

Clone the repository

git clone https://github.com/your-org/AI-driven-testing.git
cd AI-driven-testing

Install dependencies

npm ci

Configuration

  • Open playwright.config.ts and confirm the baseURL value or override it using an environment variable or CLI flag if needed.

Running tests

Run the full test suite

npx playwright test

Run a single test file

npx playwright test tests/example.spec.ts

Run tests with a headed browser (visible UI)

npx playwright test --headed

Generating artifacts

  • Add --reporter=list or --reporter=html to the run command to change output format

Debugging and development tips

  • Use npx playwright test --debug or --trace to capture additional diagnostics
  • Check playwright.config.ts for device emulation, timeouts, and parallelization settings

Contributing

This project is intentionally small and meant for experimentation. If you'd like to contribute:

  • Fork the repository and open a branch for your changes
  • Add tests or improve the test runner and configuration
  • Keep changes minimal and well-documented in PR descriptions

Please follow standard Git practices and add meaningful test coverage for any bugfixes or features you introduce.

License

This repository follows the license in the root LICENSE file.

Acknowledgements

This project references and uses the demo application created by jaktestowac: https://github.com/jaktestowac/gad-gui-api-demo and is inspired by the webinar https://jaktestowac.pl/agents/.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published