{"id":5265,"date":"2023-12-03T08:19:34","date_gmt":"2023-12-03T13:19:34","guid":{"rendered":"https:\/\/blogs.sw.siemens.com\/polarion\/?p=5265"},"modified":"2026-03-26T05:43:33","modified_gmt":"2026-03-26T09:43:33","slug":"03-december-santas-elf-decided-to-improve-gifts-qa-by-using-the-new-rest-api","status":"publish","type":"post","link":"https:\/\/blogs.sw.siemens.com\/polarion\/03-december-santas-elf-decided-to-improve-gifts-qa-by-using-the-new-rest-api\/","title":{"rendered":"03. December: Santa\u2019s Elf decided to improve gifts QA by using the new REST API"},"content":{"rendered":"\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<iframe loading=\"lazy\" width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/jFrVYUwEHQE?si=RmlRVzGZaxMelF-h\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen><\/iframe>\n\n\n\n<p>The joy of Christmas often revolves around the spirit of giving and receiving gifts. While most people hope for a positive and delightful experience during this festive season, a defective present has the potential to dampen the holiday spirit. This year, Santa\u2019s Elf decided to improve gifts QA by using the new REST API endpoints available in Polarion 2310 to import automated CI \/ CD Test Results from Gitlab in Polarion!<br>&nbsp;<br>As part of his busy Pipeline, Santa added a .post job that creates a Test Run and imports xUnit Test results.<br>&nbsp;<br>update-polarion:<br>&nbsp; stage: .post<br>&nbsp; script:<br>&nbsp;&nbsp;&nbsp; &#8211; &#8216;curl -X POST &#8220;$POLARION_SERVER\/rest\/v1\/projects\/$POLARION_PROJECT\/testruns&#8221; -H&nbsp; &#8220;accept: application\/json&#8221; -H&nbsp; &#8220;Authorization: Bearer $POLARION_TOKEN&#8221; -H&nbsp; &#8220;Content-Type: application\/json&#8221; -d &#8220;{\\&#8221;data\\&#8221;:[{\\&#8221;type\\&#8221;:\\&#8221;testruns\\&#8221;,\\&#8221;attributes\\&#8221;:{\\&#8221;id\\&#8221;:\\&#8221;$CI_PROJECT_TITLE $CI_PIPELINE_ID\\&#8221;,\\&#8221;groupId\\&#8221;:\\&#8221;$CI_PROJECT_TITLE $CI_PIPELINE_ID\\&#8221;,\\&#8221;title\\&#8221;:\\&#8221;Title\\&#8221;,\\&#8221;type\\&#8221;:\\&#8221;automated\\&#8221;,\\&#8221;selectTestCasesBy\\&#8221;:\\&#8221;automatedProcess\\&#8221;,\\&#8221;useReportFromTemplate\\&#8221;:true},\\&#8221;relationships\\&#8221;:{\\&#8221;template\\&#8221;:{\\&#8221;data\\&#8221;:{\\&#8221;type\\&#8221;:\\&#8221;testruns\\&#8221;,\\&#8221;id\\&#8221;:\\&#8221;$POLARION_PROJECT\/xUnit Build Test\\&#8221;}}}}]}&#8221;&#8216;<br>&nbsp;<br>&nbsp;&nbsp;&nbsp; &#8211; &#8216;curl -X POST &#8220;$POLARION_SERVER\/rest\/v1\/projects\/$POLARION_PROJECT\/testruns\/$CI_PROJECT_TITLE%20$CI_PIPELINE_ID\/actions\/importXUnitTestResults&#8221; -H&nbsp; &#8220;accept: application\/json&#8221; -H&nbsp; &#8220;Authorization: Bearer $POLARION_TOKEN&#8221; -H&nbsp; &#8220;Content-Type: application\/octet-stream&#8221; -d @testresults.xml&#8217;<br>&nbsp;<br>Now, Santa can check the quality of presents and make sure Xmas will go smoothly for everybody!<br><br>Special Thanks to Stephane Vayssier! <\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\"><\/div>\n<\/div>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Special Thanks to Stephane Vayssier! <\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The joy of Christmas often revolves around the spirit of giving and receiving gifts. While most people hope for a&#8230;<\/p>\n","protected":false},"author":98384,"featured_media":5159,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spanish_translation":"","french_translation":"","german_translation":"","italian_translation":"","polish_translation":"","japanese_translation":"","chinese_translation":"","footnotes":""},"categories":[1],"tags":[],"industry":[],"product":[],"coauthors":[2336],"class_list":["post-5265","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"featured_image_url":"https:\/\/blogs.sw.siemens.com\/wp-content\/uploads\/sites\/4\/2023\/11\/Leonardo_Diffusion_XL_digital_Advent_Calendar_2-2.jpg","_links":{"self":[{"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/posts\/5265","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/users\/98384"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/comments?post=5265"}],"version-history":[{"count":5,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/posts\/5265\/revisions"}],"predecessor-version":[{"id":5601,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/posts\/5265\/revisions\/5601"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/media\/5159"}],"wp:attachment":[{"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/media?parent=5265"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/categories?post=5265"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/tags?post=5265"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/industry?post=5265"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/product?post=5265"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/coauthors?post=5265"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}