Pytest-play

Latest version: v2.3.1

Safety actively analyzes 628936 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 5

2.1.1

------------------

- Nothing changed yet.

2.1.0

------------------

Features:

- support junit xml generation file with ``system-out`` element for
each test case execution (pytest ``--junit-xml`` option).
``system-out`` will tracked by default in junit report unless you use
the ``--capture=no`` or its alias ``-s``

- track ``_elapsed`` time for each executed command ``--junit-xml`` report
if ``system-out`` is enabled

- track ``pytest`` custom properties in ``--junit-xml`` report for monitoring
and measure what is important to you. For example you can track as key metric
the time of the time occurred between the end of the previous action and
the completion of the following. Basically you can track under the ``property_name``
`load_login` key the time occurred between the click on the submit button
and the end of the current command (e.g., click on the menu or text input
being able to receive text) using a machine interpretable format.

The ``property_name`` value elapsed time will be available as standard ``pytest-play``
variable so that you can make additional assertions

- after every command execution a ``pytest-play`` variable will be added/updated
reporting the elapsed time (accessible using ``variables['_elapsed']``).

So be aware that the ``_elapsed`` variable name should be considered as a special
variable and so you should not use this name for storing variables

- improve debug in case of failed assertions or errored commands. Logged variables
dump in standard logs and ``system-out`` reporting if available

- improve debuggability in case of assertion errors (log failing expression)

- added a new ``metrics`` provider that let you track custom metrics in conjunction
with ``--junit-xml`` option. You can track in a machine readable format response
times, dynamic custom expressions, time that occurs between different commands
(e.g., measure the time needed after a login to interact with the page, time before
an asynchronous update happens and so on). Under the ``metrics`` provider you'll
find the ``record_property``, ``record_elapsed``, ``record_elapsed_start`` and
``record_elapsed_stop`` commands

Documentation:

- minor documentation changes

- add more examples

2.0.2

------------------

Documentation:

- more examples

- fix documentation bug on README (example based on selenium with missing ``provider: selenium``)

2.0.1

------------------

Documentation:

- Mention davidemoro/pytest-play docker container in README.
You can use pytest-play with a docker command like that now
``docker run -i --rm -v $(pwd):/src davidemoro/pytest-play``

Bugfix:

- Fix error locking pipenv due to pytest-play requirement
constraint not existing (RestrictedPython>=4.0.b2 -> RestrictedPython>=4.0b2)

2.0.0

------------------

Breaking changes:

- Renamed fixture from `play_json` to `play` (5)

- Drop json support, adopt yaml only format for scenarios (5)

- Drop ``.ini`` file for metadata, if you need them you can add
a YAML document on top of the scenario ``.yml`` file. You no more
need multiple files for decorating your scenarios now (65)

- `play.execute` no more accepts raw data string), consumes a list of commands.
Introduced `play.execute_raw` accepting raw data string.

- `play.execute_command` accepts a Python dictionary only now (not a string)

- Selenium provider removed from ``pytest-play`` core, implemented on a
separate package ``play_selenium``. Starting from now you have to add
to your selenium commands ``provider: selenium``

- engine's ``parametrizer_class`` attribute no more available (
use ``parametrizer.Parametrizer`` by default now)

Bug fix:

- Fix invalid markup on PyPI (55)

- Fix invalid escape sequences (62).

Documentation and trivial changes:

- Add examples folder

1.4.2

------------------

- Configuration change on Github. Use the same branching policy adopted by
pytest (master becomes main branch, see 56)

- Fixed skipped test and added new tests (deselect scenarios with keyword
and marker expressions)

- Fix 58: you no more get a TypeError if you try to launch pytest-play
in autodiscovery mode

- Fix 55: restructured text lint on README.rst (bad visualization on pypi)

- Updated README (articles and talks links)

- Added a ``DeprecationWarning`` for `play_json` fixture.
pytest-play will be based on yaml instead of json in version >=2.0.0.
See https://github.com/pytest-dev/pytest-play/issues/5

Page 2 of 5

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.