{"id":9470,"date":"2023-08-23T07:52:12","date_gmt":"2023-08-23T07:52:12","guid":{"rendered":"https:\/\/lng-consultancy.com\/staging\/5474\/?p=9470"},"modified":"2023-08-23T07:52:12","modified_gmt":"2023-08-23T07:52:12","slug":"playwright-creating-a-bitbucket-pipeline-for-running-automated-tests","status":"publish","type":"post","link":"https:\/\/lng-consultancy.com\/staging\/5474\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\/","title":{"rendered":"Playwright &#8211; Creating a Bitbucket pipeline for running automated tests"},"content":{"rendered":"<p><b>Introduction<\/b><span style=\"font-weight: 400\">:<\/span><\/p>\n<p><span style=\"font-weight: 400\">In my recent project, I got a chance to build a test automation framework from scratch. Apparently one of the most important steps was to finalize which test automation tool would suit best for the target application. Since I already had experience with Selenium, I knew some of its limitations for web apps that use some front-end framework, so I decided to go with Playwright.<\/span><\/p>\n<p><span style=\"font-weight: 400\">After finalizing the tool, creating a test automation framework in Playwright and completing the API\/ UI test cases, my next task was to enable other team members (Automation engineers as well as manual QAs) to start running these test cases in a staging environment. The basic and not-so-preferred approach was to set it up on everyone\u2019s machine but obviously it had a lot of concerns such as technical capabilities of the person running test cases, manual intervention every time execution was required and no central place for reports. Hence, I decided to automate the execution of these test cases. In order to achieve this, I decided to first create a separate test automation pipeline in Bitbucket and then merge it with the existing dev pipeline.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">So, this article focuses on how to automate the execution of API or UI test cases so that they can run as soon as a new build is deployed. The end goal is to enable QAs to create their own pipeline and then finally this pipeline (or steps) can be merged into an existing pipeline (If exists) so that test cases execution is triggered automatically once the code is deployed to a specific environment. Few of the most valued benefits of automating execution of the test cases are:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">It increases project stakeholders\u2019 confidence.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Increases visibility about build stability.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">It helps in making decisions whether the latest build should go to production or not.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">In my current project, I added 34 test cases for now and it consists of a combination of API and UI test cases. As I mentioned earlier, I am using playwright with JavaScript and node as a runtime environment.<\/span><\/p>\n<p><b>Prerequisites<\/b><span style=\"font-weight: 400\">:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">A bitbucket account.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">A repository in bitbucket.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">A branch in that repository which triggers the pipeline and execution of test cases. This branch should have the latest and stable version of code (It should contain the test cases of course!)<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400\">After we have the prerequisites mentioned above, please follow these steps:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400\"><b>Add bitbucket-pipelines.yml<\/b><span style=\"font-weight: 400\"> file to the root of your project. This step is the most important one. Otherwise, the configured pipeline won\u2019t run as it always looks for an yml file in your checked in code. It looks like below.<\/span><\/li>\n<\/ol>\n<p><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter wp-image-9474 size-full\" src=\"https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/yml.png?resize=975%2C767&ssl=1\" alt=\"\" width=\"975\" height=\"767\" srcset=\"https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/yml.png?w=975&ssl=1 975w, https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/yml.png?resize=300%2C236&ssl=1 300w, https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/yml.png?resize=768%2C604&ssl=1 768w, https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/yml.png?resize=720%2C566&ssl=1 720w\" sizes=\"(max-width: 975px) 100vw, 975px\" \/><\/p>\n<ol>\n<li style=\"font-weight: 400\"><b>Add required steps to your yml file: <\/b><span style=\"font-weight: 400\">This means that we need to tell the pipeline what steps need to be run and in what sequence.<\/span>\n<ol>\n<li style=\"font-weight: 400\"><b>image:<\/b><span style=\"font-weight: 400\"> This tells the execution engine which docker image is to be used for spinning an environment. As I am using node for my framework which is an open source, cross platform JavaScript runtime environment, I used its official <\/span><b>node <\/b><span style=\"font-weight: 400\">docker image with a specific version.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Piplelines:<\/b>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">\u00a0<\/span><span style=\"font-weight: 400\">name: Specify the name of your pipeline. In my case I added \u201cPlaywright testcases\u201d.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">\u00a0<\/span><span style=\"font-weight: 400\">image: Since Bitbucket Pipelines can use public <\/span><a href=\"https:\/\/confluence.atlassian.com\/bitbucket\/use-docker-images-as-build-environments-792298897.html\"><span style=\"font-weight: 400\">Docker images as build environments<\/span><\/a><span style=\"font-weight: 400\">. So in this step, you would provide the latest playwright docker image where your actual test cases will run. By default, it uses Linux (Ubuntu) as an underlying operating system. Check out<\/span><a href=\"https:\/\/hub.docker.com\/\"> <span style=\"font-weight: 400\">https:\/\/hub.docker.com<\/span><\/a><span style=\"font-weight: 400\"> for the latest available images. They get updated every now and then. I used <\/span><b>mcr.microsoft.com\/playwright:v1.33.0-focal<\/b><span style=\"font-weight: 400\"> image.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">script: This is where we would mention the execution steps:<\/span>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">npm ci: I am using npm as a package manager, but any other package manager can be also used like yarn. <\/span><b>npm ci<\/b><span style=\"font-weight: 400\"> will install the dependencies that you require to run the test cases like node modules. This command will refer to the dependencies mentioned in your package.json and package-lock.json file. And it will make sure you\u2019re doing a clean install of your dependencies<\/span><span style=\"font-weight: 400\">.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Install chrome: Self-explanatory. Any other browser can be used but it should also be mentioned in your playwright.config file. Otherwise, the playwright cannot understand which browser is to be used for the execution of the test cases.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">npx playwright test: This is the command to run all the test cases. Keyword test will try to find any folder with name test in it and will pick up test cases automatically. Pipeline will fail if any of the test cases failed notifying us by email at any point, but failure percentage can also be configured. <\/span><b>Note:<\/b><span style=\"font-weight: 400\"> We used npx instead of npm because npx will run the packages without installing it.<\/span><\/li>\n<\/ol>\n<\/li>\n<li style=\"font-weight: 400\"><b>artifacts<\/b><span style=\"font-weight: 400\">: This is where you would add the path of the folder where reports, screenshots and logs are stored. The folder or files specified here will be available to download as artifacts once pipeline is executed successfully.<\/span><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<p><span style=\"font-weight: 400\">Below is my yml file that I added to my project:<\/span><\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" class=\"aligncenter wp-image-9478 size-large\" src=\"https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/Image20230808112453.png?resize=1024%2C579&ssl=1\" alt=\"\" width=\"1024\" height=\"579\" srcset=\"https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/Image20230808112453.png?resize=1024%2C579&ssl=1 1024w, https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/Image20230808112453.png?resize=300%2C170&ssl=1 300w, https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/Image20230808112453.png?resize=768%2C435&ssl=1 768w, https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/Image20230808112453.png?resize=1536%2C869&ssl=1 1536w, https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/Image20230808112453.png?resize=720%2C407&ssl=1 720w, https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/Image20230808112453.png?w=1755&ssl=1 1755w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<ol>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">Next step is to <\/span><b>commit your yml<\/b><span style=\"font-weight: 400\"> to your repository.<\/span><\/li>\n<li style=\"font-weight: 400\"><b>Enable pipeline feature<\/b><span style=\"font-weight: 400\"> from your repository (Sometimes this feature does not appear due to limited permissions) when enabled, bitbucket will automatically start running the pipeline as soon as a new check-in is made in the branch.<\/span><\/li>\n<li style=\"font-weight: 400\"><span style=\"font-weight: 400\">If everything is set up correctly and considering your test cases also pass, it would look like this:<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\"><img data-recalc-dims=\"1\" decoding=\"async\" class=\"aligncenter wp-image-9477 size-large\" src=\"https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/SuccessfullPipeline.png?resize=1024%2C135&ssl=1\" alt=\"\" width=\"1024\" height=\"135\" srcset=\"https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/SuccessfullPipeline.png?resize=1024%2C135&ssl=1 1024w, https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/SuccessfullPipeline.png?resize=300%2C39&ssl=1 300w, https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/SuccessfullPipeline.png?resize=768%2C101&ssl=1 768w, https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/SuccessfullPipeline.png?resize=720%2C95&ssl=1 720w, https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/SuccessfullPipeline.png?w=1446&ssl=1 1446w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><br \/>\n<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">If you go inside any pipeline, it will show all the logs for individual steps on the right hand side. You can click to view details about every step.<\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0\u00a0 <img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-9473 size-full\" src=\"https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/pipelineDetail.png?resize=975%2C290&ssl=1\" alt=\"\" width=\"975\" height=\"290\" srcset=\"https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/pipelineDetail.png?w=975&ssl=1 975w, https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/pipelineDetail.png?resize=300%2C89&ssl=1 300w, https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/pipelineDetail.png?resize=768%2C228&ssl=1 768w, https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/pipelineDetail.png?resize=720%2C214&ssl=1 720w\" sizes=\"(max-width: 975px) 100vw, 975px\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400\">\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">In order to understand it a bit better and to see how all pieces fall into place, I created this below diagram which explains the whole structure of the pipeline.<\/span><\/p>\n<p><span style=\"font-weight: 400\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-9471 size-full\" src=\"https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/ArchDiagram.png?resize=975%2C581&ssl=1\" alt=\"\" width=\"975\" height=\"581\" srcset=\"https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/ArchDiagram.png?w=975&ssl=1 975w, https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/ArchDiagram.png?resize=300%2C179&ssl=1 300w, https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/ArchDiagram.png?resize=768%2C458&ssl=1 768w, https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/ArchDiagram.png?resize=720%2C429&ssl=1 720w\" sizes=\"(max-width: 975px) 100vw, 975px\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400\">And that\u2019s it! By now, you should have your pipeline ready. Cheers!<\/span><\/p>\n<p>\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: In my recent project, I got a chance to build a test automation framework from scratch. Apparently one of the most important steps was to finalize which test automation tool would suit best for the target application. Since I already had experience with Selenium, I knew some of its limitations for web apps that [&hellip;]<\/p>\n","protected":false},"author":33,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"nf_dc_page":"","om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[131],"tags":[],"class_list":["post-9470","post","type-post","status-publish","format-standard","hentry","category-software-testing"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Playwright - Creating a Bitbucket pipeline for running automated tests - L&amp;G Consultancy<\/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:\/\/lng-consultancy.com\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Playwright - Creating a Bitbucket pipeline for running automated tests - L&amp;G Consultancy\" \/>\n<meta property=\"og:description\" content=\"Introduction: In my recent project, I got a chance to build a test automation framework from scratch. Apparently one of the most important steps was to finalize which test automation tool would suit best for the target application. Since I already had experience with Selenium, I knew some of its limitations for web apps that [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/lng-consultancy.com\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\/\" \/>\n<meta property=\"og:site_name\" content=\"L&amp;G Consultancy\" \/>\n<meta property=\"article:published_time\" content=\"2023-08-23T07:52:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/lng-consultancy.com\/wp-content\/uploads\/2023\/08\/yml.png\" \/>\n<meta name=\"author\" content=\"Ravneet Kaur\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ravneet Kaur\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/lng-consultancy.com\\\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/lng-consultancy.com\\\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\\\/\"},\"author\":{\"name\":\"Ravneet Kaur\",\"@id\":\"http:\\\/\\\/sh024.global.temp.domains\\\/~landgcon\\\/#\\\/schema\\\/person\\\/48f4da6ee2acd1b68666378f14118caa\"},\"headline\":\"Playwright &#8211; Creating a Bitbucket pipeline for running automated tests\",\"datePublished\":\"2023-08-23T07:52:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/lng-consultancy.com\\\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\\\/\"},\"wordCount\":976,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/lng-consultancy.com\\\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/lng-consultancy.com\\\/staging\\\/5474\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/yml.png\",\"articleSection\":[\"Software Testing\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/lng-consultancy.com\\\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/lng-consultancy.com\\\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\\\/\",\"url\":\"https:\\\/\\\/lng-consultancy.com\\\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\\\/\",\"name\":\"Playwright - Creating a Bitbucket pipeline for running automated tests - L&amp;G Consultancy\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/sh024.global.temp.domains\\\/~landgcon\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/lng-consultancy.com\\\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/lng-consultancy.com\\\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/lng-consultancy.com\\\/staging\\\/5474\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/yml.png\",\"datePublished\":\"2023-08-23T07:52:12+00:00\",\"author\":{\"@id\":\"http:\\\/\\\/sh024.global.temp.domains\\\/~landgcon\\\/#\\\/schema\\\/person\\\/48f4da6ee2acd1b68666378f14118caa\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/lng-consultancy.com\\\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/lng-consultancy.com\\\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/lng-consultancy.com\\\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/lng-consultancy.com\\\/staging\\\/5474\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/yml.png?fit=975%2C767&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/lng-consultancy.com\\\/staging\\\/5474\\\/wp-content\\\/uploads\\\/2023\\\/08\\\/yml.png?fit=975%2C767&ssl=1\",\"width\":975,\"height\":767},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/lng-consultancy.com\\\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/lng-consultancy.com\\\/staging\\\/5474\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Playwright &#8211; Creating a Bitbucket pipeline for running automated tests\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\\\/\\\/sh024.global.temp.domains\\\/~landgcon\\\/#website\",\"url\":\"http:\\\/\\\/sh024.global.temp.domains\\\/~landgcon\\\/\",\"name\":\"L&amp;G Consultancy\",\"description\":\"Your Technology Partner\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\\\/\\\/sh024.global.temp.domains\\\/~landgcon\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"http:\\\/\\\/sh024.global.temp.domains\\\/~landgcon\\\/#\\\/schema\\\/person\\\/48f4da6ee2acd1b68666378f14118caa\",\"name\":\"Ravneet Kaur\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6d325b2636ba60ddaf4e087e5806000cba35a6d947c450cce7dd6d260aabe0a5?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6d325b2636ba60ddaf4e087e5806000cba35a6d947c450cce7dd6d260aabe0a5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6d325b2636ba60ddaf4e087e5806000cba35a6d947c450cce7dd6d260aabe0a5?s=96&d=mm&r=g\",\"caption\":\"Ravneet Kaur\"},\"url\":\"https:\\\/\\\/lng-consultancy.com\\\/staging\\\/5474\\\/author\\\/ravneetkaur\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Playwright - Creating a Bitbucket pipeline for running automated tests - L&amp;G Consultancy","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:\/\/lng-consultancy.com\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\/","og_locale":"en_US","og_type":"article","og_title":"Playwright - Creating a Bitbucket pipeline for running automated tests - L&amp;G Consultancy","og_description":"Introduction: In my recent project, I got a chance to build a test automation framework from scratch. Apparently one of the most important steps was to finalize which test automation tool would suit best for the target application. Since I already had experience with Selenium, I knew some of its limitations for web apps that [&hellip;]","og_url":"https:\/\/lng-consultancy.com\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\/","og_site_name":"L&amp;G Consultancy","article_published_time":"2023-08-23T07:52:12+00:00","og_image":[{"url":"https:\/\/lng-consultancy.com\/wp-content\/uploads\/2023\/08\/yml.png","type":"","width":"","height":""}],"author":"Ravneet Kaur","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Ravneet Kaur","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/lng-consultancy.com\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\/#article","isPartOf":{"@id":"https:\/\/lng-consultancy.com\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\/"},"author":{"name":"Ravneet Kaur","@id":"http:\/\/sh024.global.temp.domains\/~landgcon\/#\/schema\/person\/48f4da6ee2acd1b68666378f14118caa"},"headline":"Playwright &#8211; Creating a Bitbucket pipeline for running automated tests","datePublished":"2023-08-23T07:52:12+00:00","mainEntityOfPage":{"@id":"https:\/\/lng-consultancy.com\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\/"},"wordCount":976,"commentCount":0,"image":{"@id":"https:\/\/lng-consultancy.com\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\/#primaryimage"},"thumbnailUrl":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/yml.png","articleSection":["Software Testing"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/lng-consultancy.com\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/lng-consultancy.com\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\/","url":"https:\/\/lng-consultancy.com\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\/","name":"Playwright - Creating a Bitbucket pipeline for running automated tests - L&amp;G Consultancy","isPartOf":{"@id":"http:\/\/sh024.global.temp.domains\/~landgcon\/#website"},"primaryImageOfPage":{"@id":"https:\/\/lng-consultancy.com\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\/#primaryimage"},"image":{"@id":"https:\/\/lng-consultancy.com\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\/#primaryimage"},"thumbnailUrl":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/yml.png","datePublished":"2023-08-23T07:52:12+00:00","author":{"@id":"http:\/\/sh024.global.temp.domains\/~landgcon\/#\/schema\/person\/48f4da6ee2acd1b68666378f14118caa"},"breadcrumb":{"@id":"https:\/\/lng-consultancy.com\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/lng-consultancy.com\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/lng-consultancy.com\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\/#primaryimage","url":"https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/yml.png?fit=975%2C767&ssl=1","contentUrl":"https:\/\/i0.wp.com\/lng-consultancy.com\/staging\/5474\/wp-content\/uploads\/2023\/08\/yml.png?fit=975%2C767&ssl=1","width":975,"height":767},{"@type":"BreadcrumbList","@id":"https:\/\/lng-consultancy.com\/playwright-creating-a-bitbucket-pipeline-for-running-automated-tests\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/lng-consultancy.com\/staging\/5474\/"},{"@type":"ListItem","position":2,"name":"Playwright &#8211; Creating a Bitbucket pipeline for running automated tests"}]},{"@type":"WebSite","@id":"http:\/\/sh024.global.temp.domains\/~landgcon\/#website","url":"http:\/\/sh024.global.temp.domains\/~landgcon\/","name":"L&amp;G Consultancy","description":"Your Technology Partner","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/sh024.global.temp.domains\/~landgcon\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"http:\/\/sh024.global.temp.domains\/~landgcon\/#\/schema\/person\/48f4da6ee2acd1b68666378f14118caa","name":"Ravneet Kaur","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/6d325b2636ba60ddaf4e087e5806000cba35a6d947c450cce7dd6d260aabe0a5?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/6d325b2636ba60ddaf4e087e5806000cba35a6d947c450cce7dd6d260aabe0a5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6d325b2636ba60ddaf4e087e5806000cba35a6d947c450cce7dd6d260aabe0a5?s=96&d=mm&r=g","caption":"Ravneet Kaur"},"url":"https:\/\/lng-consultancy.com\/staging\/5474\/author\/ravneetkaur\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/posts\/9470","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/users\/33"}],"replies":[{"embeddable":true,"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/comments?post=9470"}],"version-history":[{"count":5,"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/posts\/9470\/revisions"}],"predecessor-version":[{"id":9484,"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/posts\/9470\/revisions\/9484"}],"wp:attachment":[{"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/media?parent=9470"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/categories?post=9470"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lng-consultancy.com\/staging\/5474\/wp-json\/wp\/v2\/tags?post=9470"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}