{"id":11863,"date":"2019-12-23T22:22:14","date_gmt":"2019-12-24T03:22:14","guid":{"rendered":"https:\/\/qxf2.com\/blog\/?p=11863"},"modified":"2019-12-24T06:40:15","modified_gmt":"2019-12-24T11:40:15","slug":"how-to-run-qxf2-framework-tests-in-parallel-using-pytest-xdist-plugin","status":"publish","type":"post","link":"https:\/\/qxf2.com\/blog\/how-to-run-qxf2-framework-tests-in-parallel-using-pytest-xdist-plugin\/","title":{"rendered":"How to run Qxf2 framework tests in parallel using pytest-xdist plugin"},"content":{"rendered":"<div>In this blog, we will show you how easily Qxf2&#8217;s page object model framework can be run in parallel using<a href=\"https:\/\/qxf2.com\/blog\/xdist-run-tests-parallel-pytest\/\" target=\"_blank\" rel=\"noopener\"> pytest-xdist\u00a0 plugin.<\/a><\/div>\n<div><\/div>\n<div>As pre-requisite, Fork, and clone our <a href=\"https:\/\/github.com\/qxf2\/qxf2-page-object-model\" target=\"_blank\" rel=\"noopener\">framework<\/a>. Follow the Readme.md and set up the framework.<\/div>\n<div><\/div>\n<hr \/>\n<div>To run GUI tests in the framework parallel use the below command. As we have only 3 GUI tests I have passed 3 and marker used is GUI.<\/div>\n<div>\n<pre>pytest -n 3 -m GUI<\/pre>\n<\/div>\n<div><\/div>\n<div>The test will open 3 different browsers to execute tests in parallel.<\/div>\n<h4>Execution of the command can be seen in the video below.<\/h4>\n<div><\/div>\n<div>\n<div style=\"width: 640px;\" class=\"wp-video\"><!--[if lt IE 9]><script>document.createElement('video');<\/script><![endif]-->\n<video class=\"wp-video-shortcode\" id=\"video-11863-1\" width=\"640\" height=\"362\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2019\/12\/pytest_xdist_screen_recording.mp4?_=1\" \/><a href=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2019\/12\/pytest_xdist_screen_recording.mp4\">https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2019\/12\/pytest_xdist_screen_recording.mp4<\/a><\/video><\/div>\n<\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this blog, we will show you how easily Qxf2&#8217;s page object model framework can be run in parallel using pytest-xdist\u00a0 plugin. As pre-requisite, Fork, and clone our framework. Follow the Readme.md and set up the framework. To run GUI tests in the framework parallel use the below command. As we have only 3 GUI tests I have passed 3 [&hellip;]<\/p>\n","protected":false},"author":26,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[38,15,107],"tags":[],"class_list":["post-11863","post","type-post","status-publish","format-standard","hentry","category-automation","category-how-to","category-pytest"],"_links":{"self":[{"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/posts\/11863","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/users\/26"}],"replies":[{"embeddable":true,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/comments?post=11863"}],"version-history":[{"count":15,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/posts\/11863\/revisions"}],"predecessor-version":[{"id":12015,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/posts\/11863\/revisions\/12015"}],"wp:attachment":[{"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/media?parent=11863"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/categories?post=11863"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/tags?post=11863"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}