{"id":17909,"date":"2020-04-24T23:34:46","date_gmt":"2020-04-24T23:34:46","guid":{"rendered":"https:\/\/app14743.cloudwayssites.com\/?p=17909"},"modified":"2023-12-01T11:05:40","modified_gmt":"2023-12-01T19:05:40","slug":"ui-tests-in-cicd","status":"publish","type":"post","link":"https:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/","title":{"rendered":"UI Tests In CICD &#8211; Webinar Review"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>What does it take to add UI tests in your CICD pipelines?<\/p>\n\n\n\n<p>On March 12, <a href=\"https:\/\/www.linkedin.com\/in\/angiejones\/\">Angie Jones<\/a>, Senior Developer Advocate at <a href=\"https:\/\/app14743.cloudwayssites.com\/\">Applitools<\/a>, sat down with <a href=\"https:\/\/www.linkedin.com\/in\/jldeen\/\">Jessica Deen<\/a>, Senior Cloud Advocate for <a href=\"https:\/\/www.microsoft.com\/\">Microsoft<\/a>, held a webinar to discuss their approaches to automated testing and CI.&nbsp;<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>Angie loves to share her experiences with test automation. She shares her wealth of knowledge by speaking and teaching at software conferences all over the world, as well as writing tutorials and blog posts on <a href=\"https:\/\/angiejones.tech\/\">angiejones.tech<\/a>.<\/p>\n\n\n\n<p>As a Master Inventor, Angie is known for her innovative and out-of-the-box thinking style which has resulted in more than 25 patented inventions in the US and China. In her spare time, Angie volunteers with <a href=\"http:\/\/www.blackgirlscode.com\/\">Black Girls Code<\/a> to teach coding workshops to young girls in an effort to attract more women and minorities to tech.<\/p>\n\n\n\n<p>Jessica\u2019s work at Microsoft focuses on <a href=\"https:\/\/azure.microsoft.com\/en-us\/\">Azure<\/a>, <a href=\"https:\/\/www.docker.com\/resources\/what-container\">Containers<\/a>, OSS, and, of course, <a href=\"https:\/\/azure.microsoft.com\/en-us\/services\/devops\/\">DevOps<\/a>. Prior to joining Microsoft, she spent over a decade as an IT Consultant \/ Systems Administrator for various corporate and enterprise environments, catering to end users and IT professionals in the San Francisco Bay Area.<\/p>\n\n\n\n<p>Jessica holds two Microsoft Certifications (MCP, MSTS), 3 <a href=\"https:\/\/www.comptia.org\/home\">CompTIA<\/a> certifications (A+, Network+, and Security+), 4 Apple Certifications, and is a former 4-year Microsoft Most Valuable Professional for Windows and Devices for IT.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-the-talk\">The Talk<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"572\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-1-1024x572.png\" alt=\"\" class=\"wp-image-53362\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-1-1024x572.png 1024w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-1-300x168.png 300w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-1-768x429.png 768w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-1.png 1143w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Angie and Jessica broke the talk into three parts. First, Angie would discuss factors anyone should consider in creating automated tests. Second, Angie and Jessica would demonstrate writing UI tests for a test application.\u00a0 Finally, they would work on adding UI tests to a CI\/CD pipeline.<\/p>\n\n\n\n<p>Let\u2019s get into the meat of it.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-four-factors-to-consider-in-automated-tests\">Four Factors to Consider in Automated Tests<\/h2>\n\n\n\n<p>Angie first introduced the four factors you need to consider when creating test automation:<\/p>\n\n\n\n<ul>\n<li>Speed<\/li>\n\n\n\n<li>Reliability<\/li>\n\n\n\n<li>Quantity<\/li>\n\n\n\n<li>Maintenance<\/li>\n<\/ul>\n\n\n\n<p>She went through each in turn.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-speed\">Speed<\/h3>\n\n\n\n<p>Angie started off by making this point:<\/p>\n\n\n\n<p>\u201cWhen your team checks in code, they want to know if the check-in is good as quickly as possible. Meaning, not overnight, not hours from now.\u201d<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"574\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-2-1024x574.png\" alt=\"\" class=\"wp-image-53363\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-2-1024x574.png 1024w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-2-300x168.png 300w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-2-768x430.png 768w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-2.png 1144w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Angie points out that the talk covers UI tests primarily because lots of engineers struggle with&nbsp; UI testing. However, most of your check-in tests should not be UI tests because they run relatively slowly.&nbsp; From this she referred to the testing pyramid idea<\/p>\n\n\n\n<ul>\n<li>Most of your tests are unit tests &#8211; they run the fastest and should pass (especially if written by the same team that wrote the code)<\/li>\n\n\n\n<li>The next largest group is either system-level or business-layer tests. These tests don\u2019t require a user interface and show the functionality of units working together<\/li>\n\n\n\n<li>UI tests have the smallest number of total tests and should provide sufficient coverage to give you confidence in the user-level behavior.<\/li>\n<\/ul>\n\n\n\n<p>While UI tests take time, Angie points out that they are the only tests showing user experience of your application. So, don\u2019t skimp on UI tests.<\/p>\n\n\n\n<p>Having said that, when UI tests become part of your build, you need to make sure that your build time doesn\u2019t become bogged down with your UI tests. If all your conditions run over 15 minutes, that\u2019s way too long.&nbsp;<\/p>\n\n\n\n<p>To keep your testing to a minimum, Angie suggests running UI tests in parallel. To determine whether or not&nbsp; you need to split up one test into several parallel tests, give yourself a time limit. Let\u2019s say your build needs to complete in five minutes. Once you have a time limit, you can figure out how many parallel tests to set up. Like &#8211; with the 15 minute example, you might need to divide into three or more parallel tests.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-reliability\">Reliability<\/h3>\n\n\n\n<p>Next, you need reliable tests. Dependable. Consistent.\u00a0<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"575\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-3-1024x575.png\" alt=\"\" class=\"wp-image-53365\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-3-1024x575.png 1024w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-3-300x169.png 300w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-3-768x431.png 768w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-3.png 1143w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Unreliable tests interfere with CI processes. False negatives, said Angie, plague your team by making them waste time tracking down errors that don\u2019t exist. False positives, she continues, corrupt your product by permitting the check-in of defective code. And, false positives corrupt your team because bugs found later in the process interfere with team cohesion and team trust.&nbsp;<\/p>\n\n\n\n<p>For every successful CICD team, check-in success serves as the standard for writing quality code. You need reliable tests.<\/p>\n\n\n\n<p>How do you make your tests reliable?<\/p>\n\n\n\n<p>Angie has a suggestion that you make sure your app includes testability &#8211; which involves you leaning on your team. If you develop code, grab one of your test counterparts. If you test, sit down with your development team. Take the opportunity to discuss app testability.<\/p>\n\n\n\n<p>What makes an app testable? Identifiers. Any test runner uses identifiers to control the application. And, you can also use identifiers to validate outputs. So, a consistent regime to create identifiers helps you deliver consistency.&nbsp;<\/p>\n\n\n\n<p>If you lack identifiers, you get stuck with <a href=\"https:\/\/www.w3schools.com\/cssref\/css_selectors.asp\">CSS Selectors<\/a> or <a href=\"https:\/\/www.w3schools.com\/xml\/xpath_syntax.asp\">Xpath selectors<\/a>. Those can get messy &#8211; especially over time.<\/p>\n\n\n\n<p>Another way to make your app testable, Angie says, requires code that lets your test set initial conditions. If your UI tests depend on certain data values, then you need code to set those values prior to running those tests. Your developers need to create that code &#8211; via API or stored procedure &#8211; to ensure that the tests always begin with the proper conditions. This setup code can help you create the parallel tests that help your tests run more quickly.<\/p>\n\n\n\n<p>You can also use code to restore conditions after your tests run &#8211; leaving the app in the proper state for another test.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-quantity\">Quantity<\/h3>\n\n\n\n<p>Next, Angie said, you need to consider the number of tests you run.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"575\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-4-1024x575.png\" alt=\"\" class=\"wp-image-53366\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-4-1024x575.png 1024w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-4-300x168.png 300w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-4-768x431.png 768w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-4.png 1146w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>There is a common misconception that you need to automate every possible test condition you can think about, she said. People get into trouble trying to do this in practice.<\/p>\n\n\n\n<p>First, lots of tests increase your test time. And, as Angie said already, you don\u2019t want longer test times.<\/p>\n\n\n\n<p>Second, you end up with low value as well as high-value UI tests.&nbsp; Angie asks a question to help triage her tests:<\/p>\n\n\n\n<p>\u201cWhich test would I want to stop an integration or deployment? If I don&#8217;t want this test to stop a deployment, it doesn&#8217;t get automated. Or maybe it&#8217;s automated, but it&#8217;s run like once a day on some other cycle, not on my CICD.\u201d<\/p>\n\n\n\n<p>Angie also asks about the value of the functionality:<\/p>\n\n\n\n<p>\u201cWhich test exercises critical, core functionality? Those are the ones you want in there. Which tests cover areas of my application that have a history of failing? You&#8217;re nervous anytime you have to touch that code. You want some tests around that area, too.\u201d<\/p>\n\n\n\n<p>Lastly, Angie asks, which tests provide information already covered by other tests in the pipeline? So many people forget to think about total coverage. They create repetitive tests and leave them in the pipeline. And, as many developers know, a single check-in that triggers multiple failures can do so because it was a single code error that had been tested, and failed, multiple times.&nbsp;<\/p>\n\n\n\n<p>\u201cDon\u2019t be afraid to delete tests,\u201d Angie said. If it\u2019s redundant, get rid of it, and reduce your overall test code maintenance. She talked about how long it took her to become comfortable with deleting tests, but she appreciates the exercise now.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-maintenance\">Maintenance<\/h3>\n\n\n\n<p>\u201cTest code is code,\u201d Angie said. \u201cYou need to write it with the same rules, the same guidelines, the same care that you would any production code.\u201d<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"572\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-5-1024x572.png\" alt=\"\" class=\"wp-image-53367\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-5-1024x572.png 1024w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-5-300x168.png 300w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-5-768x429.png 768w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-5.png 1139w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Angie continued, saying that people ask, \u201c\u2018Well, Angie, why do I need to be so rigorous with my test code?\u2019\u201d<\/p>\n\n\n\n<p>Angie made the point that test code monitors production code. In your CICD development, the state of the build depends on test acceptance. If you build sloppy test code, you run the risk of false positives and false negatives.<\/p>\n\n\n\n<p>As your production code changes, your test code must change as well. The sloppier your test code, the more difficult time you will have in test maintenance.&nbsp;<\/p>\n\n\n\n<p>Writing test code with the same care as you write production gives you the best chance to keep your CICD pipeline in fast, consistent delivery. Alternatively, Angie said, if your test code stays a mess, you will have a tendency to avoid code maintenance. Avoiding maintenance will lead to untrustworthy builds.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-writing-ui-tests-introduction\">Writing UI Tests &#8211; Introduction<\/h2>\n\n\n\n<p>Next, Angie introduced the application she and Jessica were using for their coding demonstration. The app &#8211; a chat app, looks like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"491\" height=\"309\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-6.png\" alt=\"\" class=\"wp-image-53368\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-6.png 491w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-6-300x189.png 300w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-6-384x242.png 384w\" sizes=\"(max-width: 491px) 100vw, 491px\" \/><\/figure>\n\n\n\n<p>The welcome screen asks you to enter your username and click \u201cStart Chatting\u201d &#8211; the red button. Once you have done so, you\u2019re in the app. Going forward, you enter text and click the \u201cSend\u201d button and it shows up on a chat screen along with your username. Other users can do the same thing.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"573\" height=\"460\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-7.png\" alt=\"\" class=\"wp-image-53369\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-7.png 573w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-7-300x241.png 300w\" sizes=\"(max-width: 573px) 100vw, 573px\" \/><\/figure>\n\n\n\n<p>With this as a starting point, Angie and Jessica began the process of test writing.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-writing-ui-tests-coding-tests\">Writing UI Tests &#8211; Coding Tests<\/h2>\n\n\n\n<p>Angie and Jessica were on a LiveShare of code, which looked like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"622\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-8-1024x622.png\" alt=\"\" class=\"wp-image-53370\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-8-1024x622.png 1024w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-8-300x182.png 300w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-8-768x466.png 768w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-8.png 1156w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>From here, Angie started building her UI tests for the sign-in functionality. And, because she likes to code in Java, she coded in Java.&nbsp;<\/p>\n\n\n\n<p>All the objects she used were identified in the BaseTests class she inherited.<\/p>\n\n\n\n<p>Her full code to sign-in looked like this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">public class ChattyBotTests extends BaseTests {\n&nbsp;&nbsp;private ChatPage chatPage:\n\n&nbsp;&nbsp;@Test\n&nbsp;&nbsp;public void newSession(){\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;driver.get(appUrl);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;homePage.enterUsername(\"angie\");\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chatPage = homePage.clickStartChatting();\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;validateWindow();\n&nbsp;&nbsp;}<\/pre>\n\n\n\n<p>The test code gest the URL previously defined in the BaseTests class, fills in the username box with \u201cangie\u201d, and clicks the \u201cStart Chatting\u201d button. Finally, Angie added the validateWindow() method inherited from BaseTests, which uses Applitools visual testing to validate the new screen after the Start Chatting button has been clicked.<\/p>\n\n\n\n<p>Next, Angie wrote the code to enter a message, click send message, and validate that the message was on the screen.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&nbsp;&nbsp;@Test\n &nbsp;public void enterMessage(){\n &nbsp;&nbsp;&nbsp;&nbsp;chatPage.sendMessage(\"hello world\");\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;validateWindow():\n&nbsp;}<\/pre>\n\n\n\n<p>The inherited chatPage.sendMessage method both enters the text and clicks the Send Message button. validateWindow() again checks the screen using Applitools.<\/p>\n\n\n\n<p>Are these usable as-is for CICD? Nope.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-coding-pre-test-setup\">Coding Pre-Test Setup<\/h3>\n\n\n\n<p>If we want to run tests in parallel, these tests, as written, block parallel operation, since the enterMessage() depends on the newSession() being run previously.<\/p>\n\n\n\n<p>So solve this, Angie creates a pre-test startSession() that runs before all tests. It includes the first three lines of newSession() which go to the app URL, enter \u201cangie\u201d as the username, and click the \u201cStart Chatting\u201d button. Next, Angie modifies her newSession() test so all it does is the validation.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&nbsp;&nbsp;@Before\n&nbsp;&nbsp;public void startSession(){\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;driver.get(appUrl);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;homePage.enterUsername(\"angie\");\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chatPage = homePage.clickStartChatting();\n&nbsp;&nbsp;}\n\n&nbsp;&nbsp;@Test\n&nbsp;&nbsp;public void newSession(){\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;validateWindow();\n&nbsp;}<\/pre>\n\n\n\n<p>With this @Before setup, Angie can create independent tests.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-adding-multi-user-test\">Adding Multi-User Test<\/h3>\n\n\n\n<p>Finally, Angie added a multi-user test. In this test, she assumed the @Before gest run, and her new test looked like this:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&nbsp;&nbsp;@Test\n&nbsp;&nbsp;public void multiPersonChat(){\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/Angie sends a message\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chatPage.sendMessage(\u201chello world\u201d);\n\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/\/Jessica sends a message\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WindowUtils.openNewTab(driver, appUrl);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;homePage.enterUsername(\"jessica\");\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chatPage = homePage.clickStartChatting();\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;chatPage.sendMessage(\"goodbye world\");\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WindowUtils.switchToTab(driver, 1);\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;validateWindow();\n&nbsp;&nbsp;}<\/pre>\n\n\n\n<p>Here, user \u201cangie\u201d sends the message \u201chello world\u201d. Then, Angie codes the browser to:<\/p>\n\n\n\n<ul>\n<li>open a new tab for the app URL,&nbsp;<\/li>\n\n\n\n<li>create a new chat session for \u201cjessica\u201d<\/li>\n\n\n\n<li>has \u201cjessica\u201d send the message \u201cgoodbye world\u201d<\/li>\n\n\n\n<li>Switch back to the original tab<\/li>\n\n\n\n<li>Validate the window<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-integrating-ui-tests-into-cicd\">Integrating UI Tests Into CICD<\/h2>\n\n\n\n<p>Now, it was Jessica\u2019s turn to control the code.&nbsp;<\/p>\n\n\n\n<p>Before she got started coding, Jessica shared her screen from <a href=\"https:\/\/code.visualstudio.com\/\">Visual Studio Code<\/a>, to demonstrate the LiveShare feature of VS Code:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"625\" height=\"617\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-9.png\" alt=\"\" class=\"wp-image-53371\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-9.png 625w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-9-300x296.png 300w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-9-50x50.png 50w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><\/figure>\n\n\n\n<p>Angie and Jessica were working on the same file using <a href=\"https:\/\/visualstudio.microsoft.com\/services\/live-share\/\">LiveShare<\/a>. LiveShare highlights Angie\u2019s cursor on Jessica\u2019s screen.&nbsp;<\/p>\n\n\n\n<p>When Angie selects a block of text, the text gets highlighted on Jessica\u2019s screen.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"601\" height=\"625\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-10.png\" alt=\"\" class=\"wp-image-53372\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-10.png 601w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-10-288x300.png 288w\" sizes=\"(max-width: 601px) 100vw, 601px\" \/><\/figure>\n\n\n\n<p>This extension to Visual Studio Code makes it easy to collaborate on coding projects remotely. It\u2019s available for download on the <a href=\"https:\/\/marketplace.visualstudio.com\/vscode\">Visual Studio Code Marketplace<\/a>. It\u2019s great for pair programming when compared with remote screen share.<\/p>\n\n\n\n<p>To begin the discussion of using these tests in CICD, Jessica started describing the environment for running the tests from a developer perspective versus a CICD perspective. A developer might imagine running locally, with IntelliJ or command line opening up browser windows. In contrast, CICD needs to run unattended.&nbsp; So, we need to consider headless.<\/p>\n\n\n\n<p>Jessica showed how she coded for different environments in which she might run her tests.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"973\" height=\"475\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-11.png\" alt=\"\" class=\"wp-image-53373\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-11.png 973w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-11-300x146.png 300w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-11-768x375.png 768w\" sizes=\"(max-width: 973px) 100vw, 973px\" \/><\/figure>\n\n\n\n<p>Her code explains that the environment gets defined by a variable called runWhere, which can equal one of three values:<\/p>\n\n\n\n<ul>\n<li>local &#8211; uses a ChromeDriver<\/li>\n\n\n\n<li>pipeline &#8211; uses a dedicated build server and sets the options &#8211;headless and &#8211;no-sandbox for ChromeDriver (note: for Windows you add the option \u201c&#8211;disable-gui\u201d)<\/li>\n\n\n\n<li>container &#8211; instructs the driver to be a remote web driver based on the selenium hub remote URL and passes the &#8211;headless and &#8211;no-sandbox chromeOptions<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-testing-locally\">Testing Locally<\/h3>\n\n\n\n<p>First, Jessica needed to verify that the testa ran using the local settings.<\/p>\n\n\n\n<p>Jessica set the RUNWHERE variable to \u2018local\u2019 using the command<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">export RUNWHERE=local<\/pre>\n\n\n\n<p>She had already exported other settings, such as her Applitools API Key, so she can use Applitools.<\/p>\n\n\n\n<p>Since Jessica was already in her visual test folder, she run her standard maven command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mvn -f visual_tests\/pom.xml clean test<\/pre>\n\n\n\n<p>The tests ran as expected with no errors. The test opened up a local browser window and she showed the tests running.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-testing-pipeline\">Testing Pipeline<\/h3>\n\n\n\n<p>Next, Jessica set up to test her pipeline environment settings.&nbsp;<\/p>\n\n\n\n<p>She changed the RUNWHERE variable using the command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">export RUNWHERE=pipeline<\/pre>\n\n\n\n<p>Again, she executed the same maven tests<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mvn -f visual_tests\/pom.xml clean test<\/pre>\n\n\n\n<p>With the expectation that the tests would run as expected using her pipeline server, meaning that the tests run without opening a browser window on her local machine.<\/p>\n\n\n\n<p>This is important because whatever CICD pipeline you use &#8211; Azure DevOps, Github Actions, Travis CI, or any traditional non-container-based CICD system &#8211; will want to use this headless interaction with the browser that keeps the GUI from opening up and possibly throwing an error.<\/p>\n\n\n\n<p>Once these passed, Jessica moved on to testing with containers.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-testing-containers\">Testing Containers<\/h3>\n\n\n\n<p>Looking back, the container-based tests used a call to RemoteWebDriver, which in turns called selenium_hub:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"762\" height=\"140\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-12.png\" alt=\"\" class=\"wp-image-53374\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-12.png 762w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-12-300x55.png 300w\" sizes=\"(max-width: 762px) 100vw, 762px\" \/><\/figure>\n\n\n\n<p>Selenium_hub let Jessica spin up whatever browser she wanted.\u00a0 To specify what she wanted, she used a docker-compose file, docker-compose.yaml:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"739\" height=\"614\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-13.png\" alt=\"\" class=\"wp-image-53375\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-13.png 739w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-13-300x249.png 300w\" sizes=\"(max-width: 739px) 100vw, 739px\" \/><\/figure>\n\n\n\n<p>These container-based approaches align with the current use of cloud-native pipelines for CICD. Jessica noted you can use <a href=\"https:\/\/jenkins.io\/\">Jenkins<\/a>, <a href=\"https:\/\/jenkins-x.io\/\">Jenkins X<\/a> for <a href=\"https:\/\/kubernetes.io\/\">Kubernetes<\/a> native, and <a href=\"https:\/\/codefresh.io\/\">CodeFresh<\/a>, among others. Jessica decided to show CodeFresh. It\u2019s a CICD pipeline dedicated to Kubernetes and microservices.&nbsp; Every task runs in a container.<\/p>\n\n\n\n<p>Selenium_Hub let Jessica choose to run tests on both a chorme_node and a firefox_node in her container setup.&nbsp;&nbsp;<\/p>\n\n\n\n<p>She simply needed to modify her RUNWHERE variable<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">export RUNWHERE=container<\/pre>\n\n\n\n<p>However, before running her tests, she needed to spin up her <a href=\"https:\/\/docs.docker.com\/compose\/\">docker-compose<\/a> on her local system. And, because selenium_hub wasn\u2019t something that her system could identify by DNS at that moment (it was running on her local system), she ensured that the selenium_hub running locally would port forward onto her local system\u2019s 127.0.0.1 connection. Once she made these changes, and changed the container definition to use 127.0.0.1:4444, she was ready to run her maven pom.xml file.<\/p>\n\n\n\n<p>When the tests ran successfully, her local validation confirmed that her tests should run in her pipeline of choice.<\/p>\n\n\n\n<p>Jessica pointed out that CICD really comes down to a collection of tasks you would run manually.<\/p>\n\n\n\n<p>After that, Jessica said, we need to automate those tasks in a definition file. Typically, that\u2019s Yaml, unless you really like pain and choose <a href=\"https:\/\/www.jenkins.io\/doc\/pipeline\/steps\/workflow-cps\/\">Groovy<\/a> in Jenkins\u2026 (no judgement, she said).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-looking-at-azure-devops\">Looking at Azure DevOps<\/h2>\n\n\n\n<p>Next, Jessica did a quick look into Azure DevOps.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"905\" height=\"915\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-14.png\" alt=\"\" class=\"wp-image-53376\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-14.png 905w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-14-297x300.png 297w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-14-768x776.png 768w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-14-50x50.png 50w\" sizes=\"(max-width: 905px) 100vw, 905px\" \/><\/figure>\n\n\n\n<p>Inside Azure DevOps, Jessica showed that she had a number of pipelines already written, and she chose the one she had set aside for the project. This pipeline already had three separate stages:&nbsp;<\/p>\n\n\n\n<ul>\n<li>Build Stage<\/li>\n\n\n\n<li>Deploy to Dev<\/li>\n\n\n\n<li>Deploy to Prod<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"900\" height=\"721\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-15.png\" alt=\"\" class=\"wp-image-53377\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-15.png 900w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-15-300x240.png 300w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-15-768x615.png 768w\" sizes=\"(max-width: 900px) 100vw, 900px\" \/><\/figure>\n\n\n\n<p>Opening up the build stage shows all the steps contained just within that stage in its 74 seconds of runtime:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"903\" height=\"941\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-16.png\" alt=\"\" class=\"wp-image-53378\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-16.png 903w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-16-288x300.png 288w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-16-768x800.png 768w\" sizes=\"(max-width: 903px) 100vw, 903px\" \/><\/figure>\n\n\n\n<p>Jessica pointed out that this little ChattyBot application is running on a large cluster in Azure. It\u2019s running in Kubernetes, and it\u2019s deployed with <a href=\"https:\/\/helm.sh\/\">Helm<\/a>.&nbsp; The whole build stage includes:<\/p>\n\n\n\n<ul>\n<li>using <a href=\"https:\/\/jfrog.com\/\">JFrog<\/a> to package up all the maven dependencies and run the maven build<\/li>\n\n\n\n<li>jfrog xray to make sure that the dependencies don\u2019t result in security errors,&nbsp;<\/li>\n\n\n\n<li>Creating a helm chart and packaging that,<\/li>\n\n\n\n<li>Sending <a href=\"https:\/\/slack.com\/\">Slack<\/a> notifications<\/li>\n<\/ul>\n\n\n\n<p>This is a pretty extensive pipeline. Jessica wondered how hard it would be to integrate Angie\u2019s tests into an existing environment.<\/p>\n\n\n\n<p>But, because of the work Jessica had done to make Angie\u2019s tests ready for CICD, it was really easy to add those tests into the deploy workflow.<\/p>\n\n\n\n<p>First, Jessica reviewed the Deploy to Dev stage.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"905\" height=\"859\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-17.png\" alt=\"\" class=\"wp-image-53379\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-17.png 905w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-17-300x285.png 300w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-17-768x729.png 768w\" sizes=\"(max-width: 905px) 100vw, 905px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-adding-ui-tests-in-your-cicd-pipeline\">Adding UI Tests in Your CICD Pipeline<\/h2>\n\n\n\n<p>Now, Jessica started doing the work to add Angie\u2019s tests into her existing CICD pipeline.&nbsp;<\/p>\n\n\n\n<p>After the RUNWHERE=container tests finished successfully, Jessica went back into VS Code, where she started inspecting her azure-pipelines.yml file.<\/p>\n\n\n\n<p>Jessica made it clear that she wanted to add the tests everywhere that it made sense prior to promoting code to production:<\/p>\n\n\n\n<ul>\n<li>Dev<\/li>\n\n\n\n<li>Test<\/li>\n\n\n\n<li>QA<\/li>\n\n\n\n<li>Canary<\/li>\n<\/ul>\n\n\n\n<p>Jessica reinforced Angie\u2019s earlier points &#8211; these UI tests were critical and needed to pass. So, in order to include them in her pipeline, she needed to add them in an order that makes sense.<\/p>\n\n\n\n<p>In her Deploy to Dev pipeline, she added the following:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&nbsp;&nbsp;&nbsp;- bash:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;# run check to see when $(hostname) is available<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;attempt_counter=0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;max_attempts=5<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;until $(curl --output \/dev\/null --silent --head --fail https:\/\/\u201d$(hostname)\u201d\/); do<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if [ ${attempt_counter} -eq ${max_attempts} ]; then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;echo \u201cMax attempts reached\u201d<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit 1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fi<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf \u201c.\u201d<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;attempt_counter=$((attempt_counter+1))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sleep 20<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;done<br>&nbsp;&nbsp;&nbsp;displayName: HTTP Check<\/pre>\n\n\n\n<p>This script checks to see if the url $hostname is available and gives up if not available after five tries after sleeping 20 seconds. Each try it displays a \u201c.\u201d to show it is working. And, the name \u201cHTTP Check\u201d shows what it is doing.&nbsp;<\/p>\n\n\n\n<p>Now, to add the tests, Jessica needed to capture the environment variable declarations and then run the maven commands.&nbsp; And, as Jessica pointed out, this is where things can become challenging, especially when writing the tests from scratch, because people may not know the syntax.&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-editing-the-azure-pipelines-yml-in-azure-devops\">Editing the azure-pipelines.yml in Azure DevOps<\/h2>\n\n\n\n<p>Now, Jessica moved back from Visual Studio Code to Azure DevOps, where she could also edit an azure-pipelines.yml file directly in the browser.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"685\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-18-1024x685.png\" alt=\"\" class=\"wp-image-53380\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-18-1024x685.png 1024w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-18-300x201.png 300w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-18-768x513.png 768w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-18-462x308.png 462w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-18.png 1415w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>And, here, on the right side of her screen (I captured it separately) are tasks she can add to her pipeline. The ability to add tasks makes this process really, really simple and eliminates a lot of the errors that can happen when you code by hand.<\/p>\n\n\n\n<p>One of those tasks is an Applitools Build Task that she was able to add by installing an extension.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"395\" height=\"771\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-19.png\" alt=\"\" class=\"wp-image-53381\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-19.png 395w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-19-154x300.png 154w\" sizes=\"(max-width: 395px) 100vw, 395px\" \/><\/figure>\n\n\n\n<p>Just clicking on this Applitools Build Task adds it to the azure_pipelines.yml file.&nbsp;&nbsp;<\/p>\n\n\n\n<p>And, now Jessica wanted to add her maven build task &#8211; but instead of doing a bash script, she wanted to use the maven task in Azure DevOps. Finding the task and clicking on it shows all the options for the task.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"389\" height=\"811\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-20.png\" alt=\"\" class=\"wp-image-53382\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-20.png 389w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-20-144x300.png 144w\" sizes=\"(max-width: 389px) 100vw, 389px\" \/><\/figure>\n\n\n\n<p>The values are all defaults. Jessica changed the address for her pom.xml file to visual_tests\/pom.xml (the file location for the test file), set her goal as \u2018test\u2019 and options as \u2018clean test\u2019. She checked everything else, and since it looked okay, she clicked the \u201cAdd\u201d button.&nbsp; The following code got added to her azure-pipelines.yml file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&nbsp;&nbsp;- task: Maven<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;inputs:&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mavenPomFile: \u2018visual_tests\/pom.xml\u2019<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;goals: 'test'<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;options: 'clean test'<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;publishJUnitResults: true<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;testResultsFiles: '**\/surefire-report\/TEST-*.xml'<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;javaHomeOption: 'JDKVersion'<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mavenVersionOption: 'Default'<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mavenAuthenticationFeed: false<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;effectivePomSkip: false<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sonarQubeRunAnalysis: false<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-going-back-to-the-test-code\">Going Back To The Test Code<\/h2>\n\n\n\n<p>Jessica copied the Applitools Built Task and Maven task code file back into the azure-pipelines.yml file she was already editing in Visual Studio Code.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"625\" height=\"546\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-21.png\" alt=\"\" class=\"wp-image-53383\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-21.png 625w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-21-300x262.png 300w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><\/figure>\n\n\n\n<p>Then, she added the environment variables needed to run the tests.\u00a0 This included the Applitools API Key, which is a secret value from Applitools. In this case, Jessica defined this variable in Azure DevOps and could call it by the variable name.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"541\" height=\"937\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-22.png\" alt=\"\" class=\"wp-image-53384\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-22.png 541w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-22-173x300.png 173w\" sizes=\"(max-width: 541px) 100vw, 541px\" \/><\/figure>\n\n\n\n<p>Beyond the Applitools API Key, Jessica also set the RUNWHERE environment variable to \u2018pipeline\u2019 and the TEST_START_PAGE environment variable to the $hostname &#8211; same as used elsewhere in her code. All this made her tests dynamic.&nbsp;&nbsp;<\/p>\n\n\n\n<p>The added code reads:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;env:&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;APPLITOOLSAPIKEY: $APPLITOOLS_API_KEY<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RUNWHERE: pipeline<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TEST_START_PAGE: https:\/\/($hostname)\/<\/pre>\n\n\n\n<p>So, now, the tests are ready to commit.<\/p>\n\n\n\n<p>One thing Jessica noted is that LiveShare automatically adds the co-author\u2019s id to the commit whenever two people have jointly worked on code. It\u2019s a cool feature of LiveShare.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-verifying-that-ui-tests-work-in-cicd\">Verifying That UI Tests Work In CICD<\/h2>\n\n\n\n<p>So, now that the pipeline code had been added, Jessica wanted to demonstrate that the visual validation with Applitools worked as expected and found visual differences.&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<p>Jessica modified the ChattyBot application so that, instead of reading:<\/p>\n\n\n\n<p class=\"has-text-align-center\">\u201cHello, DevOps Days Madrid 2020!!!\u201d<\/p>\n\n\n\n<p>it read:<\/p>\n\n\n\n<p class=\"has-text-align-center\">\u201cHello, awesome webinar attendees!\u201d<\/p>\n\n\n\n<p>She saved the change, double-checked the test code, saw that everything looked right, and pushed the commit.<\/p>\n\n\n\n<p>This kicked off a new build in Azure DevOps. Jessica showed the build underway. She said that, with the visual difference, we expect the Deploy to Dev pipeline to fail.&nbsp;<\/p>\n\n\n\n<p>Since we had time to wait, she showed what happened on an earlier build that she had done just before the webinar. During that build, the Deploy to Dev passed. She was able to show how Azure DevOps seamlessly linked the Applitools dashboard &#8211; and, assuming you were logged in, you would see the dashboard screen just by clicking on the Applitools tab.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"580\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-23-1024x580.png\" alt=\"\" class=\"wp-image-53385\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-23-1024x580.png 1024w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-23-300x170.png 300w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-23-768x435.png 768w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-23.png 1167w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Here, the green boxes on the Status column show that the tests passed.<\/p>\n\n\n\n<p>Jessica drilled into the enterMessage test to show how the baseline and the new checkpoint compared (even though the comparison passed), just to show the Applitools UI.\u00a0\u00a0<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"459\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-24-1024x459.png\" alt=\"\" class=\"wp-image-53386\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-24-1024x459.png 1024w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-24-300x135.png 300w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-24-768x345.png 768w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-24.png 1342w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>As Jessica said, were any part of this test to be visually different due to color, sizing, text, or any other visual artifact, she could select the region and give it a thumbs-up to approve it as a change (and cause the test to pass), or give it a thumbs-down and inform the dev team of the unexpected difference.<\/p>\n\n\n\n<p>And, she has all this information from within her Azure DevOps build.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-if-i-don-t-use-azure-devops\">What If I Don\u2019t Use Azure DevOps?<\/h2>\n\n\n\n<p>Jessica said she gets this question all the time, because not everyone uses AzureDevOps.&nbsp;&nbsp;<\/p>\n\n\n\n<p>You could be using Azure DevOps, TeamCity CI, Octopus Deploy, Jenkins &#8211; it doesn\u2019t matter. You\u2019re still going to be organizing tasks that make sense.&nbsp; You will need to run an HTTP check to make sure your site is up and running.&nbsp; You will need to make sure you have access to your environment variables. And, then, finally, you will need to run your maven command-line test.&nbsp;&nbsp;<\/p>\n\n\n\n<p>Jessica jumped into Github Actions, where she had an existing pipeline, and she showed that her deploy step looked identical.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"826\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-25-1024x826.png\" alt=\"\" class=\"wp-image-53387\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-25-1024x826.png 1024w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-25-300x242.png 300w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-25-768x619.png 768w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-25.png 1065w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>It had an http check, an Applitools Build Task, and a call for Visual Testing. The only difference was that the Applitools Build Task included several lines of bash to export Applitools environment variables.<\/p>\n\n\n\n<p>The one extra step she added, just as a sanity check, was to set the JDK version.<\/p>\n\n\n\n<p>And, while she was in Github Actions, she referred back to the container scenario. She noted the challenges with spinning up Docker Compose and services.&nbsp; For this reason, when looking at container tests, she pointed to CodeFresh, which is Kubernetes-native.<\/p>\n\n\n\n<p>Inside her CodeFresh pipelines, everything runs in a container.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"516\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-26-1024x516.png\" alt=\"\" class=\"wp-image-53388\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-26-1024x516.png 1024w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-26-300x151.png 300w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-26-768x387.png 768w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-26-1536x775.png 1536w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-26.png 1600w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>As she pointed out, by running on CodeFresh, she didn\u2019t need a huge server to handle everything. Each container handled just what it needed to handle. Spinning up Docker Compose just requires docker. She needed just jFrog for her Artifactory image. Helm lint &#8211; again, just what she needed.<\/p>\n\n\n\n<p>The image above shows the pipelines before adding the visual tests. The below image shows the Deploy Dev pipeline with the same three additions.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"312\" height=\"569\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-27.png\" alt=\"\" class=\"wp-image-53389\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-27.png 312w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-27-164x300.png 164w\" sizes=\"(max-width: 312px) 100vw, 312px\" \/><\/figure>\n\n\n\n<p>There\u2019s the HTTP check, the Applitools Build Task, and Running Visual Tests.<\/p>\n\n\n\n<p>The only difference really is that the visual tests ran alongside services that were spinning up alongside the test.<\/p>\n\n\n\n<p>This is really easy to do in your codefresh.yml file, and the syntax looks a lot like Docker Compose.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-seeing-the-visual-failure\">Seeing the Visual Failure<\/h2>\n\n\n\n<p>Back in Azure DevOps, Jessica checked in on her Deploy to Dev step.\u00a0 She already knew there was a problem from her Slack notifications.\u00a0\u00a0<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"873\" height=\"335\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-28.png\" alt=\"\" class=\"wp-image-53390\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-28.png 873w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-28-300x115.png 300w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-28-768x295.png 768w\" sizes=\"(max-width: 873px) 100vw, 873px\" \/><\/figure>\n\n\n\n<p>The error report showed that the visual tests all failed.<\/p>\n\n\n\n<p>Clicking on the Applitools tab, she saw the following.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"883\" height=\"541\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-29.png\" alt=\"\" class=\"wp-image-53391\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-29.png 883w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-29-300x184.png 300w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-29-768x471.png 768w\" sizes=\"(max-width: 883px) 100vw, 883px\" \/><\/figure>\n\n\n\n<p>All three tests showed as unresolved.\u00a0 Clicking in to the multiPersonChat test, Jessica saw this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"462\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-30-1024x462.png\" alt=\"\" class=\"wp-image-53392\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-30-1024x462.png 1024w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-30-300x135.png 300w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-30-768x346.png 768w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-30.png 1351w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Sure enough, the text change from \u201cHello, DevOps Days Madrid 2020!!!\u201d to \u201cHello, awesome webinar attendees!\u201d caused a difference. We totally expected this difference, and we would find that this difference had also shown up in the other tests.<\/p>\n\n\n\n<p>The change may not have been a behavioral change expected in your tests, so you may or may not have thought to test for the \u201cHello\u2026\u201d text or check for its modification. Applitools makes it easy to capture any visual difference.<\/p>\n\n\n\n<p>Jessica didn\u2019t go through this, but one feature in Applitools is the ability to use Auto Maintenance. With Auto Maintenance, if Jessica had approved the change on this first page, she could automatically approve identical changes on other pages. So, if this was an intended change, it would go from \u201cUnresolved\u201d to \u201cPassed\u201d on all the pages where the change had been observed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-summing-up\">Summing Up<\/h2>\n\n\n\n<p>Jessica handed back presentation to Angie, who shared Jessica\u2019s link for code from the webinar:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-31-1024x576.png\" alt=\"\" class=\"wp-image-53393\" srcset=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-31-1024x576.png 1024w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-31-300x169.png 300w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-31-768x432.png 768w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-31-1536x864.png 1536w, https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2023\/12\/ui-tests-cicd-31.png 1600w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>All the code from Angie and Jessica\u2019s demo can be downloaded from:<\/p>\n\n\n\n<p><a href=\"https:\/\/aka.ms\/jldeen\/applitools-webinar\">https:\/\/aka.ms\/jldeen\/applitools-webinar<\/a><a href=\"\"><\/a><\/p>\n\n\n\n<p>Happy Testing!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-for-more-information\">For More Information<\/h2>\n\n\n\n<ul>\n<li>Read <a rel=\"noreferrer noopener\" href=\"https:\/\/app14743.cloudwayssites.com\/blog\/ask-your-peers-about-visual-ai\/\" target=\"_blank\">Ask 288 Of Your Peers About Visual AI<\/a><\/li>\n\n\n\n<li>Read <a rel=\"noreferrer noopener\" href=\"https:\/\/app14743.cloudwayssites.com\/blog\/fast-ui-testing\/\" target=\"_blank\">How I ran 100 UI tests in just 20 seconds<\/a><\/li>\n\n\n\n<li>Take Angie Jones&#8217;s course on <a style=\"background-color: rgb(255, 255, 255);\" href=\"https:\/\/app14743.cloudwayssites.com\/blog\/remove-blind-spots?utm_term=&amp;utm_source=web-referral&amp;utm_medium=blog&amp;utm_content=blog&amp;utm_campaign=&amp;utm_subgroup=\">Removing Visual Blind Spots<\/a><\/li>\n\n\n\n<li>Sign up for <a href=\"https:\/\/testautomationu.applitools.com\/?utm_term=&amp;utm_source=web-referral&amp;utm_medium=blog&amp;utm_content=tau&amp;utm_campaign=&amp;utm_subgroup=\">Test Automation University<\/a> and start taking classes<\/li>\n\n\n\n<li>Take Raja Rao&#8217;s Course on <a href=\"https:\/\/testautomationu.applitools.com\/modern-functional-testing?utm_term=&amp;utm_source=web-referral&amp;utm_medium=blog&amp;utm_content=tau&amp;utm_campaign=&amp;utm_subgroup=\">Modern Functional Testing<\/a><\/li>\n\n\n\n<li>Sign up for a <a href=\"https:\/\/app14743.cloudwayssites.com\/free?utm_term=&amp;utm_source=web-referral&amp;utm_medium=blog&amp;utm_content=free-account&amp;utm_campaign=&amp;utm_subgroup=\">free Applitools account<\/a><\/li>\n\n\n\n<li>Request an <a href=\"https:\/\/app14743.cloudwayssites.com\/request-demo?utm_term=&amp;utm_source=web-referral&amp;utm_medium=blog&amp;utm_content=request-a-demo&amp;utm_campaign=&amp;utm_subgroup=\">Applitools demo<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>What does it take to add UI tests in your CICD pipelines? On March 12, Angie Jones, Senior Developer Advocate at Applitools, sat down with Jessica Deen, Senior Cloud Advocate&#8230;<\/p>\n","protected":false},"author":77,"featured_media":17914,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[10004],"tags":[10199,12782,13943,12691,10052,10086,12956,10139,12688,12690,12686],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v24.5 (Yoast SEO v24.5) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>UI Tests In CICD - Webinar Review - AI-Powered End-to-End Testing | Applitools<\/title>\n<meta name=\"description\" content=\"Adding UI tests in CICD requires the right tools and the right strategies. Applitools&#039;s Angie Jones and Microsoft&#039;s Jessica Deen show you how to succeed.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"UI Tests In CICD - Webinar Review\" \/>\n<meta property=\"og:description\" content=\"What does it take to add UI tests in your CICD pipelines? On March 12, Angie Jones, Senior Developer Advocate at Applitools, sat down with Jessica Deen,\" \/>\n<meta property=\"og:url\" content=\"https:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/\" \/>\n<meta property=\"og:site_name\" content=\"AI-Powered End-to-End Testing | Applitools\" \/>\n<meta property=\"article:published_time\" content=\"2020-04-24T23:34:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-01T19:05:40+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-24-at-4.32.52-PM.png\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"469\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Michael Battat\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Michael Battat\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"25 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/\"},\"author\":{\"name\":\"Michael Battat\",\"@id\":\"https:\/\/app14743.cloudwayssites.com\/#\/schema\/person\/410b5710e19f580ee19ef348537bc347\"},\"headline\":\"UI Tests In CICD &#8211; Webinar Review\",\"datePublished\":\"2020-04-24T23:34:46+00:00\",\"dateModified\":\"2023-12-01T19:05:40+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/\"},\"wordCount\":4232,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/app14743.cloudwayssites.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-24-at-4.32.52-PM.png\",\"keywords\":[\"Angie Jones\",\"CICD\",\"CodeFresh\",\"Developers\",\"DevOps\",\"Jenkins\",\"Microsoft Azure\",\"Selenium\",\"Technical Leaders\",\"Test Engineers\",\"Visual Testing Strategies\"],\"articleSection\":[\"Advanced Topics\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/\",\"url\":\"https:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/\",\"name\":\"UI Tests In CICD - Webinar Review - AI-Powered End-to-End Testing | Applitools\",\"isPartOf\":{\"@id\":\"https:\/\/app14743.cloudwayssites.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-24-at-4.32.52-PM.png\",\"datePublished\":\"2020-04-24T23:34:46+00:00\",\"dateModified\":\"2023-12-01T19:05:40+00:00\",\"description\":\"Adding UI tests in CICD requires the right tools and the right strategies. Applitools's Angie Jones and Microsoft's Jessica Deen show you how to succeed.\",\"breadcrumb\":{\"@id\":\"https:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/#primaryimage\",\"url\":\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-24-at-4.32.52-PM.png\",\"contentUrl\":\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-24-at-4.32.52-PM.png\",\"width\":742,\"height\":469},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/app14743.cloudwayssites.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Advanced Topics\",\"item\":\"https:\/\/app14743.cloudwayssites.com\/blog\/category\/advanced-topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"UI Tests In CICD &#8211; Webinar Review\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/app14743.cloudwayssites.com\/#website\",\"url\":\"https:\/\/app14743.cloudwayssites.com\/\",\"name\":\"Applitools Visual AI\",\"description\":\"Applitools delivers full end-to-end test automation with AI infused at every step.\",\"publisher\":{\"@id\":\"https:\/\/app14743.cloudwayssites.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/app14743.cloudwayssites.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/app14743.cloudwayssites.com\/#organization\",\"name\":\"Applitools\",\"url\":\"https:\/\/app14743.cloudwayssites.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/app14743.cloudwayssites.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/03\/applitools.png\",\"contentUrl\":\"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/03\/applitools.png\",\"width\":156,\"height\":28,\"caption\":\"Applitools\"},\"image\":{\"@id\":\"https:\/\/app14743.cloudwayssites.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/app14743.cloudwayssites.com\/#\/schema\/person\/410b5710e19f580ee19ef348537bc347\",\"name\":\"Michael Battat\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/app14743.cloudwayssites.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b1216c259c20b8394687b91ff06f1af2?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b1216c259c20b8394687b91ff06f1af2?s=96&d=mm&r=g\",\"caption\":\"Michael Battat\"},\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/mdbattat\/\"],\"url\":\"https:\/\/app14743.cloudwayssites.com\/blog\/author\/michaelbattat\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"UI Tests In CICD - Webinar Review - AI-Powered End-to-End Testing | Applitools","description":"Adding UI tests in CICD requires the right tools and the right strategies. Applitools's Angie Jones and Microsoft's Jessica Deen show you how to succeed.","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:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/","og_locale":"en_US","og_type":"article","og_title":"UI Tests In CICD - Webinar Review","og_description":"What does it take to add UI tests in your CICD pipelines? On March 12, Angie Jones, Senior Developer Advocate at Applitools, sat down with Jessica Deen,","og_url":"https:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/","og_site_name":"AI-Powered End-to-End Testing | Applitools","article_published_time":"2020-04-24T23:34:46+00:00","article_modified_time":"2023-12-01T19:05:40+00:00","og_image":[{"width":742,"height":469,"url":"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-24-at-4.32.52-PM.png","type":"image\/png"}],"author":"Michael Battat","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Michael Battat","Est. reading time":"25 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/#article","isPartOf":{"@id":"https:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/"},"author":{"name":"Michael Battat","@id":"https:\/\/app14743.cloudwayssites.com\/#\/schema\/person\/410b5710e19f580ee19ef348537bc347"},"headline":"UI Tests In CICD &#8211; Webinar Review","datePublished":"2020-04-24T23:34:46+00:00","dateModified":"2023-12-01T19:05:40+00:00","mainEntityOfPage":{"@id":"https:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/"},"wordCount":4232,"commentCount":0,"publisher":{"@id":"https:\/\/app14743.cloudwayssites.com\/#organization"},"image":{"@id":"https:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/#primaryimage"},"thumbnailUrl":"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-24-at-4.32.52-PM.png","keywords":["Angie Jones","CICD","CodeFresh","Developers","DevOps","Jenkins","Microsoft Azure","Selenium","Technical Leaders","Test Engineers","Visual Testing Strategies"],"articleSection":["Advanced Topics"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/","url":"https:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/","name":"UI Tests In CICD - Webinar Review - AI-Powered End-to-End Testing | Applitools","isPartOf":{"@id":"https:\/\/app14743.cloudwayssites.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/#primaryimage"},"image":{"@id":"https:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/#primaryimage"},"thumbnailUrl":"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-24-at-4.32.52-PM.png","datePublished":"2020-04-24T23:34:46+00:00","dateModified":"2023-12-01T19:05:40+00:00","description":"Adding UI tests in CICD requires the right tools and the right strategies. Applitools's Angie Jones and Microsoft's Jessica Deen show you how to succeed.","breadcrumb":{"@id":"https:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/#primaryimage","url":"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-24-at-4.32.52-PM.png","contentUrl":"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/04\/Screen-Shot-2020-04-24-at-4.32.52-PM.png","width":742,"height":469},{"@type":"BreadcrumbList","@id":"https:\/\/app14743.cloudwayssites.com\/blog\/ui-tests-in-cicd\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/app14743.cloudwayssites.com\/"},{"@type":"ListItem","position":2,"name":"Advanced Topics","item":"https:\/\/app14743.cloudwayssites.com\/blog\/category\/advanced-topics\/"},{"@type":"ListItem","position":3,"name":"UI Tests In CICD &#8211; Webinar Review"}]},{"@type":"WebSite","@id":"https:\/\/app14743.cloudwayssites.com\/#website","url":"https:\/\/app14743.cloudwayssites.com\/","name":"Applitools Visual AI","description":"Applitools delivers full end-to-end test automation with AI infused at every step.","publisher":{"@id":"https:\/\/app14743.cloudwayssites.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/app14743.cloudwayssites.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/app14743.cloudwayssites.com\/#organization","name":"Applitools","url":"https:\/\/app14743.cloudwayssites.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/app14743.cloudwayssites.com\/#\/schema\/logo\/image\/","url":"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/03\/applitools.png","contentUrl":"https:\/\/app14743.cloudwayssites.com\/wp-content\/uploads\/2020\/03\/applitools.png","width":156,"height":28,"caption":"Applitools"},"image":{"@id":"https:\/\/app14743.cloudwayssites.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/app14743.cloudwayssites.com\/#\/schema\/person\/410b5710e19f580ee19ef348537bc347","name":"Michael Battat","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/app14743.cloudwayssites.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b1216c259c20b8394687b91ff06f1af2?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b1216c259c20b8394687b91ff06f1af2?s=96&d=mm&r=g","caption":"Michael Battat"},"sameAs":["https:\/\/www.linkedin.com\/in\/mdbattat\/"],"url":"https:\/\/app14743.cloudwayssites.com\/blog\/author\/michaelbattat\/"}]}},"_links":{"self":[{"href":"https:\/\/app14743.cloudwayssites.com\/wp-json\/wp\/v2\/posts\/17909"}],"collection":[{"href":"https:\/\/app14743.cloudwayssites.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/app14743.cloudwayssites.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/app14743.cloudwayssites.com\/wp-json\/wp\/v2\/users\/77"}],"replies":[{"embeddable":true,"href":"https:\/\/app14743.cloudwayssites.com\/wp-json\/wp\/v2\/comments?post=17909"}],"version-history":[{"count":0,"href":"https:\/\/app14743.cloudwayssites.com\/wp-json\/wp\/v2\/posts\/17909\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/app14743.cloudwayssites.com\/wp-json\/wp\/v2\/media\/17914"}],"wp:attachment":[{"href":"https:\/\/app14743.cloudwayssites.com\/wp-json\/wp\/v2\/media?parent=17909"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/app14743.cloudwayssites.com\/wp-json\/wp\/v2\/categories?post=17909"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/app14743.cloudwayssites.com\/wp-json\/wp\/v2\/tags?post=17909"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}