These are informal release notes for gabbi since version 1.0.0, highlighting major features and changes. For more detail see the commit logs on GitHub.
Corrected support for Python 3.12
Remove use of six. Thanks to Alexandre Detiste.
Pin to urllib3 <2.0.0 to avoid issues with changes in constructors.
Add timeout parameter per test, defaulting to 30 seconds.
Ensure stestr > 4.0.0 in test-requirements.txt
Handle SNI when
hostrequest header is any case.
Clear the PoolManager after each test to avoid running out of socket file descriptors.
-largument to gabbi-run to allow loading content and response handlers relative to the local directory.
Fix naming of tests when using pytest. This changes means that setting
test_loader_nameis now required when using pytest.
Support SNI in https requests when
hostrequest header is set.
Publish a docker container that runs gabbi-run with each tagged release.
JSONHandleris now more strict about how it detects that a body content is JSON, avoiding some errors where the content-type header suggests JSON but the content cannot be decoded as such.
Better error message when content cannot be decoded.
Addition of the
disable_response_handlertest setting for those cases when the test author has no control over the content-type header and it is wrong.
Allow substitutions in skip for more flexible skipping, notablly with
Better test name output when running with unittest and verbose.
Remove support for Python 3.5. Ensure testing support for 3.8, 3.9, and pypy3.
Adapt to new behavior in
Correct fixture start when using pytest.
If no content-type is provided with a response and verbose is on for responses, display the response body as if it were text.
Properly declare that gabbi 2.x is Python 3 only.
Correct management of response handler default fields.
Drop support for Python 2. If you need Python 2 support, use an older version.
fixtures. These two modules present several difficulties and their maintenance situation suggests those difficulties will not be resolved. Since Python 2 support is being removed, the need for the modules can be removed as well without losing functionality. “Inner fixtures” that use the
fixtures.Fixtureinterface should continue to work.
Add support for not validating certificates in
httpsrequests. Controlled by the
cert_validateattribute in individual tests and
--insecureargument to gabbi-run.
pytest 5.0.0in Python
>=3.5. For earlier versions of Python,
pytest<5.0.0will be used; the pytest project is dropping support for older versions of Python.
pytest<5.0.0until gabbi has solutions for the changes in
-qargument is added to gabbi-run to suppress output from the test runner.
Adjust loading of YAML to be ready for new release of PyYAML.
YAMLDiskLoadingJSONHandlerclass that allows test result data for
response_json_pathchecks to be loaded from YAML-on-disk.
Use JSONPath to select a portion of data-on-disk in
Restrict PyYAML to
Allow listing of tests with no host configured. When host is an empty string, tests can be listed (for discovery), but will be skipped on run.
$RESPONSEsubstitutions in the
datafield may be complex types (lists and dicts), not solely strings.
When the HTTP response begins with a bad status line, have BadStatusLine be raised from urllib3.
Allow substitutions in the key portion of request and response headers, not just the value.
Remove support for Python 3.3.
Make handling of fixture-level skips in pytest actually work.
use_prior_testis added to test Metadata.
Extensive cleanups in regular expression handling when constructing tests from YAML.
JSONPath handling gets two improvements:
now preserve numeric types instead of casting to a string. This is
useful when servers are expecting strong types and tests want to
send response data back to the server.
Better failure reporting when using gabbi-run with multiple files. Test names are based on the files and a summary of failed files is provided at the end of the report.
Effectively capture a failure in a fixture and report the traceback. Without this some test runners swallow the error and discovering problems when developing fixtures can be quite challenging.
Thanks to Samuel Fekete, tests can use the
to refer to any prior test in the same file, not just the one
immediately prior, when doing substitutions.
Filenames used to read data into tests using the
may now use pathnames relative to the YAML file. See Data.
When using pytest to load tests, a new
mechanism is available which avoids warnings produced in when using
a version of pytest greater than
When verbosely displaying request and response bodies that are JSON, pretty print for improved readability.
Allow gabbi-run to accept multiple filenames as command line arguments instead of reading tests from stdin.
Switch from response handlers to Content Handlers to allow more flexible processing of both response _and_ request bodies.
Add inner fixtures for per test fixtures, useful for output capturing.
test_loader_name arg to
gabbi.driver.build_tests() to override the prefix of the
pretty printed name of generated tests.
String values in JSONPath matches may be wrapped in
/.../` to be
treated as regular expressions.
Better documentation of how to run gabbi in a concurrent environment. Improved handling of pytest fixtures and test counts.
gabbi.driver.build_tests() to use instead of
gabbi.driver.build_tests() to force use
Correctly support IPV6 hosts.
Introduce support for loading and running tests with pytest.
Use urllib3 instead of httplib2 for driving HTTP requests.
Add sorting and filtering to JSONPath handling.
response_forbidden_headers to response expectations.
- name: a simple get
1.7.0 also makes it possible to:
- name: a simple get
Any upper case key is treated as a method.
1.4.0 and 1.5.0¶
Enhanced flexibility and colorization when setting tests to be verbose.
query_parameters key to request parameters.
The start of improvements and extensions to JSONPath
handling. In this case the addition of the
Vastly improved output and behavior in gabbi-run.
Version 1 was the first release with a commitment to a stable Test Format. Since then new fields have been added but have not been taken away.
The following people have contributed code to gabbi. Thanks to them. Thanks also to all the people who have made gabbi better by reporting issues and their successes and failures with using gabbi.
Josh Leeb-du Toit