{"id":9998,"date":"2025-05-08T14:13:59","date_gmt":"2025-05-08T06:13:59","guid":{"rendered":"https:\/\/oneai.eu.org\/?p=9998"},"modified":"2025-05-08T14:13:59","modified_gmt":"2025-05-08T06:13:59","slug":"pytest-metadata-provides-access-to-test-session-metadata","status":"publish","type":"post","link":"https:\/\/oneai.eu.org\/?p=9998","title":{"rendered":"pytest-metadata &#8211; provides access to test session metadata"},"content":{"rendered":"<p>pytest-metadata is described as a plugin for pytest that provides access to test session metadata.\u00a0<br \/>That is such a humble description for such a massively useful plugin.\u00a0<br \/>If you're already using pytest-html, you have pytest-metadata already installed, as pytest-metadata is one of the dependencies for pytest-html.<br \/>However, pytest-metadata is very useful even on its own.<\/p>\n<p>Links:<\/p>\n<ul>\n<li><a href=\"https:\/\/pypi.org\/project\/pytest-metadata\/\">pytest-metadata<\/a> - The plugin we're talking about in this episode<\/li>\n<li><a href=\"https:\/\/pypi.python.org\/pypi\/pytest-base-url\/\">pytest-base-url<\/a> - Adds the base URL to the metadata.<\/li>\n<li><a href=\"https:\/\/pypi.python.org\/pypi\/pytest-html\/\">pytest-html<\/a> - Displays the metadata at the start of each report.\u00a0\n<ul>\n<li>See <a href=\"https:\/\/testandcode.com\/episodes\/pytest-html\">S2:E6: pytest-html - a plugin that generates HTML reports for test results<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"https:\/\/pypi.org\/project\/pytest-reporter-html1\/\">pytest-reporter-html1<\/a> - Presents metadata as part of the report.<\/li>\n<li><a href=\"https:\/\/pypi.python.org\/pypi\/pytest-selenium\/\">pytest-selenium<\/a> - Adds the driver, capabilities, and remote server to the metadata.<\/li>\n<\/ul>\n<p>If you've got other plugins that work well with pytest-metadata, please <a href=\"https:\/\/pythontest.com\/contact\/\">let me know<\/a>.<\/p>\n<p><\/p>\n<p><strong>Sponsored by:\u00a0<\/strong><\/p>\n<ul>\n<li><a href=\"https:\/\/porkbun.com\/TestAndCode25\"><strong>Porkbun<\/strong><\/a><strong> -- <\/strong>named the #1 domain registrar by USA Today from 2023 to 2025!<\/li>\n<li><a href=\"https:\/\/porkbun.com\/TestAndCode25\">Get a .app or.dev domain name for only $5.99 first year.<\/a><\/li>\n<\/ul>\n<p><strong>Help support the show AND learn pytest:\u00a0<\/strong><\/p>\n<ul>\n<li><a href=\"https:\/\/file+.vscode-resource.vscode-cdn.net\/Users\/brianokken\/projects\/test_and_code_notes\/new_ad.md\">The Complete pytest course<\/a> is now a bundle, with each part available separately.\n<ul>\n<li><a href=\"https:\/\/courses.pythontest.com\/pytest-primary-power\">pytest Primary Power<\/a> teaches the super powers of pytest that you need to learn to use pytest effectively.<\/li>\n<li><a href=\"https:\/\/courses.pythontest.com\/using-pytest-with-projects\">Using pytest with Projects<\/a> has lots of \"when you need it\" sections like debugging failed tests, mocking, testing strategy, and CI<\/li>\n<li>Then <a href=\"https:\/\/courses.pythontest.com\/pytest-booster-rockets\">pytest Booster Rockets<\/a> can help with advanced parametrization and building plugins.<\/li>\n<\/ul>\n<\/li>\n<li>Whether you need to get started with pytest today, or want to power up your pytest skills, <a href=\"https:\/\/courses.pythontest.com\/\">PythonTest<\/a> has a course for you.<\/li>\n<\/ul>\n<p><\/p>\n<p><strong><br \/>\n  <a href=\"https:\/\/www.patreon.com\/c\/testpodcast\" rel=\"payment\" title=\"\u2605 Support this podcast on Patreon \u2605\">\u2605 Support this podcast on Patreon \u2605<\/a><br \/>\n<\/strong><\/p>","protected":false},"excerpt":{"rendered":"<p>pytest-metadata is described as a plugin for pytest that provides access to test session metadata.\u00a0That is such a humble description for such a massively useful plugin.\u00a0If you&#8217;re already using pytest-html, you have pytest-metadata already installed, as pytest-metadata is one of the dependencies for pytest-html.However, pytest-metadata is very useful even on its own. Links: pytest-metadata &#8211; The plugin we&#8217;re talking about in this episode pytest-base-url &#8211; Adds the base URL to the metadata. pytest-html &#8211; Displays the metadata at the start of each report.\u00a0 See S2:E6: pytest-html &#8211; a plugin that generates HTML reports for test results pytest-reporter-html1 &#8211; Presents metadata as part of the report. pytest-selenium &#8211; Adds the driver, capabilities, and remote server to the metadata. If you&#8217;ve got other plugins that work well with pytest-metadata, please let me know. Sponsored by:\u00a0 Porkbun &#8212; named the #1 domain registrar by USA Today from 2023 to 2025! Get a .app or.dev domain name for only $5.99 first year. Help support the show AND learn pytest:\u00a0 The Complete pytest course is now a bundle, with each part available separately. pytest Primary Power teaches the super powers of pytest that you need to learn to use pytest effectively. Using pytest with Projects has lots of &#8220;when you need it&#8221; sections like debugging failed tests, mocking, testing strategy, and CI Then pytest Booster Rockets can help with advanced parametrization and building plugins. Whether you need to get started with pytest today, or want to power up your pytest skills, PythonTest has a course for you. \u2605 Support this podcast on Patreon \u2605<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","footnotes":""},"categories":[9,80],"tags":[],"class_list":["post-9998","post","type-post","status-publish","format-standard","hentry","category-9","category-80"],"_links":{"self":[{"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/9998","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9998"}],"version-history":[{"count":0,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=\/wp\/v2\/posts\/9998\/revisions"}],"wp:attachment":[{"href":"https:\/\/oneai.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9998"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9998"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oneai.eu.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9998"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}