Skip to content

Migrate smoke tests from bash to pytest-playwright #54

@bburda

Description

@bburda

Summary

Rewrite the bash smoke tests (smoke_lib.sh + per-demo test scripts) to Python using pytest-playwright's request context for API testing. This prepares the test infrastructure for adding browser-based E2E tests (#47) using the same framework.

Motivation

The bash smoke tests have grown to 350+ lines of shared library code with manual curl/jq parsing, poll loops, and CRUD lifecycle helpers. pytest-playwright provides:

  • @pytest.mark.parametrize to eliminate duplication across 3 demos
  • conftest.py fixtures for gateway connection, wait-for-gateway, entity resolution
  • Test isolation - each test independent
  • JUnit XML output for CI
  • requests-style API calls instead of curl + jq pipes
  • Natural path to browser E2E tests using the same framework

Python chosen over TypeScript because the demos repo is Python-heavy (launch files, anomaly_detector.py, fault_storm.py) and pytest-playwright gives full pytest fixture integration.

CI runner (ubuntu-24.04) has Python out of the box - just needs pip install pytest pytest-playwright.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions