Skip to main content

Python port of uzabase/playtest2

Project description

playtest2

PyPI - Version PyPI - Python Version


Table of Contents

Installation

Prerequisites

  • Gauge
  • uv (or pipx) for installing the playtest2 setup command

Setting up Gauge with playtest2

  1. Install playtest2 as a uv tool:
$ uv tool install playtest2

This provides the playtest2 setup command from an isolated environment outside your E2E test project.

  1. Create a virtual environment for your E2E test project:
$ cd /path/to/e2e/project
$ python -m venv .venv --upgrade-deps
$ source .venv/bin/activate
  1. Install playtest2 in the E2E virtual environment too:
(.venv) $ python -m pip install playtest2

The uv tool installation is used for generating Gauge configuration. The E2E virtual environment installation is used when Gauge runs the Python steps.

Usage

Gauge Configuration

  1. From the E2E test project root, run the uv tool-installed playtest2 setup to create python.properties in env/default/.
$ playtest2 setup

# If you have own step implementation directories
$ playtest2 setup your_step_impl1 your_step_impl2

[!TIP] Generated env/default/python.properties example

STEP_IMPL_DIR = /**absolute**/path/of/uv/tool/environment/lib/python3.x/site-packages/playtest2,your_step_impl1,your_step_impl2

[!IMPORTANT] Run playtest2 setup using the uv tool-installed command, not the command inside your E2E project's .venv. This keeps site-packages/playtest2 outside the E2E project directory and avoids Gauge Python loader issues with project-local .venv paths.

  1. Create playtest2.properties in env/default/.
SUT_BASE_URL = http://127.0.0.1:8000

Run gauge command in your E2E test project:

(.venv) $ gauge run specs

Spec example

# サンプルアプリのテスト

## GETリクエストが送れる

* パス"/"に
* メソッド"GET"で
* リクエストを送る

* レスポンスのボディが
* JSONのパス"$.message"に対応する値が
* 文字列の"Hello World"である

Development

Prerequisites: Hatch (Installation)

Lint

hatch fmt && hatch run types:check

Test

hatch test --randomize --doctest-modules

License

playtest2 is distributed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

playtest2-0.0.7.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

playtest2-0.0.7-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file playtest2-0.0.7.tar.gz.

File metadata

  • Download URL: playtest2-0.0.7.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for playtest2-0.0.7.tar.gz
Algorithm Hash digest
SHA256 b88feaf4ea25b031ae1fe3eb0b4f937156eb5369c6f58cd4676bd3c3eaff2893
MD5 4fe4d19b3805274f28d54793c2d06ec4
BLAKE2b-256 5d8a5131dfa6ca33eda75033d33800b36fcf5a49648fa093b5f7c00d4340c650

See more details on using hashes here.

Provenance

The following attestation bundles were made for playtest2-0.0.7.tar.gz:

Publisher: publish.yaml on ftnext/playtest2-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file playtest2-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: playtest2-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for playtest2-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 3d799dde79a19d4e5fdc9607e051d63b315a3ec8e47729e55321bf2b641edb68
MD5 bc013f8390f65fb39e2318886664cbfa
BLAKE2b-256 5fb6ca3cefe05e45facdf81d3c1a618f22810469f3d7043f5fae7ec464c43af3

See more details on using hashes here.

Provenance

The following attestation bundles were made for playtest2-0.0.7-py3-none-any.whl:

Publisher: publish.yaml on ftnext/playtest2-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page