Metadata-Version: 2.4
Name: playtest2
Version: 0.0.2
Summary: Python port of uzabase/playtest2
Project-URL: Documentation, https://github.com/ftnext/playtest2-python#readme
Project-URL: Issues, https://github.com/ftnext/playtest2-python/issues
Project-URL: Source, https://github.com/ftnext/playtest2-python
Author-email: ftnext <takuyafjp+develop@gmail.com>
License-Expression: MIT
License-File: LICENSE.txt
Keywords: automation,gauge,gauge-python,testing
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Software Development :: Testing :: Acceptance
Requires-Python: >=3.9
Requires-Dist: getgauge
Requires-Dist: httpx
Requires-Dist: jsonpath-ng
Description-Content-Type: text/markdown

# playtest2

[![PyPI - Version](https://img.shields.io/pypi/v/playtest2.svg)](https://pypi.org/project/playtest2)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/playtest2.svg)](https://pypi.org/project/playtest2)

-----

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [License](#license)

## Installation

### Prerequisites

* [Gauge](https://docs.gauge.org/getting_started/installing-gauge)

### Setting up Gauge with playtest2

1. Create a new dedicated virtual environment for Gauge in a **separate** directory from your E2E test project:

```console
$ mkdir /path/to/gauge-project  # Specify your own path here
$ cd /path/to/gauge-project
$ python -m venv .venv --upgrade-deps
$ source .venv/bin/activate
```

2. Install playtest2 in the virtual environment:

```console
(.venv) $ python -m pip install playtest2
```

## Usage

### Gauge Configuration

Edit `python.properties` in `env/default/`.

```
STEP_IMPL_DIR = /**absolute**/path/of/gauge-project/.venv/lib/python3.x/site-packages/playtest2
```

Create `playtest2.properties` in `env/default/`.

```
SUT_BASE_URL = http://127.0.0.1:8000
```

On activating the virtual environment for Gauge, run `gauge` command in your E2E test project:

```console
(.venv) $ cd /path/to/e2e/project
(.venv) $ gauge run steps
```

### Spec example

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

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

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

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

## License

`playtest2` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
