{"id":5170,"date":"2020-07-23T08:18:16","date_gmt":"2020-07-23T06:18:16","guid":{"rendered":"https:\/\/www.almtoolbox.com\/blog\/?p=5170"},"modified":"2024-05-27T09:41:19","modified_gmt":"2024-05-27T07:41:19","slug":"pytest-xray","status":"publish","type":"post","link":"https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/","title":{"rendered":"PyTest-Xray"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">What is PyTest?<\/h3>\n\n\n\n<p>PyTest is a testing framework for writing tests using Python. You can write code to test APIs,&nbsp; databases, UIs etc.<br>PyTest can write the results to an XML file, which then can be used for further processing.<\/p>\n\n\n\n<p>More about PyTest in <a href=\"https:\/\/www.guru99.com\/pytest-tutorial.html\">https:\/\/www.guru99.com\/pytest-tutorial.html<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What is Xray <a href=\"https:\/\/marketplace.atlassian.com\/apps\/1211769\/xray-test-management-for-jira\">Test Management for Jira<\/a>?<\/h3>\n\n\n\n<p>Xray is a Jira plugin for the management of manual and automated tests. Xray creates a number of new issue types in Jira, like Test Plan, Test, and Test Execution.&nbsp;<br>A Test issue is used to define test cases of different types that can be executed multiple times using Test Execution issues.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">PyTest-Xray Integration<\/h3>\n\n\n\n<p>If we want to run tests using PyTest and see the results in Xray, how do we do it?<\/p>\n\n\n\n<p>We at ALM-Toolbox have learned how to use Xray API to import PyTest XMLs to Xray so that PyTest results are shown as Xray Tests.<\/p>\n\n\n\n<p>For example, we have created an XML file containing two tests, <em>test_file1_method1<\/em>, which failed, <em>&nbsp;<\/em>and <em>test_file1_method2<\/em>, which succeeded.&nbsp; We have imported that XML file to a Test Execution issue (SCOP-12), and now you can see below that issue with two Tests, SCOP-3 and SCOP-4:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"673\" height=\"723\" src=\"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/\/2020\/07\/PyTest-Xray.jpg\" alt=\"\" class=\"wp-image-5173 border\" srcset=\"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/2020\/07\/PyTest-Xray.jpg 673w, https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/2020\/07\/PyTest-Xray-279x300.jpg 279w\" sizes=\"auto, (max-width: 673px) 100vw, 673px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>What we can do for you?<\/strong><\/h3>\n\n\n\n<p>We can create scripts to automate the above process and to adapt them to suit your needs so that the results of your PyTest runs are written seamlessly to Xray.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Related links:<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>Our Jira website: <a href=\"https:\/\/almtoolbox.com\/il\/jira\">https:\/\/almtoolbox.col\/jira<\/a><\/li><li>Our Xray website: <a href=\"https:\/\/almtoolbox.com\/il\/xray\">https:\/\/almtoolbox.com\/il\/xray<\/a><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>What is PyTest? PyTest is a testing framework for writing tests using Python. You can write code to test APIs,&nbsp; databases, UIs etc.PyTest can write the results to an XML file, which then can be used for further processing. More about PyTest in https:\/\/www.guru99.com\/pytest-tutorial.html What is Xray Test Management for Jira? Xray is a Jira [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":5173,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[127,258,257],"tags":[256],"class_list":["post-5170","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jira","category-python","category-xray","tag-pytest"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>PyTest-Xray - ALMtoolbox News<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"PyTest-Xray - ALMtoolbox News\" \/>\n<meta property=\"og:description\" content=\"What is PyTest? PyTest is a testing framework for writing tests using Python. You can write code to test APIs,&nbsp; databases, UIs etc.PyTest can write the results to an XML file, which then can be used for further processing. More about PyTest in https:\/\/www.guru99.com\/pytest-tutorial.html What is Xray Test Management for Jira? Xray is a Jira [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/\" \/>\n<meta property=\"og:site_name\" content=\"ALMtoolbox News\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/almtoolbox.israel\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-23T06:18:16+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-27T07:41:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/\/2020\/07\/PyTest-Xray.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"673\" \/>\n\t<meta property=\"og:image:height\" content=\"723\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Noa Harel\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Noa Harel\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/\"},\"author\":{\"name\":\"Noa Harel\",\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/#\/schema\/person\/a7d03132957d034fc2fc5454501a204a\"},\"headline\":\"PyTest-Xray\",\"datePublished\":\"2020-07-23T06:18:16+00:00\",\"dateModified\":\"2024-05-27T07:41:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/\"},\"wordCount\":261,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/\/2020\/07\/PyTest-Xray.jpg\",\"keywords\":[\"PyTest\"],\"articleSection\":[\"JIRA\",\"Python\",\"Xray\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/\",\"url\":\"https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/\",\"name\":\"PyTest-Xray - ALMtoolbox News\",\"isPartOf\":{\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/\/2020\/07\/PyTest-Xray.jpg\",\"datePublished\":\"2020-07-23T06:18:16+00:00\",\"dateModified\":\"2024-05-27T07:41:19+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/#primaryimage\",\"url\":\"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/\/2020\/07\/PyTest-Xray.jpg\",\"contentUrl\":\"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/\/2020\/07\/PyTest-Xray.jpg\",\"width\":673,\"height\":723,\"caption\":\"PyTest-Xray\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.almtoolbox.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PyTest-Xray\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/#website\",\"url\":\"https:\/\/www.almtoolbox.com\/blog\/\",\"name\":\"ALMtoolbox News\",\"description\":\"All the news of ALMtoolbox\",\"publisher\":{\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.almtoolbox.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/#organization\",\"name\":\"ALMtoolbox\",\"url\":\"https:\/\/www.almtoolbox.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/\/2015\/10\/logo.png\",\"contentUrl\":\"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/\/2015\/10\/logo.png\",\"width\":410,\"height\":190,\"caption\":\"ALMtoolbox\"},\"image\":{\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/almtoolbox.israel\/\",\"https:\/\/www.linkedin.com\/company\/almtoolbox\/\",\"https:\/\/www.youtube.com\/user\/GoMidjets\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/#\/schema\/person\/a7d03132957d034fc2fc5454501a204a\",\"name\":\"Noa Harel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.almtoolbox.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3ac19cddc8dc6e7e817cf650b22399303e8b6dd585bc90e4606b28ec87ef1943?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3ac19cddc8dc6e7e817cf650b22399303e8b6dd585bc90e4606b28ec87ef1943?s=96&d=mm&r=g\",\"caption\":\"Noa Harel\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PyTest-Xray - ALMtoolbox News","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/","og_locale":"en_US","og_type":"article","og_title":"PyTest-Xray - ALMtoolbox News","og_description":"What is PyTest? PyTest is a testing framework for writing tests using Python. You can write code to test APIs,&nbsp; databases, UIs etc.PyTest can write the results to an XML file, which then can be used for further processing. More about PyTest in https:\/\/www.guru99.com\/pytest-tutorial.html What is Xray Test Management for Jira? Xray is a Jira [&hellip;]","og_url":"https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/","og_site_name":"ALMtoolbox News","article_publisher":"https:\/\/www.facebook.com\/almtoolbox.israel\/","article_published_time":"2020-07-23T06:18:16+00:00","article_modified_time":"2024-05-27T07:41:19+00:00","og_image":[{"width":673,"height":723,"url":"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/\/2020\/07\/PyTest-Xray.jpg","type":"image\/jpeg"}],"author":"Noa Harel","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Noa Harel","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/#article","isPartOf":{"@id":"https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/"},"author":{"name":"Noa Harel","@id":"https:\/\/www.almtoolbox.com\/blog\/#\/schema\/person\/a7d03132957d034fc2fc5454501a204a"},"headline":"PyTest-Xray","datePublished":"2020-07-23T06:18:16+00:00","dateModified":"2024-05-27T07:41:19+00:00","mainEntityOfPage":{"@id":"https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/"},"wordCount":261,"commentCount":0,"publisher":{"@id":"https:\/\/www.almtoolbox.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/#primaryimage"},"thumbnailUrl":"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/\/2020\/07\/PyTest-Xray.jpg","keywords":["PyTest"],"articleSection":["JIRA","Python","Xray"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/","url":"https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/","name":"PyTest-Xray - ALMtoolbox News","isPartOf":{"@id":"https:\/\/www.almtoolbox.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/#primaryimage"},"image":{"@id":"https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/#primaryimage"},"thumbnailUrl":"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/\/2020\/07\/PyTest-Xray.jpg","datePublished":"2020-07-23T06:18:16+00:00","dateModified":"2024-05-27T07:41:19+00:00","breadcrumb":{"@id":"https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/#primaryimage","url":"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/\/2020\/07\/PyTest-Xray.jpg","contentUrl":"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/\/2020\/07\/PyTest-Xray.jpg","width":673,"height":723,"caption":"PyTest-Xray"},{"@type":"BreadcrumbList","@id":"https:\/\/www.almtoolbox.com\/blog\/pytest-xray\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.almtoolbox.com\/blog\/"},{"@type":"ListItem","position":2,"name":"PyTest-Xray"}]},{"@type":"WebSite","@id":"https:\/\/www.almtoolbox.com\/blog\/#website","url":"https:\/\/www.almtoolbox.com\/blog\/","name":"ALMtoolbox News","description":"All the news of ALMtoolbox","publisher":{"@id":"https:\/\/www.almtoolbox.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.almtoolbox.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.almtoolbox.com\/blog\/#organization","name":"ALMtoolbox","url":"https:\/\/www.almtoolbox.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.almtoolbox.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/\/2015\/10\/logo.png","contentUrl":"https:\/\/www.almtoolbox.com\/blog\/wp-content\/uploads\/\/2015\/10\/logo.png","width":410,"height":190,"caption":"ALMtoolbox"},"image":{"@id":"https:\/\/www.almtoolbox.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/almtoolbox.israel\/","https:\/\/www.linkedin.com\/company\/almtoolbox\/","https:\/\/www.youtube.com\/user\/GoMidjets"]},{"@type":"Person","@id":"https:\/\/www.almtoolbox.com\/blog\/#\/schema\/person\/a7d03132957d034fc2fc5454501a204a","name":"Noa Harel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.almtoolbox.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3ac19cddc8dc6e7e817cf650b22399303e8b6dd585bc90e4606b28ec87ef1943?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3ac19cddc8dc6e7e817cf650b22399303e8b6dd585bc90e4606b28ec87ef1943?s=96&d=mm&r=g","caption":"Noa Harel"}}]}},"_links":{"self":[{"href":"https:\/\/www.almtoolbox.com\/blog\/wp-json\/wp\/v2\/posts\/5170","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.almtoolbox.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.almtoolbox.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.almtoolbox.com\/blog\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.almtoolbox.com\/blog\/wp-json\/wp\/v2\/comments?post=5170"}],"version-history":[{"count":10,"href":"https:\/\/www.almtoolbox.com\/blog\/wp-json\/wp\/v2\/posts\/5170\/revisions"}],"predecessor-version":[{"id":5184,"href":"https:\/\/www.almtoolbox.com\/blog\/wp-json\/wp\/v2\/posts\/5170\/revisions\/5184"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.almtoolbox.com\/blog\/wp-json\/wp\/v2\/media\/5173"}],"wp:attachment":[{"href":"https:\/\/www.almtoolbox.com\/blog\/wp-json\/wp\/v2\/media?parent=5170"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.almtoolbox.com\/blog\/wp-json\/wp\/v2\/categories?post=5170"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.almtoolbox.com\/blog\/wp-json\/wp\/v2\/tags?post=5170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}