<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Walmyr Filho on Medium]]></title>
        <description><![CDATA[Stories by Walmyr Filho on Medium]]></description>
        <link>https://medium.com/@walmyrlimaesilv?source=rss-375212fd9a4a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*YJKCR-cfKDNRFMunh485RA@2x.jpeg</url>
            <title>Stories by Walmyr Filho on Medium</title>
            <link>https://medium.com/@walmyrlimaesilv?source=rss-375212fd9a4a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 06 May 2026 23:18:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@walmyrlimaesilv/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com" rel="hub"/>
        <item>
            <title><![CDATA[Managers or Leaders?]]></title>
            <link>https://walmyrlimaesilv.medium.com/managers-or-leaders-1ecf32f4a63b?source=rss-375212fd9a4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/1ecf32f4a63b</guid>
            <category><![CDATA[leadership]]></category>
            <category><![CDATA[lead-by-example]]></category>
            <category><![CDATA[management]]></category>
            <category><![CDATA[people-management]]></category>
            <category><![CDATA[management-and-leadership]]></category>
            <dc:creator><![CDATA[Walmyr Filho]]></dc:creator>
            <pubDate>Tue, 01 Sep 2020 14:39:39 GMT</pubDate>
            <atom:updated>2020-09-01T15:13:34.650Z</atom:updated>
            <content:encoded><![CDATA[<h4>With whom do you prefer to work?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*biTIviyo2B1B-FmQuhAc2g.jpeg" /></figure><p>I like to work with managers <strong>who get their hands dirty</strong> to have something done, instead of asking someone to do the work.<br>Managers that exist to manage people shouldn’t be necessary <strong>for</strong> <strong>mature and autonomous teams</strong>.<br>Think about it. If there’s no one to perform the work, what’s the point of having a people manager? In the end, there’s no one to manage.<br>On the other hand, if there’s no manager, but the people needed to perform the work are there, it can still happen.<br>I imagine that people managers won’t like reading this post (if they’re ok being in their comfort zone). But I also think that this should be an opportunity for them to re-invent how they work to be still valuable to their teams.<br>I prefer to work with leaders instead of managers, <strong>people who inspire me</strong>.<br>So, if you’re a people manager, I have one favor to ask you, become a leader and <strong>lead by example</strong>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1ecf32f4a63b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Side-projects]]></title>
            <link>https://walmyrlimaesilv.medium.com/side-projects-50c48dd9a3b8?source=rss-375212fd9a4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/50c48dd9a3b8</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[side-project]]></category>
            <category><![CDATA[software-craft]]></category>
            <category><![CDATA[software-craftsmanship]]></category>
            <dc:creator><![CDATA[Walmyr Filho]]></dc:creator>
            <pubDate>Tue, 14 Jul 2020 07:46:01 GMT</pubDate>
            <atom:updated>2021-01-05T01:02:36.011Z</atom:updated>
            <content:encoded><![CDATA[<h4>How side-projects help me practice the software development craft</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-Fisfg8uItg7SEvm7bzfgQ.jpeg" /></figure><p>Before writing this content, I was reading about <strong>software composition</strong>, and I had this insight.</p><p>I was reading the <a href="https://medium.com/javascript-scene/elements-of-javascript-style-caa8821cb99f"><strong>Elements of JavaScript Style</strong></a> chapter of <a href="https://medium.com/@_ericelliott"><strong>Eric Elliott</strong></a>’s <a href="https://medium.com/javascript-scene/composing-software-the-book-f31c77fc3ddc"><strong>Composing Software</strong></a> book, and then I thought, how lucky I am to keep open-source projects, such as the <a href="https://github.com/wlsf82/protractor-helper"><strong>protractor-helper</strong></a>, or <a href="https://github.com/wlsf82/walmyr-nextjs"><strong>my website</strong></a>, to name a few.</p><p>Such projects allow me to put into practice new knowledge acquired day-after-day, during <strong>study hours</strong>, to be ready when similar problems arise in work projects.</p><p>When the <a href="https://github.com/wlsf82/protractor-helper"><strong>protractor-helper</strong></a> started, all the code was in a single file. Nowadays, the project is better modularized, tested, as well as much better documented. 😀</p><p>My <a href="http://walmyr.dev"><strong>website</strong></a> is an example of my experiments with <a href="https://nextjs.org"><strong>Next.js</strong></a>. There’s a lot to improve, but that’s where the fun lives, after all, it’s my project, which I have total freedom for <strong>refactoring</strong>.</p><p>Besides, in several other <strong>side-projects</strong>, I have the chance to apply modern DevOps practices, such as <strong>continuous integration</strong>, <a href="http://udemy.com/user/walmyr/"><strong>automated tests</strong></a>, and even the so-called <strong>continuous delivery</strong>.</p><p>I believe that “<strong>practice makes perfect</strong>,” and nothing better than practicing on your projects to obtain such proficiency smoothly.</p><p>Also, it is grateful that several other professionals and even organizations use some of these projects; this is priceless!</p><p>And you, <strong>how do you practice your craft</strong>? Leave a comment.</p><p><strong>Curiosity</strong>: this blog was originally written in Portuguese, and you can find it <a href="https://talkingabouttesting.com/2020/06/26/projetos-paralelos-side-projects/"><strong>here</strong></a>.</p><p>👋😉✌️</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=50c48dd9a3b8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Release of protractor-helper version 4.1.1]]></title>
            <link>https://medium.com/swlh/release-of-protractor-helper-version-4-1-1-f770bbf362ff?source=rss-375212fd9a4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/f770bbf362ff</guid>
            <category><![CDATA[protractor]]></category>
            <category><![CDATA[automated-test]]></category>
            <category><![CDATA[automation-testing]]></category>
            <category><![CDATA[end-to-end-testing]]></category>
            <category><![CDATA[protractor-helper]]></category>
            <dc:creator><![CDATA[Walmyr Filho]]></dc:creator>
            <pubDate>Thu, 30 Apr 2020 13:48:37 GMT</pubDate>
            <atom:updated>2020-04-30T22:01:14.325Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*_eMMKYp5llbflVeArqaVUw.jpeg" /></figure><h3><strong>Now with type definitions in the functions</strong>’<strong> signatures</strong></h3><p>It is with great pleasure that I present you with the newest version of the <a href="https://wlsf82.github.io/protractor-helper/"><strong>protractor-helper</strong></a> library, which now provides a better experience for its users <strong>with type definitions in the functions’ signatures</strong>.</p><p>As of <strong>version 4.1.1</strong>, if you use the <a href="https://code.visualstudio.com/"><strong>Visual Studio Code</strong></a> editor (or some other with <strong>TypeScript</strong> support), after importing the library into your test file, when you type something like <em>helper.click()</em>, you will be presented with the parameters that such a function expects, what types such parameters should have, which are mandatory and which are optional, in addition to the return of each function.</p><p>Let’s see some examples.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LKjR6tWocDo-b2Dp" /><figcaption><em>scrollToElement function signature</em></figcaption></figure><p>Notice the tooltip displayed, which provides the following information about the <em>scrollToElement</em> method.</p><p>The first argument we must pass is an element (<em>elem</em>), which is of type <em>ElementFinder</em>, and such an argument is mandatory.</p><p>The second argument we can pass is a timeout in milliseconds (<em>timeoutInMs</em>), which is optional. It is possible to identify that the argument is optional due to the question mark (<em>?</em>) before its type definition, which is a <em>number</em>.</p><p>Also, it is possible to notice that such a function returns a <em>Promise</em>.</p><p>Let’s look at another example, which expects more arguments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oG9pWqutTTpVdpL_" /><figcaption><em>waitForTextToBePresentInElement function signature</em></figcaption></figure><p>In the case of the <em>waitForTextToBePresentInElement</em> method, the first argument is also an element (<em>elem</em>) of type <em>ElementFinder</em>, which is mandatory.</p><p>The second argument is a <em>text</em>, which is also mandatory and is of type <em>string</em>.</p><p>The third argument, as in the previous example, is a timeout in milliseconds (<em>timeoutInMs</em>), which is optional and is of the type <em>number</em>.</p><p>Finally, see that this method also returns a <em>Promise</em>.</p><p>Now, let’s look at the example of a library method that can be used to perform an assertion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*USAJ9Gw8qQ0tbOn4" /><figcaption><em>isCurrentUrlDifferentFromBaseUrl function signature</em></figcaption></figure><p>Note that the <em>isCurrentUrlDifferentFromBaseUrl</em> function does not take any arguments, and returns a <em>boolean</em>, that is, a positive (<em>true</em>) or negative (<em>false</em>) value, which can be used to make an assertion.</p><p>Finally, let’s look at a function that expects only an optional argument, and that has no return.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4Wq3NDVAsjmsxgqh" /><figcaption><em>setTimeout function signature</em></figcaption></figure><p>Note that the <em>setTimeout</em> function has only one argument, which is a <em>number</em>, and that argument is optional.</p><p>Also, such a function has no return, which can be perceived by the <em>void</em> return, which means the absence of return.</p><p>Ah, the examples presented in this post can be found on GitHub through the following URL: <a href="https://github.com/wlsf82/sample-protractor"><strong>https://github.com/wlsf82/sample-protractor</strong></a></p><p>If you are already a user of the <a href="https://wlsf82.github.io/protractor-helper/"><strong>protractor-helper</strong></a> library, update it to the newest version (4.1.1) and take advantage of this new functionality.</p><p>And if you write tests with the <a href="http://protractortest.org/"><strong>Protractor</strong></a> framework and still don’t use the <a href="https://wlsf82.github.io/protractor-helper/"><strong>protractor-helper</strong></a> library, what are you waiting for? Run <em>npm i protractor-helper -D</em> and install it as a dev dependency on your test project.</p><p>This post was originally published in Portuguese, and it can be found through the following URL <a href="https://talkingabouttesting.com/2020/04/29/lancamento-do-protractor-helper-versao-4-1-1/">https://talkingabouttesting.com/2020/04/29/lancamento-do-protractor-helper-versao-4-1-1/</a>.</p><p>Talk to you next time, and good testing! 👋</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f770bbf362ff" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swlh/release-of-protractor-helper-version-4-1-1-f770bbf362ff">Release of protractor-helper version 4.1.1</a> was originally published in <a href="https://medium.com/swlh">The Startup</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Development, test, performance, staging, canary, production… environments]]></title>
            <link>https://walmyrlimaesilv.medium.com/development-test-performance-staging-canary-production-environments-a26c03509fa8?source=rss-375212fd9a4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/a26c03509fa8</guid>
            <category><![CDATA[test-environment]]></category>
            <category><![CDATA[software-environment]]></category>
            <category><![CDATA[staging-environments]]></category>
            <category><![CDATA[development-environment]]></category>
            <category><![CDATA[production-environment]]></category>
            <dc:creator><![CDATA[Walmyr Filho]]></dc:creator>
            <pubDate>Wed, 29 Jan 2020 01:27:49 GMT</pubDate>
            <atom:updated>2021-01-23T01:27:35.693Z</atom:updated>
            <content:encoded><![CDATA[<h3>How many environments should we have in the software development lifecycle?</h3><h3>Development, test, performance, staging, canary, production…</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ggb8zno2NwRSTQA8YWQj5w.png" /></figure><p>I have a theory (and some experience) that having fewer environments in the software ecosystem is better than having more of them.</p><p>It’s a common practice in many software projects to have:</p><ul><li>The development environment — also known as the developer’s computer</li><li>The development integrated environment — a remote environment used by developers to have their code integrated so that they can check if they broke the code of someone else, or if someone else broke their code</li><li>The test environments — environments used for manual and/or automated tests</li><li>The staging environment — used for acceptance testing before pushing new code to production</li><li>The canary environment — a special kind of environment used to test new features with a small set of users (commonly used to test things internally before reaching the broader audience)</li><li>The production environment — the environment that our users really use</li></ul><p>Some might argue that having all these environments is a good thing. I say it’s not.</p><p>The more environments you have, the more problems you have to deal with.</p><p>Tell me. Has it never happened to you that a specific bug would only occur in a particular environment, but not in all others?</p><p>And have you never experienced an issue that was caused due to a misconfiguration on a specific environment, and you spent hours before you figure it out?</p><p>Or, has it never happened that certain feature of the application was behaving differently in different environments due to manual testing happening here and there, changing the state of the application in an uncontrolled way?</p><p>These are just a few examples of how bad things can go due to having too many environments.</p><p>In one of my previous jobs, we had only three different kinds of environments, and it was awesome! They were:</p><ul><li>The development environment — also known as the developer’s computer</li><li>The continuous integration/delivery environment — created on-demand exclusively to execute automated tests and to run deployments, and they were automatically destroyed after that</li><li>The production environment — the one used by our real users</li></ul><p>What was good about having only these three environments?</p><p>We had a lot fewer problems to deal with in terms of different environments being differently configured, bugs not being reproducible in some of them, and manual testing interfering the development and delivery cycle.</p><p>I remember even arguing with our CEO that we should have a staging environment before production, to have more confidence before deploying new code that could be reaching the end users, but luckily, he made me understand and convinced me that this wasn’t a good idea.</p><p>Of course, having fewer environments cames with challenges. Below I list a few of them.</p><ol><li>By having only three environments, sometimes we would introduce bugs in production because we were not able to catch them before;</li><li>We had to find a way to “test” minimum viable features (MVFs) with smaller sets of customers or beta testers, in production;</li><li>Performance testing would need to happen in production.</li></ol><p>Actually, these are good problems to have, and they forced us to implement modern practices of software development that led us to innovation.</p><p>When you have the risk of introducing bugs in production because of the lack of environments, you’re forced to have an excellent coverage of automated tests, all of the kind. They can be unit tests for the back-end, unit tests for front-end components, integration tests between services, API tests, functional end-to-end tests, screenshot comparison tests, performance tests, and the list goes, on and on.</p><p>Also, you <strong>must </strong>have a way to roll back the application to a known, stable state, very quickly.</p><p>In a team I worked, we were able to run thousands of unit tests, hundreds of integration and API tests, close to a hundred of end-to-end tests, and a few visual regression tests in a maximum time of ten minutes. And even more importantly, we were able to roll the application back to a known good state with two clicks. The whole process would also take a max of ten minutes. This was real continuous integration and continuous delivery.</p><p>In regards to testing MVFs with customers and beta testers, this can be solved with the use of feature toggles, and proper monitoring systems. You can have all kinds of strategies when working with feature toggles if you choose the right tool to implement it. Some tools allow you to create rules like:</p><ul><li>Turn on this specific feature (or set of features) to 1% (or n%) of the user base</li><li>Turn on this particular feature (or set of features) only to this user (or set of users)</li><li>Turn on this specific feature (or set of features) only to this particular range of IPs</li><li>Turn on this particular feature (or set of features) only to this specific region in the globe</li></ul><p>And the list goes, on and on, with as many different combinations as you can think of.</p><p>An excellent tool that allows you to do that is the <a href="https://github.com/Unleash/unleash">Unleash</a> open-source feature flag &amp; toggle system.</p><p>Of course, by using such an approach, monitoring is essential. Still, there is beauty here. When you realize that certain feature (that is behind a feature flag, and that’s turned on, let’s say, to 5% of your user base) is causing some stress to the system, and this is starting to cause problems in different parts of the app, you can toggle the feature off, and calmly investigate and fix the issue.</p><p>In terms of performance testing, there may be specific times where such tests can run in production in a controlled way, when the application is not receiving so much traffic, for example.</p><p>Of course, in some cases this might not be possible, and in such an exception, maybe it’s good to have a specific performance test environment, that is created and destroyed on-demand.</p><p>In conclusion, having less environments makes the system more resilient, and it helps you (and your company) to experiment, and really fail fast and learn and improve fast, which is essential to survive in this chaotic “environment” where new technologies are launched every day, new competitors come from all over the world, and users are more willing to change to a better experience.</p><p>That was on my mind for a while, and I’m happy that I was able to express it. I’ll be glad if you comment on your thoughts about this subject.</p><p>This content is also available in Portuguese on my WordPress blog, <a href="https://talkingabouttesting.com"><strong>Talking About Testing</strong></a> and you can find it through the following URL: <a href="https://bit.ly/31i6JdW">https://bit.ly/31i6JdW</a></p><p>My name is Walmyr, and I’m a software engineer passionate by software quality, test automation, teaching, learning, music, tattoos, and skateboarding. You can find me on Twitter as <a href="http://twitter.com/@walmyrlimaesilv">@walmyrlimaesilv</a>, where I tweet about technology, both in English and in Portuguese.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a26c03509fa8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Launch of protractor-helper v4 ]]></title>
            <link>https://walmyrlimaesilv.medium.com/launch-of-protractor-helper-v4-d038bcc18560?source=rss-375212fd9a4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d038bcc18560</guid>
            <category><![CDATA[software-testing]]></category>
            <category><![CDATA[automates-tests]]></category>
            <category><![CDATA[protractor]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[end-to-end-testing]]></category>
            <dc:creator><![CDATA[Walmyr Filho]]></dc:creator>
            <pubDate>Sun, 20 Oct 2019 22:43:39 GMT</pubDate>
            <atom:updated>2020-05-01T00:08:14.632Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*KCnezwkjPt6FSmrtORLUFw.jpeg" /><figcaption>Party mode!</figcaption></figure><h3>Get to know a bit of the history behind protractor-helper and its new version</h3><p>If you automate or intend to automate tests of web applications with the <a href="http://protractortest.org/"><strong>Protractor</strong></a> framework, <a href="http://wlsf82.github.io/protractor-helper/"><strong>protractor-helper</strong></a><strong> </strong>will help you on making them reliable. It does that by using the <a href="http://www.protractortest.org/#/api?view=ProtractorExpectedConditions"><strong>ExpectedConditions</strong></a><strong> </strong>class<strong>, </strong>from <a href="http://protractortest.org/"><strong>Protractor</strong></a>, to ensure that the test scripts will only interact with elements, or run assertions on them, when such elements are in the correct state, like visible, clickable, present, etc.</p><p><strong>Automated tests of GUI </strong>(graphical user interface) are commonly seen as <a href="https://medium.com/@walmyrlimaesilv/are-ui-tests-flaky-by-their-nature-3ee24bc45042"><strong>flaky</strong></a>. They fail when they should not, and so they lose credibility.</p><p>A test that fails when there’s nothing wrong with the application under test is what we call a <a href="https://www.instagram.com/p/B0i2XZCgDcg/?utm_source=ig_web_copy_link"><strong>false negative</strong></a>, and these should always be avoided.</p><p>Tests that are not-well-thought-through might result in <a href="https://www.instagram.com/p/B0i2XZCgDcg/?utm_source=ig_web_copy_link"><strong>false negatives</strong></a>. For instance, a test that doesn’t wait for a button to be on the screen before clicking on it or a test that doesn’t wait for the transition between one URL to another.</p><p>The <a href="https://wlsf82.github.io/protractor-helper/"><strong>protractor-helper</strong></a> library was created in the year of 2017, due to an internal need in the company where I worked at the time, to solve this specific problem, but without the complexity of the <a href="http://www.protractortest.org/#/api?view=ProtractorExpectedConditions"><strong>ExpectedConditions</strong></a><strong> </strong>class, and since then it keeps evolving.</p><h3>What are the most common functionalities of protractor-helper?</h3><p>Some of the most used functions of <a href="https://wlsf82.github.io/protractor-helper/"><strong>protractor-helper</strong></a> are:</p><pre><a href="https://github.com/wlsf82/protractor-helper/blob/master/docs/EXAMPLES.md#click"><strong>helper.click(element)</strong></a></pre><p>The above function receives an element as an argument and only clicks on it when such an element is visible on the screen and available for clicking.</p><pre><a href="https://github.com/wlsf82/protractor-helper/blob/master/docs/EXAMPLES.md#fillfieldwithtext"><strong>helper.fillFieldWithText(element, text)</strong></a></pre><p>The above function receives two arguments, the first is an HTML element, such as a text input field, or a text area, and the second is a string, which will be typed into the field, only when such field is visible.</p><pre><a href="https://github.com/wlsf82/protractor-helper/blob/master/docs/EXAMPLES.md#waitforelementvisibility"><strong>helper.waitForElementVisibility(element)</strong></a></pre><p>The above function, as the name suggests, waits for an element to be visible on the page. The element is passed as an argument.</p><p>Now, let’s walk through some of its latest versions.</p><h3><a href="https://github.com/wlsf82/protractor-helper/blob/master/CHANGELOG.md#370">Version 3.7.0</a></h3><p>In the beginning, some of the <a href="https://wlsf82.github.io/protractor-helper/"><strong>protractor-helper</strong></a><strong> </strong>functions, such as <strong>click</strong> and <strong>fillFieldWithText</strong>, were called <strong>clickWhenClickable</strong> and <strong>fillFieldWithTextWhenVisible</strong>. On <a href="https://github.com/wlsf82/protractor-helper/blob/master/CHANGELOG.md#370">version 3.7.0</a>, their successors functions were created to replace them.</p><p>These new functions allowed writing shorter lines of code, which helps in code <strong>readability.</strong></p><h3><a href="https://github.com/wlsf82/protractor-helper/blob/master/CHANGELOG.md#378">Version 3.7.8</a></h3><p>On <a href="https://github.com/wlsf82/protractor-helper/blob/master/CHANGELOG.md#378">version 3.7.8</a>, we announced the functions that would be deprecated because they had a replacement, but also, we decided to remove other two functions that were not in line with the primary purpose of the library, which is helping on <strong>writing robust and reliable tests</strong>.</p><p>The two other functions are the following: <strong>getBodyElementFromCurrentBrowserOrBrowserInstance</strong> and <strong>openNewBrowserInTheSamePage</strong>.</p><p>Last but not least, we also decided to deprecate the <strong>error message </strong>argument, that could be optionally passed to alter the default message in case of a failure. This decision was made due to the default messages being already very clear, suggesting exactly why a specific test step has failed. <a href="https://github.com/wlsf82/protractor-helper#example-of-a-test-failure-when-using-such-methods-as-expectations">See some examples</a>.</p><p><a href="https://github.com/wlsf82/protractor-helper/blob/master/CHANGELOG.md#404"><strong>Version 4</strong></a></p><p>Finally, we arrived at <a href="https://github.com/wlsf82/protractor-helper/blob/master/CHANGELOG.md#404"><strong>version 4</strong></a>, where the announced functions and arguments that would be deprecated were, in fact, removed. This is why the <a href="https://semver.org/lang/pt-BR/"><strong><em>major version</em></strong></a><strong><em> </em></strong><em>change.</em></p><h3>Here’s what you should do if you already use a version previously from v4?</h3><p>Below are listed the removed functions that have a replacement, therefore, if you use any of the functions described in the left of the below list, replace them by the relative function in the right.</p><pre>clickWhenClickable - click</pre><pre>fillFieldWithTextWhenVisible - fillFieldWithText</pre><pre>fillInputFieldWithFileWhenPresent - uploadFileIntoInputField</pre><pre>clearFieldWhenVisible - clear</pre><pre>clearFieldWhenVisibleAndFillItWithText - clearAndFillItWithText</pre><pre>tapWhenTappable - tap</pre><pre>fillFieldWithTextWhenVisibleAndPressEnter - fillFieldWithTextAndPressEnter</pre><pre>scrollToElementWhenVisible - scrollToElement</pre><p>However, if you use the functions <strong>getBodyElementFromCurrentBrowserOrBrowserInstance </strong>and/or <strong>openNewBrowserInTheSamePage</strong>, you will have to replace them by their native Protractor implementation. See the below examples.</p><p>Instead of wring:</p><pre>helper.getBodyElementFromCurrentBrowserOrBrowserInstance()</pre><p>Use:</p><pre>browser.element(by.css(&#39;body&#39;)</pre><p>And instead of writing:</p><pre>helper.openNewBrowserInTheSamePage()</pre><p>Use:</p><pre>browser.forkNewDriverInstance(true)</pre><p>Finally, if you changed the default message of some function, see the below example to understand what needs to be changed on your code.</p><p>Let’s say that the implementation of your <strong>waitForElementVisibility</strong> function is the following:</p><pre>helper.waitForElementVisibility(someElement, 5000, &#39;Element is still visible&#39;)</pre><p>Your new implementation should be the following:</p><pre>helper.waitForElementVisibility(someElement)</pre><h3>Acknowledgment</h3><p>I want to take a moment in this post to thank <a href="https://www.linkedin.com/in/paulo-goncalves/"><strong>Paulo Gonçalves</strong></a>, for helping me in maintaining this library, that helps other professionals in the software industry to write robust and reliable automated tests. Thank you very much, Paulo!</p><p>And that’s it for today, but if you have any doubt, please leave a comment, and I’ll reply as soon as possible.</p><p>👋 See you next time and good testing! ✅</p><p>This post was firstly published in Portuguese, and its original version can be seen <a href="https://talkingabouttesting.com/2019/10/17/lancamento-do-protractor-helper-versao-4/"><strong>here</strong></a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d038bcc18560" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A personal review of automated testing tools in the JavaScript world]]></title>
            <link>https://itnext.io/a-personal-review-of-automated-testing-tools-in-the-javascript-world-3c504fe6e05d?source=rss-375212fd9a4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c504fe6e05d</guid>
            <category><![CDATA[end-to-end-testing]]></category>
            <category><![CDATA[integration-testing]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[unit-testing]]></category>
            <category><![CDATA[test-automation]]></category>
            <dc:creator><![CDATA[Walmyr Filho]]></dc:creator>
            <pubDate>Wed, 31 Oct 2018 08:01:01 GMT</pubDate>
            <atom:updated>2023-01-10T10:33:52.314Z</atom:updated>
            <content:encoded><![CDATA[<h4>My “2 cents” of some open source tools that I have used or have been using to ensure quality in software development projects</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZRV92399sgFGeWbzcAHjig.jpeg" /><figcaption>JavaScript code</figcaption></figure><p>In this post, I will talk about my experiences with <strong>test automation</strong> using tools that support <strong>JavaScript</strong>. In the first part of the post, I will talk about tools for <strong>test automation of the graphical user interface</strong> or <strong>GUI</strong>. In the second part of the post, I will talk about tools for <strong>integration test automation</strong> or <strong>API testing</strong>. In the third part of the post, I will talk about tools for <strong>unit testing</strong>. And in the last part, I’ll talk about tools for <strong>static code analysis</strong>.</p><h4>PART 1 — AUTOMATED TESTS OF GRAPHICAL USER INTERFACE (GUI)</h4><h4><a href="https://github.com/SeleniumHQ/selenium/wiki/WebDriverJs">Selenium Webdriver</a></h4><p>My experience with the <strong>JavaScript</strong> version of <strong>Selenium Webdriver</strong> is quite satisfactory with regards to what is possible to accomplish when using the framework, being a powerful option for <strong>GUI tests</strong>, meeting the needs of support for multiple browsers such as <strong>Chrome</strong>, <strong>Firefox</strong>, <strong>Safari,</strong> and <strong>Internet Explorer</strong>.</p><p>Other relevant points are the community support; it is an <a href="https://github.com/SeleniumHQ/selenium/graphs/code-frequency"><strong>active project on GitHub</strong></a> and the <strong>conferences</strong>. In 2017 I had the opportunity to participate in the <a href="https://www.seleniumconf.de"><strong>SeleniumConf in Berlin</strong></a>, and besides updating myself, I learned a lot.</p><p>Regarding documentation, until recently, it was not the best, but <strong>version 4</strong> is coming up with excellent <a href="https://seleniumhq.github.io/docs/"><strong>documentation</strong></a> and adhering to the <strong>specifications of the W3C WebDriver</strong>. To those interested, follows also a <strong>related content</strong>.</p><p>Another advantage of <strong>Selenium</strong> is the support for the execution of the same test case in different browsers. Great for testing chat and video conferencing applications.</p><h4><a href="http://www.protractortest.org/#/">Protractor</a></h4><p><strong>Protractor</strong> is the <strong>GUI test automation tool</strong> which I have more experience with. I’ve been working with the framework since 2014, writing content in English <a href="https://medium.com/search?q=protractor%20walmyr"><strong>here on Medium</strong></a> and in <a href="https://talkingabouttesting.com/?s=protractor"><strong>Portuguese on WordPress</strong></a>, sharing <a href="https://www.youtube.com/user/wlsf82/videos"><strong>videos on YouTube</strong></a>, <a href="https://www.slideshare.net/walmyrlimasilvafilho/presentations"><strong>lecturing at events</strong></a>, mentoring QA practitioners specifically on the subject, maintaining the <a href="https://www.npmjs.com/package/protractor-helper"><strong>protractor-helper</strong></a> library, created to help other professionals write <strong>more reliable tests</strong> using <strong>Protractor</strong>, writing two books (one in <a href="https://leanpub.com/end-to-end-testing-with-protractor"><strong>English</strong></a> and another one in <a href="https://www.casadocodigo.com.br/products/livro-protractor"><strong>Portuguese</strong></a>, both with a collection of lessons learned), keeping projects in the form of <a href="https://github.com/wlsf82/protractor-and-webrtc"><strong>codelab</strong></a> and <a href="https://github.com/wlsf82/protractor-components-and-page-objects"><strong>architecture suggestions</strong></a> on <strong>GitHub</strong>, and teaching at the <a href="http://talkingabouttesting.coursify.me/courses/arquitetura-de-testes-com-protractor"><strong>Talking About Testing School</strong></a>, if I have not forgotten anything 😀</p><p>One of the significant advantages of <strong>Protractor, when compared to Selenium,</strong> is a <a href="https://www.protractortest.org/#/webdriver-vs-protractor"><strong>simpler syntax</strong></a>, where you do the same things with much less code, helping with legibility and maintainability issues.</p><p>For developers used to <strong>unit testing </strong>libraries, such as <strong>Jasmine</strong> or <strong>Mocha</strong>, both are supported by the <strong>Protractor</strong>, the first being the default one.</p><p>About the documentation, my favorite part is the <a href="http://www.protractortest.org/#/api"><strong>API</strong></a>, which is always updated along with the new versions.</p><p><strong>Protractor</strong> also supports the most used browsers in the market, as well as <strong>Selenium</strong>.</p><p><strong>TypeScript</strong> support is another of its advantages.</p><p>Finally, it is mainly maintained by the <a href="https://angular.io"><strong>Angular</strong></a> team, which is supported by <strong>Google</strong>.</p><h4><a href="https://www.cypress.io">Cypress</a></h4><p><strong>Cypress</strong> is the <strong>end-to-end testing</strong> tool that I’m currently using (in some personal projects). The points that have caught my attention so far are its excellent <a href="https://docs.cypress.io/guides/overview/why-cypress.html#In-a-nutshell"><strong>documentation</strong></a>, ease of use, it enables <a href="https://docs.cypress.io/api/commands/request.html#Syntax"><strong>testing of REST APIs</strong></a>, developer facilities such as <strong>integration with Chrome Dev Tools</strong>, <a href="https://docs.cypress.io/guides/guides/debugging.html#Using"><strong>debugging</strong></a>, <a href="https://docs.cypress.io/guides/core-concepts/test-runner.html#Overview"><strong>interactive mode</strong></a>, <a href="https://docs.cypress.io/api/commands/stub.html#Differences"><strong>stub</strong></a> support, <a href="https://docs.cypress.io/api/commands/exec.html#Syntax"><strong>shell command support</strong></a>, and <a href="https://docs.cypress.io/guides/core-concepts/introduction-to-cypress.html#Interacting-With-Elements"><strong>automatic waits</strong></a> without the need of explicit delays, as well as being a <a href="https://github.com/cypress-io/cypress/graphs/code-frequency"><strong>very active project on GitHub</strong></a>.</p><h4><a href="https://garris.github.io/BackstopJS/">BackstopJS</a></h4><p><strong>BackstopJS</strong> is the most straightforward tool I have ever used for <a href="https://talkingabouttesting.com/?s=backstop"><strong>screenshot comparison testing</strong></a>, also known as <strong>visual regression testing</strong>.</p><p>I have been using <strong>BackstopJS</strong> for about a year, and I am delighted. It has excellent <a href="https://github.com/garris/BackstopJS"><strong>documentation</strong></a>, and it’s a <a href="https://github.com/garris/BackstopJS/graphs/code-frequency"><strong>relatively active project on GitHub</strong></a>. It <a href="https://github.com/garris/BackstopJS#using-docker-for-testing-across-different-environments"><strong>supports running tests inside Docker containers</strong></a> and supports the <a href="https://github.com/GoogleChrome/puppeteer"><strong>Puppeteer</strong></a> engine.</p><p>Two of my “contributions” to <strong>BackstopJS</strong> users are the <a href="https://github.com/wlsf82/backstop-config"><strong>backstop-config</strong></a> project (<a href="https://github.com/garris/BackstopJS#tutorials-extensions-and-more"><strong>included in the official documentation of the tool</strong></a>) and the <a href="http://talkingabouttesting.coursify.me/courses/testes-de-regressao-visual-com-backstopjs"><strong>course of visual regression testing with BackstopJS</strong></a> (available only in Portuguese).</p><h4>PART 2 — INTEGRATION TEST AUTOMATION (API TESTING)</h4><h4><a href="https://github.com/jsdom/jsdom">jsdom</a></h4><p><strong>Jsdom</strong> is a library that can be used in combination with other tools that will be discussed here, such as <strong>SuperTest</strong> and <strong>Chai</strong>. With <strong>jsdom</strong>, it is possible to emulate a subset of a web browser to test application servers without the need for a real browser.</p><p>An example of what can be done with the <strong>jsdom</strong> library is to <strong>parse the HTML</strong> returned by a <strong>REST API call</strong> and execute something like the <strong>querySelector</strong> function to return a specific HTML element and then make an assertion that such element has a given value. Such verification may be performed using the <strong>Chai</strong> library, for example.</p><h4><a href="https://www.npmjs.com/package/supertest">SuperTest</a></h4><p><strong>SuperTest</strong> is used to <strong>test HTTP REST calls</strong>, allowing you to test <strong>GET</strong>, <strong>POST</strong>, <strong>PUT</strong>, <strong>DELETE,</strong> and <strong>PATCH</strong> requests.</p><p>Some of the possible tests that can be done with the library are:</p><ul><li>Verify that the response of an <strong>HTTP request</strong> returns the correct/expected <strong>status code</strong>;</li><li>Verify that the response of an <strong>HTTP reques</strong>t returns the correct location value in its header;</li><li>Combined with tools like <strong>jsdom</strong> and <strong>chai</strong>, this can assert things like the number of HTML elements with a specific CSS selector returned after a <strong>POST</strong> request, for example.</li></ul><h4><a href="https://www.chaijs.com">Chai</a></h4><p><strong>Chai</strong> is a <strong>library of assertions</strong> for node environments but also for web browsers, so this tool makes it possible to perform checks like those mentioned in the sections on <strong>jsdom</strong> and <strong>SuperTest</strong>.</p><p>Some examples of assertions that can be performed with the <strong>Chai</strong> library when used for <strong>integration tests</strong> are:</p><ul><li>Verify that a particular variable, which was populated with the return of an HTTP request, contains a given string or is equal to a given string;</li><li>Verify that a particular variable, which was populated with the return of an HTTP request, has a certain length;</li><li>Verify that a particular variable, which was populated with the return of an HTTP request, has a specific property.</li></ul><h4><a href="https://www.cypress.io">Cypress</a></h4><p>As briefly discussed in the section on <strong>automated GUI testing</strong> with <strong>Cypress</strong>, in addition to testing interactions via the graphical user interface, it is also possible to <a href="https://docs.cypress.io/api/commands/request.html#Syntax"><strong>test REST APIs</strong></a>.</p><p>Some examples of <strong>API testing</strong> possible to do with <strong>Cypress</strong> are:</p><ul><li>Verifying status codes;</li><li>Verifying URL redirects;</li><li>Response body verifications of HTTP requests.</li></ul><h4>PART 3 — UNIT TEST AUTOMATION</h4><h4><a href="https://github.com/substack/tape">Tape</a></h4><p><strong>Tape</strong> is the most straightforward <strong>unit testing library</strong> I’ve ever used. Such a library already comes with its list of assertions, which makes the testing process simplified, where there is no need to import a specific library to do the assertions for the expected results.</p><p><a href="https://github.com/wlsf82/age-discoverer"><strong>Here’s an example project on GitHub</strong></a> where I used the <strong>Tape</strong> library to practice techniques like <strong>TDD</strong>, increasing <strong>code coverage</strong>, <strong>refactoring</strong>, <strong>clean code</strong>, and more.</p><h4><a href="https://jasmine.github.io">Jasmine</a></h4><p>The <strong>Jasmine</strong> framework enables the practice of <strong>behavior-driven development</strong> (<strong>BDD</strong>) at the unit level.</p><p>One of the significant advantages of the tool is a <strong>simplified syntax</strong>, which allows having tests that are <strong>easy to write and read</strong>.</p><h4><a href="https://mochajs.org">Mocha</a></h4><p>My impression is that the <strong>Mocha</strong> framework is the most used by <strong>JavaScript</strong> developers when talking about <strong>unit testing</strong>.</p><p>This tool enables <strong>asynchronous testing</strong>, in both node and browser environments, in a simple way.</p><p>Some of its many features include:</p><ul><li>Support for <strong>asynchronous tests</strong>, including <strong>promises</strong>;</li><li>Running a single test using .only(), or skipping a single test using .skip();</li><li>Code coverage report.</li></ul><h4><a href="https://nodejs.org/api/assert.html">Node.js Assert</a></h4><p><strong>Node.js assert</strong> is a <strong>Node.js</strong> module for assertions in <strong>unit tests</strong>.</p><p>Its most significant advantage is that it is already installed together with <strong>Node.js</strong>, requiring no extra installation.</p><h4><a href="https://www.chaijs.com">Chai</a></h4><p>As already discussed in the section on <strong>integration testing</strong>, <strong>Chai</strong> is a <strong>library of assertions</strong> for node environments but also for web browsers.</p><p>Apart from what has already been mentioned, with the <strong>Chai</strong> library, it is possible to make assertions in the style of <strong>BDD</strong> or <strong>TDD</strong>, besides supporting the use of plugins, to extend its functionalities.</p><h4><a href="https://github.com/airbnb/enzyme">Enzyme</a></h4><p><strong>Enzyme</strong> is a <strong>unit testing utility</strong> launched by Airbnb to perform assertions on <strong>React</strong> components.</p><p>An example of testing that can be performed with such a tool is to superficially render a <strong>React</strong> component (shallow render) and check the number of elements with a specific CSS selector that are returned.</p><p><a href="https://github.com/wlsf82/hackernews"><strong>Here is an example project on GitHub</strong></a> where I used <strong>Enzyme</strong> for simple <strong>testing of React components</strong>.</p><h4><a href="https://jestjs.io">Jest</a></h4><p><strong>Jest</strong> is a <strong>testing framework</strong> launched by Facebook, wherein the <strong>React</strong> community is primarily used for <strong>snapshot tests</strong> but can also be used for tests that require the use of <strong>test doubles</strong>, such as <strong>mocks</strong>.</p><p>Some of its advantages are:</p><ul><li>Because it is a complete framework, it does not require the installation of other libraries. With <strong>Jest,</strong> you write tests and assertions, execute them, and then visualize the test execution report;</li><li>It already comes with support for <strong>code coverage</strong> reports without the need to install other specific libraries for this;</li><li>It does not require configuration to start using it.</li></ul><p>In the same example project on <strong>GitHub</strong> of the <strong>Enzyme</strong> testing section, I also used the <strong>Jest</strong> framework for <strong>snapshot testing</strong>.</p><h4><a href="https://istanbul.js.org">Istanbul</a></h4><p><strong>Istanbul</strong> <strong>is NOT a</strong> <strong>unit testing</strong> <strong>tool</strong> but <strong>a tool for extracting code coverage metrics </strong>from<strong> unit tests</strong>.</p><p>Its primary purpose is to clearly state which parts of an application’s code are or are not exercised by tests, making it possible to identify areas of risk and potential areas for improvement.</p><p>In the same example project in the <strong>Tape</strong> section, I used <strong>Istanbul</strong> to extract <strong>code coverage</strong> <strong>metrics</strong>.</p><h4>PART 4 — TOOLS FOR STATIC CODE ANALYSIS</h4><h4><a href="https://standardjs.com">StandardJS</a></h4><p><strong>StandardJS</strong> is the simplest option I know for static <strong>JavaScript</strong> <strong>code analysis</strong>, helping with <strong>code formatting</strong> and <strong>linting</strong> and making it possible to follow the same <strong>style guide</strong> throughout a project code without the need for any configuration.</p><h4><a href="https://eslint.org">ESLint</a></h4><p><strong>ESLint</strong> is a <strong>code linting</strong> library that enables a development team to define their <strong>style guide</strong> and ensure that such a guide is followed.</p><p>One of the features I like very much in <strong>ESLint</strong> is the auto-fix, which automatically corrects some simple rules, such as the number of spaces in tabs, single or double quotes, lack of semicolons at the end of statements, etc.</p><p>That’s it for today.</p><p>And you, which tools are you using for <strong>test automation</strong> at different application levels and for <strong>static code analysis</strong>? Leave a comment.</p><p>Did you like what you read? Help me by sharing this content on your social networks. I’ll appreciate it!</p><p>Until next time, and good tests! ✅ 👋</p><p>This blog post was originally published in Portuguese on <strong>WordPress</strong>, and it can be seen <a href="https://talkingabouttesting.com/2018/10/05/um-review-pessoal-de-ferramentas-para-testes-automatizados-no-mundo-javascript-parte-1/"><strong>here</strong></a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c504fe6e05d" width="1" height="1" alt=""><hr><p><a href="https://itnext.io/a-personal-review-of-automated-testing-tools-in-the-javascript-world-3c504fe6e05d">A personal review of automated testing tools in the JavaScript world</a> was originally published in <a href="https://itnext.io">ITNEXT</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Common errors when doing continuous integration]]></title>
            <link>https://walmyrlimaesilv.medium.com/common-error-when-doing-continuous-integration-7c77363c94d2?source=rss-375212fd9a4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c77363c94d2</guid>
            <category><![CDATA[agile-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <category><![CDATA[extreme-programming]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Walmyr Filho]]></dc:creator>
            <pubDate>Wed, 25 Jul 2018 15:27:34 GMT</pubDate>
            <atom:updated>2018-11-12T23:34:37.913Z</atom:updated>
            <content:encoded><![CDATA[<h4>Some examples of things we have to avoid if we are looking for efficient continuous integration</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*mcz2EFW17TIz8ElyYrVrQw.jpeg" /><figcaption>Homer Simpson making another mistake</figcaption></figure><p>Have you already asked yourself why continuous integration is not providing value to your project or organization, even if you have all the tools and infrastructure needed for it?</p><p>Maybe the problem is in other stages of the software development life cycle, or in the process and the way the team works.</p><p>Because of this, we need to understand what’s the primary goal of this software engineering practice so that we can comprehend what to expect from it.</p><p>The purpose of continuous integration is to reduce the time between the development and the release of a working software update in production, providing quick feedback in case the new package may cause any issue to the application.</p><p>In this post, some techniques, processes and common errors that need to be avoided will be explained to help in achieving better results when doing continuous integration.</p><p><strong>Unreliable feedback</strong><br>One of the advantages of continuous integration is to have different pipelines that give us quick feedback, and that allows us to save time, besides taking the appropriate actions as soon as possible when things go wrong.</p><p>There is no benefit in having a complete continuous integration infrastructure if we can’t trust in its feedback.</p><p>For instance, let’s say a pipeline fails in the automated tests stage, but the team ignores it because it is not enough reliable to identify the reason for the failure by looking to its result. The cause may be some instability in the test environment, the data being used, or even an error in the application code.</p><p>Another example could be that there is an error in the build stage, but the team responsible for it doesn’t have the culture of fixing the errors immediately, leaving the fix for later together with lots of other issues.</p><p>The point here is that it doesn’t make any sense having quick feedback if you can’t trust in it, or if no action is immediately taken.</p><p><strong>Slow feedback</strong><br>By just using a good continuous integration tool you can not ensure that you will have quick and reliable feedback. It is also necessary to apply good practices.</p><p>Imagine working without an organized structure, without pipelines to run automated tests, without parallelism, and receiving feedback of an error only by the end of a slow regression tests suite. Is it vital to wait until the end of this process to have some feedback? The answer is no.</p><p>To make it even worse, what about if the test suite had more graphical user interface (GUI) tests than unit tests? Besides this not being recommended, it could drastically increase the test execution time and the feedback loop.</p><p>Techniques such as the test pyramid (having more unit tests than integration tests, and more integration tests than GUI tests), having a smoke test suite (to test the main functionalities first), and the use of parallelism are good examples of things that can provide us quick feedback. The point is that as soon as we find issues, as quick we can fix them, saving valuable time to any project.</p><p><strong>Accumulation of local code pending integration</strong><br>A culture that doesn’t fit with continuous integration is of a team that doesn’t integrate its code with the remote repository frequently (at least once a day). Because by integrating big chunks of code or old branches we increase the chances of having conflicts with the code in the main branch, which increases the time, complexity and cost to fix such conflicts.</p><p>One of the advantages of using continuous integration is to allow developers to refactor and integrate their code fast since every integration is analyzed by an automated build that checks if the new package won’t generate any conflict or break the code. Such automated validations can be static code analysis, unit tests, integration tests, end-to-end tests and even visual regression tests. And if the updated software is small and recent, better chances are that fixing an issue will happen quickly, in case it occurs.</p><p>With that it is encouraged that all developers in a team integrate their code at least once a day, avoiding working on long life branches.</p><p><strong>Specific Environments</strong><br>Running automated tests in shared environments where manual testing is also executed is very risky, because changes in one environment for other purposes may cause false negative results in the automated tests’ execution (e.g., a test fails because a test script was expecting some data to be available in the system, but someone deleted such data when running manual tests). This leads to the team not trusting in the feedback provided by automated tests. Another example is when tests pass with false positive results, which mean that they are passing when they should be failing. In this case, the tests are not being efficient in finding real bugs.</p><p><strong>Is continuous integration always ideal?</strong><br>Despite the many benefits of such software engineering practice, and based on what was written here so far, some minimum requirements are needed to implement continuous integration:</p><ul><li><strong>Automated tests in all layers of the application</strong><br>A continuous integration tool can’t find issues on its own without automated tests that will verify if the new code has broken something.</li><li><strong>Usage of a version control system</strong><br>To be able to frequently integrate code a version control system is needed. This may also be the trigger for a continuous integration pipeline to start.</li><li><strong>The need to find and fix issues, bugs, failures as soon as possible</strong><br>There is no point in implementing continuous integration if the team doesn’t have an agile mindset to analyze and fix the problems as soon as they happen.</li><li><strong>Running continuous delivery and/or continuous deployment</strong><br>Continuous delivery or deployment are a consequence of efficient continuous integration, making such process automatic.</li><li><strong>Automatic creation of environments</strong><br>The creation of environments can also be done automatically, and in this way, it is possible to ensure that the automated tests will be executed in an exclusive environment, and no unknown factor will influence its result, making it more reliable.</li></ul><p><strong>Going beyond continuous integration</strong><br>After correctly applying continuous integration, the next steps are to implement continuous delivery (an automated procedure manually triggered to implement a new software version in a specific environment), or even better, continuous deployment (similar to continuous delivery, but where the process is completely automated and triggered after continuous integration pipelines succeed).</p><p>These are some tips and common errors that need to be avoided to improve the efficiency of continuous integration, because besides the tools, the team needs to know and work in its concepts and practices.</p><p>This is a translation of a post created by one of my pupils (<a href="https://medium.com/u/5cf1ad200532">Ricardo Kohatsu</a>). He created this post (in Portuguese) as part of a mentorship program in continuous integration between him and myself. The original post can be found through the following URL:</p><p><a href="https://medium.com/inmetrics/erros-comuns-na-integração-cont%C3%ADnua-769556bd78d">https://medium.com/inmetrics/erros-comuns-na-integração-cont%C3%ADnua-769556bd78d</a></p><p>Happy continuous integration!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c77363c94d2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to run Protractor tests for a video conference web application]]></title>
            <link>https://walmyrlimaesilv.medium.com/how-to-run-protractor-tests-for-a-video-conference-web-application-d05d5ef55e29?source=rss-375212fd9a4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/d05d5ef55e29</guid>
            <category><![CDATA[ui-test-automation]]></category>
            <category><![CDATA[firefox]]></category>
            <category><![CDATA[end-to-end-testing]]></category>
            <category><![CDATA[chrome]]></category>
            <category><![CDATA[protractor]]></category>
            <dc:creator><![CDATA[Walmyr Filho]]></dc:creator>
            <pubDate>Fri, 19 Jan 2018 12:32:42 GMT</pubDate>
            <atom:updated>2018-01-19T12:53:24.319Z</atom:updated>
            <content:encoded><![CDATA[<h4>Some tricks you need to know</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*fFN7wMOJyRk7ss1MyggpEw.png" /><figcaption>Automated tests of <a href="https://appear.in">appear.in</a> service running on Chrome and Firefox at the same time</figcaption></figure><p>When talking about <strong>test automation</strong> for web applications, we know (or at least we should know) that tests need to run in different browsers, such as Chrome, Firefox, or even on a mobile’s browser.</p><p>When talking specifically about <strong>test automation</strong> for video conference web applications, there is a bit more we need to know, such as how to simulate camera and microphone devices, since ideally our tests will be run via a CI system and a camera and mic will be unavailable.</p><p>Both Chrome and Firefox browsers provide us with the capability of having a fake media stream device and a way to disable the need for manually allowing the browser to access the camera and microphone devices, and this is what I want to show you in this blog post.</p><h4>Protractor configuration for Chrome using a fake camera and mic</h4><p>To simulate a fake media device on Chrome, add the following to your protractor.conf.js file:</p><p>capabilities: {&quot;browserName&quot;: &quot;chrome&quot;, &quot;chromeOptions&quot;: {&quot;args&quot;: [&quot;--use-fake-ui-media-stream&quot;, &quot;--use-fake-device-for-media-stream&quot;]}}</p><ul><li>&quot;--use-fake-device-for-media-stream&quot; will make use of a fake device for the media stream to replace actual camera and microphone</li><li>&quot;--use-fake-ui-for-media-stream&quot; will bypass the media stream infobar by selecting the default device for media streams</li></ul><h4>Protractor configuration for Firefox using a fake camera and mic</h4><p>To simulate a fake media device on Firefox, add the following to your protractor.conf.js file:</p><p>capabilities: {&quot;browserName&quot;: &quot;firefox&quot;, &quot;marionette&quot;: true, &quot;moz:firefoxOptions&quot;: {&quot;prefs&quot;: {&quot;media.navigator.streams.fake&quot;: true, &quot;media.navigator.permission.disabled&quot;: true}}}</p><ul><li>Marionette is the new driver that is shipped/included with Firefox. This driver has its own protocol which is not directly compatible with the Selenium/WebDriver protocol. For running tests on Firefox using the latest versions of Protractor you will need to set &quot;marionette&quot;: true</li><li>&quot;media.navigator.streams.fake&quot;: true will make use of a fake device for the media stream to replace actual camera and microphone</li><li>&quot;media.navigator.permission.disabled&quot;: true will bypass the media stream infobar by selecting the default device for media streams</li></ul><p>That’s it! By adding these capabilities to your Protractor configuration file you can run automated tests during continuous integration on servers without the need of a real camera and microphone.</p><p>I hope this post was helpful. Good tests!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d05d5ef55e29" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Working with Protractor through the command line]]></title>
            <link>https://walmyrlimaesilv.medium.com/working-with-protractor-through-the-command-line-52e7f60a411?source=rss-375212fd9a4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/52e7f60a411</guid>
            <category><![CDATA[protractor-framework]]></category>
            <category><![CDATA[test-automation]]></category>
            <category><![CDATA[e2e-testing]]></category>
            <category><![CDATA[protractor]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Walmyr Filho]]></dc:creator>
            <pubDate>Mon, 31 Jul 2017 13:41:01 GMT</pubDate>
            <atom:updated>2019-01-21T08:19:00.366Z</atom:updated>
            <content:encoded><![CDATA[<h4>This is a translation from a blog post on <a href="http://talkingabouttesting.com">Talking About Testing</a>. See the original post <a href="https://talkingabouttesting.com/2017/02/02/trabalhando-com-protractor-atraves-da-linha-de-comando/">here</a>.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R_UegyLs1NcLfZjZcmQIsQ.png" /><figcaption>iTerm</figcaption></figure><p>For the command line fans, just like me, here’s a cool tip on how to run automated test scripts using Protractor before even developing them.</p><p>First, open the console of your operating system (on Mac or Linux, open the terminal, on Windows, open cmd).</p><p>If you have Protractor installed globally on your computer, run the following command:</p><pre>protractor --directConnect --elementExplorer</pre><p>In case Protractor is installed as a dependency of your project, execute the following command:</p><pre>./node_modules/.bin/protractor --directConnect --elementExplorer</pre><p>The Chrome browser should open automatically.</p><p>Then, run the following command to navigate to the official Protractor page:</p><pre>browser.get(&quot;<a href="http://www.protractortest.org">http://www.protractortest.org</a>&quot;);</pre><p>The official Protractor website should open in the newly instantiated Chrome browser.</p><p>After that, run the following command:</p><pre>element.all(by.css(&quot;a&quot;)).last().click();</pre><p>The tutorial page should be available.</p><p>Finally, run the following commands:</p><pre>let title = element(by.css(&quot;h1&quot;));<br>title.getText();</pre><p>The output should be ‘Tutorial’</p><p>So, did you like it? Try what else you can do. <a href="http://www.protractortest.org/#/api">Take a look at the Protractor API</a>.</p><p><strong>NOTE:</strong></p><p>Verification commands will not work (see example below):</p><pre>expect(title.isDisplayed()).toBe(true);</pre><p>The above command returns the following error:</p><pre>Error while evaluating command: ReferenceError: expect is not defined</pre><p>The official documentation can be found <a href="http://www.protractortest.org/#/debugging#testing-out-protractor-interactively">here.</a></p><p><strong>NOTE 2:</strong></p><p>If you face the following issue, try using a version of Node.js not greather than 8.</p><pre>WARNING: _debugger module not available on Node.js 8 *<br>* and higher.</pre><p>I suggest using NVM to work with different Node.js versions. I have just tested with Node.js version 7.10.1, and it works fine then (tested on 21st of January, 2019).</p><p>If you liked this post, share, clap, or leave a comment!</p><p>See you on the next post, and good tests!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52e7f60a411" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lessons learned (so far) as a software engineer working at appear.in]]></title>
            <link>https://medium.com/the-making-of-whereby/lessons-learned-so-far-as-a-software-engineer-working-at-appear-in-857576a68121?source=rss-375212fd9a4a------2</link>
            <guid isPermaLink="false">https://medium.com/p/857576a68121</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[agile-development]]></category>
            <category><![CDATA[best-practices]]></category>
            <category><![CDATA[lessons-learned]]></category>
            <dc:creator><![CDATA[Walmyr Filho]]></dc:creator>
            <pubDate>Wed, 29 Mar 2017 10:59:18 GMT</pubDate>
            <atom:updated>2018-06-22T23:37:51.772Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kxQXFEF2pEj6HC9gi6arPw.png" /><figcaption>Living the brand — Photo by <a href="https://medium.com/u/ebf1e3a6bee6">Joana Paz Cardoso</a></figcaption></figure><h4>A bit of what happened from 9 months ago until now. By <a href="https://medium.com/u/375212fd9a4a">Walmyr Filho</a>.</h4><p><strong>Time flies and I’m almost completing my first year working at </strong><a href="http://appear.in"><strong>appear.in</strong></a><strong>, and as a person that likes to share personal learnings from time to time, here is a list of what I learned so far in this great team.</strong></p><ol><li><strong>Automate everything you can benefit from</strong></li></ol><p>If you think automation is just about testing, I do <strong>not</strong> regret to inform, it is not. At <a href="https://appear.in"><strong>appear.in</strong></a> we automate many different kinds of tasks, such as notifying about the status of pull requests and merges to master branch, syntax code verification, compiling and building code, deployment process, infrastructure scaling up and down, provisioning environments, and of course test automation in many different levels, such as unit, integration, UI, interoperability (more on item 6), and even visual regression testing.</p><p>The <strong>benefits</strong> of automating as much as we can are many, but one of the most important ones is that <strong>we can move fast</strong>. Even before pushing the code to the version control system, we can quickly see if our code is using the standards defined by the team, for example. By the way, this is the topic for the next item, so, let’s move on.</p><p><strong>2. Use linting rules to “enforce” best practices</strong></p><p>Since a big part of our source code uses JavaScript, we benefit of <a href="http://eslint.org"><strong>ESLint</strong></a> to <strong>define and enforce</strong> that the <strong>standards</strong> are being followed when we’re coding.</p><p>ESLint is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code. It does both traditional linting (looking for problematic patterns) and style checking (enforcement of conventions).</p><p>By using such practice, even with a team of more than 10 engineers, we ensure a <strong>coding style that everyone understands</strong> and we use <strong>good practices</strong> applied in many other successful projects. Also, this allows us to <strong>focus on what matters</strong>, instead of “manually or visually” checking code syntax.</p><p>Some examples of rules that enforce best practices are:</p><ul><li>array-callback-return — enforce return statements in callbacks of array methods</li><li>camelcase — enforce camelcase naming convention</li><li>indent — enforce consistent indentation</li><li>and much more.</li></ul><p>In a code review process, for instance, instead of looking to coding syntax issues, the reviewer can <strong>look at the architecture of what is being developed</strong>, and provide valuable feedback to solve such problem in a good way. And talking about code review, let’s move to the next item.</p><p><strong>3. Code review is a very good way to improve coding skills</strong></p><p>By practicing and enforcing the code review process we can <strong>learn with our teammate’s experience</strong>. We use <a href="https://git-scm.com"><strong>git</strong></a> to manage versions of our source code, and this allows us to work with <a href="https://help.github.com/articles/about-pull-requests/"><strong>pull requests</strong></a>.</p><p>A feature branch (or a pull request) can only be merged to master after code review approval, besides having to pass all the already mentioned tests.</p><p><strong>4. Run experiments</strong></p><p>I’ve learned that this is one of the best ways of understanding what works and what does not work, to move or continue in a specific direction. We run <strong>A/B experiments</strong> to understand what causes a positive impact on our users, as a way to deliver to them a service they like to use. <strong>We experiment new things internally</strong>, before putting new features into production. <strong>We use feature flags</strong> so that we can deploy new features to production and experiment with a reduced group of users, allowing us to learn and improve a lot before removing the flag and making the feature available for all our user’s base. And we also experiment in “internal projects”, such as using a new technology, for example, as we’re doing with visual regression tests.</p><p><strong>5. Learn and apply new technologies</strong></p><p>The nice thing about <strong>technology </strong>is that it i<strong>s always evolving</strong>. Every day a better way of solving specific or general problems are available and we take benefit of it. <strong>We are totally encouraged to learn and apply new technologies to make our service up to date with what is new in the market</strong> and to make sure we don’t stop in our comfort zone.</p><p>Some examples of the recent changes we did regarding of using new technologies are:</p><ul><li>We moved our code base from ECMAScript 5 to ECMAScript 2015.</li><li>In some parts of our app, we are moving from AngularJS to React.</li><li>We used to have only unit and integration tests, and now we have even visual regression tests.</li></ul><p><strong>6. Interoperability testing</strong></p><p>As a video conference service based on <a href="http://webrtc.org"><strong>WebRTC</strong></a>, we need to ensure that our service works in the browsers that support this technology, and we need to automatically test if the core functionalities of our application works as expected in real use cases, such as verifying if audio and video are being correctly sent and received when two or more people are in the same room, for example, or if screen sharing works as expected, in both free and PRO versions.</p><p>This is possible with <strong>WebRTC end-to-end tests</strong>, and we have tests for many different cases in this matter.</p><p><strong>7. Infrastructure as code</strong></p><p>I heard a lot about infrastructure as code before working at <a href="https://appear.in"><strong>appear.in</strong></a>, but I have not had the real experience of deploying infrastructure in cloud services in an automated way and everything being code.</p><p>Many of our services run on <a href="https://aws.amazon.com"><strong>AWS</strong></a>, and to create a computational instance, a security group, a network topology, a storage, or any other kind of infrastructure, we use <a href="http://terraform.io"><strong>Terraform</strong></a>, which makes this totally controlled and secure, to roll back to an earlier working production environment, for example, in case an infrastructure change broke something that was already working, beyond many other benefits, such as having infrastructure changes being reviewed as any other kind of code.</p><p><strong>8. Work on small things</strong></p><p>A very good way to <strong>make progress</strong> is <strong>by working on small tasks</strong> that are part of a big one. In our product development process, we work with 2 weeks sprints, and we move with small steps, one after the other <strong>to achieve great results</strong>.</p><p>I remember when I started working as part of this team, and instead of splitting the main task I had in smaller ones, I tried to do all at once. In other words, I worked in the same pull request for two weeks, and when it was time to merge it (after all the verifications and code review process), I needed to solve conflicts and it took at least one or two days more of work.</p><p>Today I prefer to have small achievements and work in small pull requests, even if they need to be something like part 1 and part 2, but at least this way I have a <strong>quick feedback in the code review process</strong> and I have <strong>no code conflicts to solve</strong>, or at least less (in some cases). It’s all about quick wins.</p><p><strong>9. Refactor without mercy</strong></p><p>It is very nice when everyone in the team understands <strong>the importance of making the code better</strong>, for being able to develop a service in a sustainable way.</p><p>In the same sprint, some of the engineers will be working on new features, others in bug fixes, and others in making the code every day better than the day before, with refactoring.</p><p>In <a href="http://programmer.97things.oreilly.com/wiki/index.php/The_Boy_Scout_Rule"><strong>the boy scout rule</strong></a> it is mentioned that you, as a boy scout, need to leave the camp cleaner than you found it, and this is what we do with our code, because we care about it, and we care about it because we know we spend more time reading code, then actually writing it. Also, because we care about each other.</p><p>We split code of big files in smaller ones for separating responsibilities and for ease maintenance. In the code review process, we suggest better functions and variables naming, for making the code readable. Also, we try to solve complex issues in simple ways, using sophisticated code standards and working with <strong>emerging architecture</strong>.</p><p><strong>10. Pipelines as code</strong></p><p>We use <strong>continuous integration and continuous delivery</strong> as part of our software development process, with help of a great tool called <a href="http://gocd.io"><strong>gocd</strong></a>, and even our <a href="https://github.com/tomzo/gocd-yaml-config-plugin"><strong>pipelines are created as code</strong></a>, which makes the process of creating or updating a pipeline easy and low cost to maintain.</p><p>I know a lot more learnings will come and I’m looking forward to it, but I thought you would like to know a bit of what were the learnings so far, and maybe you can tell me what is your perception about all of this. Leave a comment!</p><p>If you liked the post, leave some 👏🏻, so your network will have the chance to read it as well.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=857576a68121" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-making-of-whereby/lessons-learned-so-far-as-a-software-engineer-working-at-appear-in-857576a68121">Lessons learned (so far) as a software engineer working at appear.in</a> was originally published in <a href="https://medium.com/the-making-of-whereby">The Whereby Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>