Install TestScript
TestScript is a Python interpreter for .tscr programs. You write TestScript, not Python; Python 3.12+ must be installed to run the interpreter.
Experimental language
Version 0.2.0 is published on PyPI. Install testscript-lang; testscript on PyPI is an unrelated package. The language and its specification continue to evolve.
Install from PyPI
Create and activate a virtual environment, then install:
For Web automation, install "testscript-lang[playwright]" and run python -m playwright install chromium, or install "testscript-lang[selenium]" with Chrome available. API and core tests use only the base package.
The package installs the interpreter and CLI. Clone the repository separately for the examples below:
Install the source
Clone the repository as shown above, or download and extract its archive. Open a terminal in the testscript directory.
Activate .venv using the command for your OS, then:
You should see four passing results. Open testscript-results/report.html; JSON and JUnit XML are written alongside it.
Choose a browser engine
Start the local demo server in another terminal before running the Web or API examples:
Core/API use only the base package. Browser extras are optional. Browser downloads and drivers are not bundled into the Python wheel.
Install a built wheel
Keep examples separately: the wheel installs the interpreter and CLI, not this repository's example directory.