Changelog¶
2.3.1 (unreleased)¶
Bugfix:
- fix compatibility with pytest 4.6. Rif #86
Documentation:
- update media section (articles and talks)
2.3.0 (2019-04-05)¶
Features and improvements:
wait_untilandwait_until_notnow accept commands with nosub_commandsproperty- implement new
whilecommand in python provider (while expression is true)
2.2.2 (2019-03-29)¶
Minor changes:
- remove internal property parameter on engine
Bugfix:
- add compatibility with
pytest-repeat’s--countcommand line option
Documentation:
- mention how to generate dynamic values using
{! expr !}expressions (e.g., dynamic payloads in REST or MQTT without having to store variables when not needed)
2.2.1 (2019-03-19)¶
Minor changes:
- add
intandfloatbuiltins available in Python expressions - make python expressions more flexible for future improvements (internal change that doesn’t affect compatibility)
Bugfix:
- fix
--setup-planinvokation
Documentation:
- add more examples (bzt/Taurus and performance tests using pytest-play)
2.2.0 (2019-03-01)¶
statsdintegration (optional requirement) for advanced test metrics using statsd/graphite. If you install pytest play with the optional statsd support withpytest-play[statsd]you will get the additional dependencystatsdclient and you can use the same cli options defined by thepytest-statsdplugin (e.g.,--stats-d [--stats-prefix myproject --stats-host http://myserver.com --stats-port 3000]).Note well: despite the above cli options are the same defined by the
pytest-statsdplugin, at this time of writingpytest-statsdis not apytest-playdependency so you won’t get stats about number of failures, passing, etc but only stats tracked bypytest-play. If you need them you can installpytest-statsd(it plays well withpytest-play)
2.1.0 (2019-02-22)¶
Features:
support junit xml generation file with
system-outelement for each test case execution (pytest--junit-xmloption).system-outwill tracked by default in junit report unless you use the--capture=noor its alias-strack
_elapsedtime for each executed command--junit-xmlreport ifsystem-outis enabledtrack
pytestcustom properties in--junit-xmlreport 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 theproperty_nameload_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_namevalue elapsed time will be available as standardpytest-playvariable so that you can make additional assertionsafter every command execution a
pytest-playvariable will be added/updated reporting the elapsed time (accessible usingvariables['_elapsed']).So be aware that the
_elapsedvariable name should be considered as a special variable and so you should not use this name for storing variablesimprove debug in case of failed assertions or errored commands. Logged variables dump in standard logs and
system-outreporting if availableimprove debuggability in case of assertion errors (log failing expression)
added a new
metricsprovider that let you track custom metrics in conjunction with--junit-xmloption. 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 themetricsprovider you’ll find therecord_property,record_elapsed,record_elapsed_startandrecord_elapsed_stopcommands
Documentation:
- minor documentation changes
- add more examples
2.0.2 (2019-02-06)¶
Documentation:
- more examples
- fix documentation bug on README (example based on selenium with missing
provider: selenium)
2.0.1 (2019-01-30)¶
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 (2019-01-25)¶
Breaking changes:
- Renamed fixture from play_json to play (#5)
- Drop json support, adopt yaml only format for scenarios (#5)
- Drop
.inifile for metadata, if you need them you can add a YAML document on top of the scenario.ymlfile. 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-playcore, implemented on a separate packageplay_selenium. Starting from now you have to add to your selenium commandsprovider: selenium - engine’s
parametrizer_classattribute no more available ( useparametrizer.Parametrizerby 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 (2018-05-17)¶
- 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
DeprecationWarningfor 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
1.4.1 (2018-04-06)¶
- Documentation improvements
- Add bzt/Taurus/BlazeMeter compatibility
1.4.0 (2018-04-05)¶
Small documentation improvements
Now
test_XXX.jsonfiles are automatically collected and executedYou can run a test scenario using the pytest CLI
pytest test_YYY.jsonIntroduced json test scenario ini file with markers definition. For a given
test_YYY.jsonscenario you can add atest_YYY.iniini file:[pytest] markers = marker1 marker2
and filter scenarios using marker expressions
pytest -m marker1Enabled parametrization of arguments for a plain json scenario in scenario ini file:
[pytest] test_data = {"username": "foo"} {"username": "bar"}
and your json scenario will be executed twice
pytest-playloads some variables based on the contents of the optionalpytest-playsection in yourpytest-variablesfile now. So if your variables file contains the following values:pytest-play: foo: bar date_format: YYYYMMDD
you will be able to use expressions
$foo,$date_format,variables['foo']orvariables['date_format']
1.3.2 (2018-02-05)¶
- Add
sortedin python expressions
1.3.1 (2018-01-31)¶
- Add more tests
- Documentation update
- play_json fixture no more assumes that you have some pytest-variables settings. No more mandatory
- fix include scenario bug that occurs only on Windows (slash vs backslash and JSON decoding issues)
1.3.0 (2018-01-22)¶
- documentation improvements
- supports teardown callbacks
1.2.0 (2018-01-22)¶
implement python based commands in
pytest-playand deprecatesplay_python. So this feature is a drop-in replacement for theplay-pythonplugin.You should no more install
play_pythonsince now.update documentation
deprecate selenium commands (they will be implemented on a separate plugin and dropped in
pytest-play>= 2.0.0). All your previous scripts will work fine, this warning is just for people directly importing the provider for some reason.implement skip conditions. You can omit the execution of any command evaluating a Python based skip condition
1.1.0 (2018-01-16)¶
- Documentation updated (add new pytest play plugins)
- Support default payloads for command providers. Useful for HTTP authentication headers, common database settings
1.0.0 (2018-01-10)¶
- execute command accepts kwargs now
- execute command returns the command value now
- complete refactor of
includeprovider (no backwards compatibility) - add
play_json.get_file_contentsand removeddata_getterfixture (no backwards compatibility)
0.3.1 (2018-01-04)¶
- play engine now logs commands to be executed and errors
0.3.0 (2018-01-04)¶
- you are able to update variables when executing commands
- you can extend
pytest-playwith new pluggable commands coming from third party packages thanks to setuptools entrypoints
0.2.0 (2018-01-02)¶
no more open browser by default pytest-play is a generic test engine and it could be used for non UI tests too.
So there is no need to open the browser for non UI tests (eg: API tests)
0.1.0 (2017-12-22)¶
- implement reusable steps (include scenario)
- minor documentation changes
0.0.1 (2017-12-20)¶
- First release