diff --git a/pytest_reporter_html1/templates/html1/module.html b/pytest_reporter_html1/templates/html1/module.html index 3cbf523..3175096 100644 --- a/pytest_reporter_html1/templates/html1/module.html +++ b/pytest_reporter_html1/templates/html1/module.html @@ -31,6 +31,12 @@

{% block test_name scoped %}{{ test.item.name }}{% endbloc Duration {{ test.phases|sum(attribute='report.duration')|timedelta }} + {% for name, value in test.item.user_properties %} + + {{ name|title }} + {{ value|escape|urlize }} + + {% endfor %} {% set markers = test.item.iter_markers()|rejectattr('name', '==', 'parametrize')|list %} {% if markers %} diff --git a/tests/samples/sample_test_info.py b/tests/samples/sample_test_info.py index 9d68687..2e3ee3d 100644 --- a/tests/samples/sample_test_info.py +++ b/tests/samples/sample_test_info.py @@ -23,3 +23,10 @@ def test_with_documentation(): .. _`pytest`: https://github.com/pytest-dev/pytest """ pass + + +def test_user_properties(record_property): + record_property("string", "Some string value") + record_property("integer", 123) + record_property("xml", "Blink!") + record_property("url", "https://github.com/christiansandberg/pytest-reporter-html1")