๐Ÿ“ฆ ftnext / playtest2-python

Python port of https://github.com/uzabase/playtest2

โ˜… 5 stars โ‘‚ 0 forks ๐Ÿ‘ 5 watching โš–๏ธ MIT License
๐Ÿ“ฅ Clone https://github.com/ftnext/playtest2-python.git
HTTPS git clone https://github.com/ftnext/playtest2-python.git
SSH git clone git@github.com:ftnext/playtest2-python.git
CLI gh repo clone ftnext/playtest2-python
ftnext ftnext [docs] Refine with easier procedure d6d1c05 1 months ago ๐Ÿ“ History
๐Ÿ“‚ main View all commits โ†’
๐Ÿ“ .github
๐Ÿ“ example
๐Ÿ“ src
๐Ÿ“ tests
๐Ÿ“„ .gitignore
๐Ÿ“„ LICENSE.txt
๐Ÿ“„ pyproject.toml
๐Ÿ“„ README.md
๐Ÿ“„ README.md

playtest2

PyPI - Version PyPI - Python Version


Table of Contents

Installation

Prerequisites

Install playtest2

Install playtest2 in the virtual environment of your E2E test project:

(.venv) $ python -m pip install playtest2

Usage

Gauge Configuration

1) Run playtest2 setup to automatically create python.properties in env/default/.

(.venv) $ playtest2 setup

# If you have own step implementation directories
(.venv) $ playtest2 setup your_step_impl1 your_step_impl2

[!TIP]
Generated env/default/python.properties example
> STEP_IMPL_DIR = /**absolute**/path/of/your-project/.venv/lib/python3.x/site-packages/playtest2,your_step_impl1,your_step_impl2
>

2) 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.