beeware / beeware/toga

Add testbed support for Textual backend

Open
#2,663 0 comments 0 reactions 0 assignees View on GitHub
enhancement textual
Dominant language
Python
Stars
5.4k
Forks
829
Avg merge
15h 39m
Merged PRs (30d)
40

Description

### What is the problem or limitation you are having?

The textual backend is not currently tested by the testbed API. We should be performing automated GUI tests of the textual backend.

### Describe the solution you'd like

It should be possible to run `briefcase run --test` in the testbed folder and get a test and coverage report.

This should then be integrated into CI.

This will likely require a second testbed app, as Briefcase deploys to "windows/linux/macOS", and we're already using those platforms to perform GUI tests. Briefcase supports having multiple apps in a single project, so this will likely only require adding a new app configuration for the desktop platforms, and adding a `-a` argument wherever we're currently running testbed.

### Describe alternatives you've considered

There isn't really an alternative here - having a test suite is a hard requirement for the textual backend to become a serious Toga option.

### Additional context

The biggest complication is that textual takes over the console, so we lose progress and console output while running the test suite.

Textual has a [test mode](https://textual.textualize.io/guide/testing/) that might be useful.

Contributor guide

Open the contributing guide

Research direction

Start in the testbed folder and inspect how `briefcase run --test` is currently invoked for GUI tests. Review the Textual test mode documentation and the existing CI testbed configuration. Done means the Textual backend produces automated test and coverage reports through the testbed, with the new run integrated into CI.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ci-cd, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.