Metadata-Version: 2.3
Name: test-automation-suite
Version: 2.0.0
Summary: Test automation suite for TUXEDO hard- and software.
Requires-Dist: dbus-fast>=4.0.0
Requires-Dist: jinja2>=3.1.6
Requires-Dist: junit-xml>=1.9
Requires-Dist: pillow>=12.1.1
Requires-Dist: pydantic>=2.12.5
Requires-Dist: pygelf>=0.4.3
Requires-Dist: pyyaml>=6.0.3
Requires-Python: >=3.11
Description-Content-Type: text/markdown

# Test Automation Suite (TAS)

Test automation suite for TUXEDO hard- and software.

## Configuration

### Auto Login

The user should be set to auto login, as many tests need to reboot.
Without auto login, these reboots will interrupt the testing process.

### WiFi

For testing wifi, put the ssid and password into reboot persisting environment variables called
- `TAS_WIFI_SSID`
- `TAS_WIFI_PASS`

## Usage

Do not run the TAS with `sudo`, as it will cause issues with screenshots.

Example for running a full testing procedure:
```sh
# Install dependencies, then start the tests immediately
test-automation-suite run test_security_kernel
# Install dependencies, then reboot, then start the tests
test-automation-suite run --prepare-only test_security_kernel && systemctl reboot
```

Example for running individual tests:
```sh
test-automation-suite check network
test-automation-suite benchmark edge_gaming
```

The log files and screenshots are stored in `$HOME/test-automation-suite/[TIMESTAMP]/`.

### Command Line Options

- `--prepare-only`: Dependencies will be installed and the auto start file created, but no tests will be run. This should **always** be passed when running the TAS from within the FAI.
- `--config path/to/config.yaml`: Override the configurations specified in [`config.py`](src/test_automation_suite/core/config.py).
- `--verbose`: Enables verbose logging.

## Design Decisions

### Checks and Benchmarks

The TAS automates two kinds of tasks: `Check`s and `Benchmark`s.

Checks simply test whether something is working as expected, returning either success or an error report.
New checks can be registered in the [`checks/__init__.py`](src/test_automation_suite/checks/__init__.py) file.

Benchmarks only fail when they can not run.
If they run, they are considered success and return the benchmark results without judging them.
New benchmarks can be registered in the [`benchmarks/__init__.py`](src/test_automation_suite/benchmarks/__init__.py) file.

### Defining Test Procedures

While individual checks and benchmarks can be triggered, the default approach to using the TAS is running one of the testing procedures defined under `/etc/test-automation-suite/`.

### Reboots, Persistence File and Auto Start

The TAS will save its state to `$HOME/test-automation-suite/state.json` before every task and reboot.
This allows the TAS to resume the test where it left of in case a test needs to reboot or fails critically.

Before rebooting, the TAS will also create a desktop file to automatically re-start itself afterwards.
