Skip to main content

A collection of PyHamcrest matchers to test Allure adapters for Python test frameworks

Project description

Allure Python Testing Utilities

Release Status Downloads

The package contains pyhamcrest matchers to assert the Allure results. They come in handy when you need to test an Allure adapter.

Allure Report logo


The matchers library

Here is the list of available matchers. Refer to https://github.com/allure-framework/allure-python/tree/master/tests for usage examples.

Module Matcher Check
container has_container The report contains a container that matches all the provided matchers.
container has_same_container The report contains a container that has all the specified tests as its children
container has_before The container has a before fixture with the specified name that matches all the provided matchers
container has_after The container has an after fixture with the specified name that matches all the provided matchers
content csv_equivalent The string (typically, an attachment's content) contains a CSV document that is equvalent to the provided one
label has_label The test contains a label with the specified name and (optionaly) the value
label has_severity The test has the specified severity label
label has_epic The test has the specified epic label
label has_feature The test has the specified feature label
label has_story The test has the specified story label
label has_tag The test has the specified tag label
label has_package The test has the specified package label
label has_suite The test has the specified suite label
label has_parent_suite The test has the specified parentSuite label
label has_sub_suite The test has the specified subSuite label
report has_test_case The report contains a test whose fullName ends, or name starts with the specified name. Additionally, the test must match all the provided matchers
report has_only_testcases Each test of the report matches at least one of the provided matchers
report has_only_n_test_cases Same as has_test_case but also checks if the number of matched tests is equal to the expected one
result has_title The test has an expected name
result has_description The test has a description that matches all the provided matchers
result has_description_html The test has a descriptionHtml that matches all the provided matchers
result has_step The test or step has a step with the specified name that matches all the provided matchers
result has_parameter The test or step has a parameter with the specified name whose value matches the provided matchers
result doesnt_have_parameter The test or step doesn't have a parameter with the specified name
result has_link The test has a link with the expected url, type (if provided) and name (if provided)
result has_issue_link The test has an issue link with the expected url and name (if provided)
result has_test_case_link The test has an issue link with the expected url and name (if provided)
result has_attachment The test or step has an attachment with the expected name and type.
result has_attachment_with_content The test or step has an attachment with the expected name and type. In addition, the content must match the provided matcher.
result with_id The test or container has the expected uuid
result with_status The test or step has the expected status
result has_status_details The status details of the test or step matches all the provided matchers
result with_message_contains The status details' message contains the provided text
result with_trace_contains The status details' trace contains the provided text
result with_excluded The parameter is excluded from the historyId calculation
result with_mode The parameter has the specified mode
result has_history_id The test has historyId

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

allure_python_commons_test-2.16.0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

allure_python_commons_test-2.16.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file allure_python_commons_test-2.16.0.tar.gz.

File metadata

File hashes

Hashes for allure_python_commons_test-2.16.0.tar.gz
Algorithm Hash digest
SHA256 a2d7c6c563676cc506b9072ab2ba0e39f8aa84242a7b6e5cdfd52be7b7a4da88
MD5 ee2d349210ad2e2a0ae36fab759dc69d
BLAKE2b-256 8fb26b0b372a9d01df48b2c4f895ed0f9b942c968ef1b2d23eec2257a49c2e01

See more details on using hashes here.

File details

Details for the file allure_python_commons_test-2.16.0-py3-none-any.whl.

File metadata

File hashes

Hashes for allure_python_commons_test-2.16.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d7e222ba6ecafb0ad92601f2ab5c82258be6cc2aa0a7d325136456d12479d333
MD5 f0e25a49c8b1a4c308f65d2b55d86831
BLAKE2b-256 683796c1baef354c93718d11941cc091d5e542419cf3e4adfc5819b6c70ac61d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page