Skip to content
This repository was archived by the owner on Jul 1, 2025. It is now read-only.

About

Code demo to accompany blogpost on PyShiny apps Validation/Quality Assurance/Testing

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

7 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyShiny E2E Testing with Playwright

This project demonstrates end-to-end (E2E) testing of a PyShiny application using Playwright. It aims to provide a practical example of how to automate testing for a Python-based web app, covering UI interactions and verifying functionality.

App Screenshot

Features

  • Demonstrates usage of Playwright with PyShiny.
  • Shows how to test easily available UI components like radio buttons.
  • And how to test components that require javascript to interact with, like sliders.
  • Includes examples of parameterized tests.

Getting Started

Prerequisites

  • Python 3.10+
  • Poetry for dependency management

Installation

  1. Clone the repository:
git clone https://github.com/Appsilon/pyshiny-e2e-playwright.git
cd pyshiny-e2e-playwright
  1. Install dependencies using Poetry:
poetry install
poetry run playwright install

These commands will create a virtual environment and install all required dependencies.

Running the Application

To start the PyShiny app:

poetry run shiny run app.py

Ensure the app is running at http://localhost:8000 (or your configured port).

Running Tests

To execute the E2E tests with Playwright:

poetry run pytest

Make sure your app is running before executing the tests as they require the app to be accessible.

Contact

Appsilon | appsilon.com

About

Code demo to accompany blogpost on PyShiny apps Validation/Quality Assurance/Testing

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

7 watching

Forks

Used by

Contributors

Languages