{"id":3702,"date":"2020-05-11T07:00:00","date_gmt":"2020-05-11T06:00:00","guid":{"rendered":"https:\/\/www.diogonunes.com\/blog\/?p=3702"},"modified":"2020-05-15T14:22:43","modified_gmt":"2020-05-15T13:22:43","slug":"how-to-build-docker-image-cypress-tests","status":"publish","type":"post","link":"https:\/\/www.diogonunes.com\/blog\/how-to-build-docker-image-cypress-tests\/","title":{"rendered":"How to build a Docker image ready to run Cypress tests"},"content":{"rendered":"<p><a href=\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/cypress-on-docker.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/cypress-on-docker.png?resize=580%2C236&#038;ssl=1\" alt=\"\" width=\"580\" height=\"236\" class=\"aligncenter size-large wp-image-3703\" srcset=\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/cypress-on-docker.png?resize=1024%2C417&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/cypress-on-docker.png?resize=400%2C163&amp;ssl=1 400w, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/cypress-on-docker.png?resize=768%2C313&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/cypress-on-docker.png?resize=1536%2C625&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/cypress-on-docker.png?resize=2048%2C833&amp;ssl=1 2048w, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/cypress-on-docker.png?resize=1200%2C488&amp;ssl=1 1200w, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/cypress-on-docker.png?w=1740&amp;ssl=1 1740w\" sizes=\"auto, (max-width: 580px) 100vw, 580px\" \/><\/a><\/p>\n<p>My team decided to build a Docker image that contained Cypress, dependencies and all our end-to-end (E2E) tests.<\/p>\n<p><!--more--><\/p>\n<p>That way, anyone could simply pull the image and with a single command it was ready to run tests. Also, the developers and the CI pipeline we both using the same image, which made our test results more coherent and easier to reproduce.<\/p>\n<p>This was our final Dockerfile:<\/p>\n<pre><code class=\"dockerfile\"># use the official Cypress image as base (keep this up to date)\nFROM cypress\/browsers:node13.6.0-chrome80-ff72\n\nRUN useradd -ms \/bin\/bash cypress\nRUN install -d -m 0755 -o cypress -g cypress \/app\nRUN chown cypress:cypress \/app\nWORKDIR \/app\n\nENV CYPRESS_CACHE_FOLDER=\"\/app\/.cypress\"\nENV CI=true # reduce Cypress logging\n\nUSER cypress\n\n# install dependencies\nCOPY package.json yarn.lock .\/\nRUN yarn install --frozen-lockfile\n# confirm that Cypress was installed correctly\nRUN npx cypress verify\n\n# copy files required by yarn tasks\nCOPY .eslintrc .prettierrc.yaml cypress.json .\/\n# copy reporter config, used to output JUnit XML\nCOPY reporter.config.json .\/\n# copy tests\nCOPY cypress cypress\n<\/code><\/pre>\n<p>After a whole year of writing and maintaining Cypress tests, I learned a lot and added several features on top of the default Cypress behaviour.<\/p>\n<p>So if you want to start writing Cypress tests, you don&#8217;t have to start from scratch like I did: check this <a href=\"https:\/\/github.com\/dialex\/cypress-sapling\">template repo<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>My team decided to build a Docker image that contained Cypress, dependencies and all our end-to-end (E2E) tests.<\/p>\n","protected":false},"author":1,"featured_media":3703,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[2],"tags":[29,74,31],"class_list":["post-3702","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech","tag-coding","tag-cypress","tag-tutorial"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to build a Docker image ready to run Cypress tests - The Geeky Gecko<\/title>\n<meta name=\"description\" content=\"Here you will find a dockerfile that will allow you to build a Docker image containing Cypress, your tests and any dependencies -- ready to run!\" \/>\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.diogonunes.com\/blog\/how-to-build-docker-image-cypress-tests\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to build a Docker image ready to run Cypress tests - The Geeky Gecko\" \/>\n<meta property=\"og:description\" content=\"Here you will find a dockerfile that will allow you to build a Docker image containing Cypress, your tests and any dependencies -- ready to run!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.diogonunes.com\/blog\/how-to-build-docker-image-cypress-tests\/\" \/>\n<meta property=\"og:site_name\" content=\"The Geeky Gecko\" \/>\n<meta property=\"article:published_time\" content=\"2020-05-11T06:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-05-15T13:22:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/cypress-on-docker.png?fit=2767%2C1126&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"2767\" \/>\n\t<meta property=\"og:image:height\" content=\"1126\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Diogo Nunes\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dialexnunes\" \/>\n<meta name=\"twitter:site\" content=\"@dialexnunes\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Diogo Nunes\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/how-to-build-docker-image-cypress-tests\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/how-to-build-docker-image-cypress-tests\/\"},\"author\":{\"name\":\"Diogo Nunes\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c\"},\"headline\":\"How to build a Docker image ready to run Cypress tests\",\"datePublished\":\"2020-05-11T06:00:00+00:00\",\"dateModified\":\"2020-05-15T13:22:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/how-to-build-docker-image-cypress-tests\/\"},\"wordCount\":127,\"publisher\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c\"},\"image\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/how-to-build-docker-image-cypress-tests\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/cypress-on-docker.png?fit=2767%2C1126&ssl=1\",\"keywords\":[\"coding\",\"cypress\",\"tutorial\"],\"articleSection\":[\"Technology\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/how-to-build-docker-image-cypress-tests\/\",\"url\":\"https:\/\/www.diogonunes.com\/blog\/how-to-build-docker-image-cypress-tests\/\",\"name\":\"How to build a Docker image ready to run Cypress tests - The Geeky Gecko\",\"isPartOf\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/how-to-build-docker-image-cypress-tests\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/how-to-build-docker-image-cypress-tests\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/cypress-on-docker.png?fit=2767%2C1126&ssl=1\",\"datePublished\":\"2020-05-11T06:00:00+00:00\",\"dateModified\":\"2020-05-15T13:22:43+00:00\",\"description\":\"Here you will find a dockerfile that will allow you to build a Docker image containing Cypress, your tests and any dependencies -- ready to run!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/how-to-build-docker-image-cypress-tests\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.diogonunes.com\/blog\/how-to-build-docker-image-cypress-tests\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/how-to-build-docker-image-cypress-tests\/#primaryimage\",\"url\":\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/cypress-on-docker.png?fit=2767%2C1126&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/cypress-on-docker.png?fit=2767%2C1126&ssl=1\",\"width\":2767,\"height\":1126},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/how-to-build-docker-image-cypress-tests\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.diogonunes.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to build a Docker image ready to run Cypress tests\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#website\",\"url\":\"https:\/\/www.diogonunes.com\/blog\/\",\"name\":\"The Geeky Gecko\",\"description\":\"The Geeky Gecko\",\"publisher\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.diogonunes.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c\",\"name\":\"Diogo Nunes\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2026\/04\/Geeky-Gecko-2026-v2.png?fit=799%2C799&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2026\/04\/Geeky-Gecko-2026-v2.png?fit=799%2C799&ssl=1\",\"width\":799,\"height\":799,\"caption\":\"Diogo Nunes\"},\"logo\":{\"@id\":\"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/www.diogonunes.com\",\"https:\/\/x.com\/dialexnunes\"],\"url\":\"https:\/\/www.diogonunes.com\/blog\/author\/diogo-nunes\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to build a Docker image ready to run Cypress tests - The Geeky Gecko","description":"Here you will find a dockerfile that will allow you to build a Docker image containing Cypress, your tests and any dependencies -- ready to run!","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.diogonunes.com\/blog\/how-to-build-docker-image-cypress-tests\/","og_locale":"en_US","og_type":"article","og_title":"How to build a Docker image ready to run Cypress tests - The Geeky Gecko","og_description":"Here you will find a dockerfile that will allow you to build a Docker image containing Cypress, your tests and any dependencies -- ready to run!","og_url":"https:\/\/www.diogonunes.com\/blog\/how-to-build-docker-image-cypress-tests\/","og_site_name":"The Geeky Gecko","article_published_time":"2020-05-11T06:00:00+00:00","article_modified_time":"2020-05-15T13:22:43+00:00","og_image":[{"width":2767,"height":1126,"url":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/cypress-on-docker.png?fit=2767%2C1126&ssl=1","type":"image\/png"}],"author":"Diogo Nunes","twitter_card":"summary_large_image","twitter_creator":"@dialexnunes","twitter_site":"@dialexnunes","twitter_misc":{"Written by":"Diogo Nunes","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.diogonunes.com\/blog\/how-to-build-docker-image-cypress-tests\/#article","isPartOf":{"@id":"https:\/\/www.diogonunes.com\/blog\/how-to-build-docker-image-cypress-tests\/"},"author":{"name":"Diogo Nunes","@id":"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c"},"headline":"How to build a Docker image ready to run Cypress tests","datePublished":"2020-05-11T06:00:00+00:00","dateModified":"2020-05-15T13:22:43+00:00","mainEntityOfPage":{"@id":"https:\/\/www.diogonunes.com\/blog\/how-to-build-docker-image-cypress-tests\/"},"wordCount":127,"publisher":{"@id":"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c"},"image":{"@id":"https:\/\/www.diogonunes.com\/blog\/how-to-build-docker-image-cypress-tests\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/cypress-on-docker.png?fit=2767%2C1126&ssl=1","keywords":["coding","cypress","tutorial"],"articleSection":["Technology"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.diogonunes.com\/blog\/how-to-build-docker-image-cypress-tests\/","url":"https:\/\/www.diogonunes.com\/blog\/how-to-build-docker-image-cypress-tests\/","name":"How to build a Docker image ready to run Cypress tests - The Geeky Gecko","isPartOf":{"@id":"https:\/\/www.diogonunes.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.diogonunes.com\/blog\/how-to-build-docker-image-cypress-tests\/#primaryimage"},"image":{"@id":"https:\/\/www.diogonunes.com\/blog\/how-to-build-docker-image-cypress-tests\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/cypress-on-docker.png?fit=2767%2C1126&ssl=1","datePublished":"2020-05-11T06:00:00+00:00","dateModified":"2020-05-15T13:22:43+00:00","description":"Here you will find a dockerfile that will allow you to build a Docker image containing Cypress, your tests and any dependencies -- ready to run!","breadcrumb":{"@id":"https:\/\/www.diogonunes.com\/blog\/how-to-build-docker-image-cypress-tests\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.diogonunes.com\/blog\/how-to-build-docker-image-cypress-tests\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.diogonunes.com\/blog\/how-to-build-docker-image-cypress-tests\/#primaryimage","url":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/cypress-on-docker.png?fit=2767%2C1126&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/cypress-on-docker.png?fit=2767%2C1126&ssl=1","width":2767,"height":1126},{"@type":"BreadcrumbList","@id":"https:\/\/www.diogonunes.com\/blog\/how-to-build-docker-image-cypress-tests\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.diogonunes.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to build a Docker image ready to run Cypress tests"}]},{"@type":"WebSite","@id":"https:\/\/www.diogonunes.com\/blog\/#website","url":"https:\/\/www.diogonunes.com\/blog\/","name":"The Geeky Gecko","description":"The Geeky Gecko","publisher":{"@id":"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.diogonunes.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/a6fa79b293f22912664654fcfbd2da0c","name":"Diogo Nunes","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2026\/04\/Geeky-Gecko-2026-v2.png?fit=799%2C799&ssl=1","contentUrl":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2026\/04\/Geeky-Gecko-2026-v2.png?fit=799%2C799&ssl=1","width":799,"height":799,"caption":"Diogo Nunes"},"logo":{"@id":"https:\/\/www.diogonunes.com\/blog\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/www.diogonunes.com","https:\/\/x.com\/dialexnunes"],"url":"https:\/\/www.diogonunes.com\/blog\/author\/diogo-nunes\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/cypress-on-docker.png?fit=2767%2C1126&ssl=1","jetpack-related-posts":[{"id":3709,"url":"https:\/\/www.diogonunes.com\/blog\/cypress-automation-template\/","url_meta":{"origin":3702,"position":0},"title":"Cypress Sapling (automation template)","author":"Diogo Nunes","date":"18 May, 2020","format":false,"excerpt":"No need to start with the seed \u2013 plant the sapling! Get it? Because \"Cypress\" is a tree... \ud83e\udd13 On my last project we chose Cypress to automate our E2E tests. During a year and a half we constantly tweaked and improved our test repository. We added more functionary on\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.diogonunes.com\/blog\/category\/tech\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/tzingtao-chow-J8oxnYHBpWM-unsplash-scaled.jpg?fit=960%2C1200&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/tzingtao-chow-J8oxnYHBpWM-unsplash-scaled.jpg?fit=960%2C1200&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/tzingtao-chow-J8oxnYHBpWM-unsplash-scaled.jpg?fit=960%2C1200&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/tzingtao-chow-J8oxnYHBpWM-unsplash-scaled.jpg?fit=960%2C1200&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":3978,"url":"https:\/\/www.diogonunes.com\/blog\/framework-review-cypress\/","url_meta":{"origin":3702,"position":1},"title":"Framework review: Cypress","author":"Diogo Nunes","date":"4 January, 2021","format":false,"excerpt":"Fast and reliable testing for anything that runs in a browser. It uses Javascript to make setting up, writing, running and debugging tests easy \u2014 for QAs and developers. \u2014 Official website Code Example of automation at GitHub. Use cases \ud83e\udd47 Automate end-to-end (E2E) tests using the UI or the\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.diogonunes.com\/blog\/category\/tech\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/09\/herbert-goetsch-vImJ5GYMMqQ-unsplash-1.jpg?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/09\/herbert-goetsch-vImJ5GYMMqQ-unsplash-1.jpg?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/09\/herbert-goetsch-vImJ5GYMMqQ-unsplash-1.jpg?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/09\/herbert-goetsch-vImJ5GYMMqQ-unsplash-1.jpg?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/09\/herbert-goetsch-vImJ5GYMMqQ-unsplash-1.jpg?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3717,"url":"https:\/\/www.diogonunes.com\/blog\/cypress-pageobjects-inheritance-js\/","url_meta":{"origin":3702,"position":2},"title":"Cypress: PageObjects using inheritance","author":"Diogo Nunes","date":"1 June, 2020","format":false,"excerpt":"Scenario: Your web site is deployed on several countries. The behaviour of the page you want to test (e.g. sign up) is mostly the same across countries, however some business rules change per country. You are using the PageObjects pattern to encapsulate the details of each page. You want to\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.diogonunes.com\/blog\/category\/tech\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/68747470733a2f2f65726c616e67656e776c6164696d69722e66696c65732e776f726470726573732e636f6d2f323031352f30352f6d6174726a6f7363686b612d332e6a7067.jpeg?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/68747470733a2f2f65726c616e67656e776c6164696d69722e66696c65732e776f726470726573732e636f6d2f323031352f30352f6d6174726a6f7363686b612d332e6a7067.jpeg?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/68747470733a2f2f65726c616e67656e776c6164696d69722e66696c65732e776f726470726573732e636f6d2f323031352f30352f6d6174726a6f7363686b612d332e6a7067.jpeg?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/68747470733a2f2f65726c616e67656e776c6164696d69722e66696c65732e776f726470726573732e636f6d2f323031352f30352f6d6174726a6f7363686b612d332e6a7067.jpeg?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/68747470733a2f2f65726c616e67656e776c6164696d69722e66696c65732e776f726470726573732e636f6d2f323031352f30352f6d6174726a6f7363686b612d332e6a7067.jpeg?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3942,"url":"https:\/\/www.diogonunes.com\/blog\/cypress-tips-tricks\/","url_meta":{"origin":3702,"position":3},"title":"Tips &#038; Tricks for Cypress","author":"Diogo Nunes","date":"18 January, 2021","format":false,"excerpt":"\ud83c\udfc6 This post was featured in Software Testing Weekly, issue 55 This is a collection of simple and recurring scenarios when writing Cypress tests. For more complex recipes, check the official doc. Setup Abort cypress after first failed test Read a test file from fixtures Assertions Assert the text of\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.diogonunes.com\/blog\/category\/tech\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/08\/hunter-haley-s8OO2-t-HmQ-unsplash-scaled.jpg?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/08\/hunter-haley-s8OO2-t-HmQ-unsplash-scaled.jpg?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/08\/hunter-haley-s8OO2-t-HmQ-unsplash-scaled.jpg?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/08\/hunter-haley-s8OO2-t-HmQ-unsplash-scaled.jpg?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/08\/hunter-haley-s8OO2-t-HmQ-unsplash-scaled.jpg?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3685,"url":"https:\/\/www.diogonunes.com\/blog\/asserting-text-using-cypress\/","url_meta":{"origin":3702,"position":4},"title":"Asserting text using Cypress","author":"Diogo Nunes","date":"6 July, 2020","format":false,"excerpt":"If you're using Cypress, eventually you will have to assert some text. However, they provide at least three methods to do that, and from the documentation is not clear the difference between: .should(\"have.text\", \"expected text goes here\") .should(\"include.text\", \"expected text goes here\") .should(\"contain.text\", \"expected text goes here\") Do they all\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.diogonunes.com\/blog\/category\/tech\/"},"img":{"alt_text":"Photo by Sunyu on Unsplash","src":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/sunyu-jtjS4F8Q7sY-unsplash-scaled.jpg?fit=1200%2C798&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/sunyu-jtjS4F8Q7sY-unsplash-scaled.jpg?fit=1200%2C798&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/sunyu-jtjS4F8Q7sY-unsplash-scaled.jpg?fit=1200%2C798&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/sunyu-jtjS4F8Q7sY-unsplash-scaled.jpg?fit=1200%2C798&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/04\/sunyu-jtjS4F8Q7sY-unsplash-scaled.jpg?fit=1200%2C798&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3590,"url":"https:\/\/www.diogonunes.com\/blog\/cypress-pageobjects-vs-appactions\/","url_meta":{"origin":3702,"position":5},"title":"Cypress: PageObjects vs AppActions","author":"Diogo Nunes","date":"2 March, 2020","format":false,"excerpt":"I use Selenium to write most of my automated checks, and the PageObjects pattern is a must. My current team is using Cypress and, to my surprise, this test framework recommends AppActions instead of PageObjects. So I decided to benchmark both patterns using the following criteria: Can it abstract page\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/www.diogonunes.com\/blog\/category\/tech\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/02\/jason-dent-JVD3XPqjLaQ-unsplash.jpg?fit=1141%2C1200&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/02\/jason-dent-JVD3XPqjLaQ-unsplash.jpg?fit=1141%2C1200&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/02\/jason-dent-JVD3XPqjLaQ-unsplash.jpg?fit=1141%2C1200&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/02\/jason-dent-JVD3XPqjLaQ-unsplash.jpg?fit=1141%2C1200&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.diogonunes.com\/blog\/wp-content\/uploads\/2020\/02\/jason-dent-JVD3XPqjLaQ-unsplash.jpg?fit=1141%2C1200&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/posts\/3702","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/comments?post=3702"}],"version-history":[{"count":3,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/posts\/3702\/revisions"}],"predecessor-version":[{"id":3706,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/posts\/3702\/revisions\/3706"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/media\/3703"}],"wp:attachment":[{"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/media?parent=3702"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/categories?post=3702"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.diogonunes.com\/blog\/wp-json\/wp\/v2\/tags?post=3702"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}