<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Harriet Ayugi</title>
    <description>The latest articles on DEV Community by Harriet Ayugi (@hariclerry).</description>
    <link>https://dev.to/hariclerry</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F523609%2Fe6dac078-3424-4b29-93c7-8b795a8cda11.jpeg</url>
      <title>DEV Community: Harriet Ayugi</title>
      <link>https://dev.to/hariclerry</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hariclerry"/>
    <language>en</language>
    <item>
      <title>JavaScript Closure Simplified</title>
      <dc:creator>Harriet Ayugi</dc:creator>
      <pubDate>Mon, 12 May 2025 20:56:57 +0000</pubDate>
      <link>https://dev.to/hariclerry/javascript-closure-simplified-f2m</link>
      <guid>https://dev.to/hariclerry/javascript-closure-simplified-f2m</guid>
      <description>&lt;p&gt;Have you ever wondered how JavaScript functions can "remember" things even after they've finished running? That’s the magic of closures, and today we’ll break it down with a simple use case: building a custom counter function. We’ll touch on key concepts like function factories and state persistence to bring this idea home.&lt;/p&gt;

&lt;p&gt;Closures:&lt;br&gt;
In JavaScript, a closure is created when an inner function keeps access to variables defined in its outer function, even after the outer function has returned.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9e62oc6u5qc1rz04x17o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9e62oc6u5qc1rz04x17o.png" alt="closure code snippet" width="800" height="493"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For example, in our counter, a variable count is defined inside makeCounter(). The inner function (the actual counter) uses this variable. Thanks to the closure, the count is not lost when makeCounter() finishes, the counter function still remembers it.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Function Factory: One Function, Many Counters
Think of makeCounter() as a factory. Every time you call it, it gives you a brand new counter, like a fresh instance with its own private count. Each counter is completely independent.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6mx3tge3z0x65hokwtna.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6mx3tge3z0x65hokwtna.png" alt="code snippet" width="800" height="513"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;State That Sticks(State Persistence)
The beauty of closures is state persistence. Since count is part of the closed-over scope, it keeps its value between function calls. That’s what allows the returned function to keep incrementing the same number, step by step.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The key takeaway: even though makeCounter() is finished, the returned function still has access to everything defined inside it. That’s the closure in action, enabling encapsulation, memory, and a clean way to manage state without global variables.&lt;/p&gt;

&lt;p&gt;Closures aren’t just cool, they’re powerful. Once you understand them, you’ll start seeing them everywhere in JavaScript. And best of all, they make patterns like private counters, once complex, totally natural.&lt;/p&gt;

</description>
      <category>closure</category>
      <category>javascript</category>
      <category>scope</category>
    </item>
    <item>
      <title>Evaluation of Microsoft Playwright</title>
      <dc:creator>Harriet Ayugi</dc:creator>
      <pubDate>Thu, 04 Mar 2021 12:30:26 +0000</pubDate>
      <link>https://dev.to/hariclerry/evaluation-of-microsoft-playwright-28oi</link>
      <guid>https://dev.to/hariclerry/evaluation-of-microsoft-playwright-28oi</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Test automation is a way to automate a browser by simulating user actions like clicks. Applications become more complex as they are built on layers and entire networks of sub-systems, including UI and API layers, external databases, networks, and even third-party integrations. So, there is always a need for thorough testing to be done. This ranges from unit testing to end-to-end testing of applications. Test automation is one of the ways to ascertain the stability and the health of applications. That can lead to the success of the application when in production. The general stability of the application doesn't entirely depend on end-to-end testing but it surely helps to detect bugs in applications, among other benefits.&lt;/p&gt;

&lt;p&gt;Below are some of the popular test automation frameworks being used;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.selenium.dev/" rel="noopener noreferrer"&gt;Selenium&lt;/a&gt; (&lt;a href="https://webdriver.io/" rel="noopener noreferrer"&gt;WebdriverIO&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developers.google.com/web/tools/puppeteer/" rel="noopener noreferrer"&gt;Puppeteer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.cypress.io/" rel="noopener noreferrer"&gt;Cypress&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://playwright.dev/" rel="noopener noreferrer"&gt;Playwright&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Playwright maybe the new kid on the block but it's gaining quite a trajectory among software developers and testers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Background
&lt;/h2&gt;

&lt;p&gt;The Playwright evaluation is a result of a need for to check if WebdriverIO is still a good test automation framework compared to some of the best non-Selenium modern test automation frameworks. MediaWiki is implemented in a large number of repositories. So, in order to ensure good code practices across all these repositories, an extensive amount of testing is performed. One of the tests performed is an end-to-end test. WebdriverIO is the current browser automation framework being used for implementing the end-to-end tests. However, with the recent increase in awareness about end-to-end testing, a number of equally competitive non-Selenium solutions have been introduced and one of them is Playwright.&lt;/p&gt;

&lt;p&gt;At the time of choosing which automation framework to use in the implementation of the test automation, extensive research was done and an &lt;a href="https://filipin.eu/selenium-javascript" rel="noopener noreferrer"&gt;evaluation of WebdriverIO&lt;/a&gt; was carried out by Željko Filipin, who is a Senior Engineer in Test at Wikimedia Foundation and also one of my mentors. To verify if WebdriverIO is still a great testing framework for MediaWiki, a number of modern and non-Selenium automation frameworks have been evaluated against WebdriverIO. These evaluations were done by Soham Parekh who was Google Summer of Code 2020 intern and is also one of my mentors and &lt;a href="https://www.mediawiki.org/wiki/User:SimTran" rel="noopener noreferrer"&gt;Sim T.H. Tran&lt;/a&gt;. These evaluations can be found in the links below;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.mediawiki.org/wiki/User:SimTran/Cypress_vs_WebdriverIO:_What_are_the_differences%3F" rel="noopener noreferrer"&gt;Cypress Evaluation&lt;/a&gt; by Sim T.H. Tran.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.sohamp.dev/blog/2020-08-24-wmf-gsoc2020/" rel="noopener noreferrer"&gt;Puppeteer Evaluation&lt;/a&gt; by Soham Parekh.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, this brings us to the current framework being evaluated against WebdriverIO, which is Playwright. The evaluations progress involved the following steps;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Configuring and setting up of Wikimedia Core to run on continuous integration, in this case on &lt;a href="https://docs.github.com/en/actions" rel="noopener noreferrer"&gt;Github Actions&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Implementation of all MediaWiki Core tests in Playwright.&lt;/li&gt;
&lt;li&gt;Running MediaWiki Core tests in WebdriverIO.&lt;/li&gt;
&lt;li&gt;Analysis of both WebdriverIO and Playwright tests in terms of speed and stability.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  WebdriverIO
&lt;/h2&gt;

&lt;p&gt;WebdriverIO is a test automation framework that allows you to run tests based on the WebDriver protocol and Appium automation technology.&lt;/p&gt;

&lt;p&gt;WebdriverIO provides the ability and options to run commands in both asynchronous and synchronous operations. For asynchronous operations, you can use the JavaScript usual async/await, however for synchronous, it can be done through &lt;a href="https://www.npmjs.com/package/fibers" rel="noopener noreferrer"&gt;node-fibers&lt;/a&gt;. Both of these options have their own benefits and issues which can be found on the &lt;a href="https://webdriver.io/docs/sync-vs-async" rel="noopener noreferrer"&gt;WebdriverIO&lt;/a&gt; website.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sample WebdriverIO Code
&lt;/h3&gt;

&lt;p&gt;The code snippet below navigates to wikipedia.org in Chrome and checks if the correct title is being displayed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;remote&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;webdriverio&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
 &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;browser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;remote&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
        &lt;span class="na"&gt;capabilities&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;browserName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;chrome&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;browser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;url&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://www.wikipedia.org/&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;browser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getTitle&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toHaveTitle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;The Free Encyclopedia&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;browser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;deleteSession&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;})();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Mocha
&lt;/h3&gt;

&lt;p&gt;The WebdriverIO WDIO runner currently supports Mocha, Jasmine, and Cucumber frameworks and WikiMedia Core test is currently using Mocha framework. &lt;a href="https://mochajs.org/" rel="noopener noreferrer"&gt;Mocha&lt;/a&gt; is a feature-rich JavaScript test framework running on Node.js and in the browser, making asynchronous testing simple and fun.&lt;/p&gt;

&lt;p&gt;WebdriverIO provides an adapter for Mocha which can easily be added as &lt;code&gt;@wdio/mocha-framework&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sample Mocha Code
&lt;/h3&gt;

&lt;p&gt;The code snippet below navigates to wikipedia.org in Chrome and checks if the correct title is being displayed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;remote&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;webdriverio&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Wikipedia home page&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;browser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;remote&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
        &lt;span class="na"&gt;capabilities&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;browserName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;chrome&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;

  &lt;span class="nf"&gt;it&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;should display correct page title&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;browser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;url&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://www.wikipedia.org/&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;browser&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toHaveTitle&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;The Free Encyclopedia&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;browser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;deleteSession&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;})();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  WebdriverIO Advantages
&lt;/h3&gt;

&lt;p&gt;WebdriverIO offers some great pros such as;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Extendable, adding helper functions, or more complicated sets and combinations of existing commands is simple and really useful.&lt;/li&gt;
&lt;li&gt;It's Compatibility nature enables it to run on the WebDriver Protocol for true cross-browser testing as well as Chrome DevTools Protocol for Chromium-based automation using Puppeteer.&lt;/li&gt;
&lt;li&gt;Rich feature with huge variety of community plugins that allows you to easily integrate and extend your setup to fulfill your requirements.&lt;/li&gt;
&lt;li&gt;Stable features.&lt;/li&gt;
&lt;li&gt;Synchronous implementation of asynchronous browser commands.&lt;/li&gt;
&lt;li&gt;Excellent API documentation.&lt;/li&gt;
&lt;li&gt;Support for modern web and mobile frameworks.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  WebdriverIO Disadvantages
&lt;/h3&gt;

&lt;p&gt;WebdriverIO also presents some cons such as;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Additional effort to set up browser driver with selenium-standalone or ChromeDriver especially in v5 and below.&lt;/li&gt;
&lt;li&gt;Much slower compared to frameworks like Playwright and Puppeteer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To explore more WebdriverIO capabilities, you can check out the WebdriverIO and &lt;a href="https://www.mediawiki.org/wiki/Selenium" rel="noopener noreferrer"&gt;MediaWiki documentation&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Playwright
&lt;/h2&gt;

&lt;p&gt;Playwright is a Node.js library to automate Chromium, Firefox, and WebKit with a single API.&lt;/p&gt;

&lt;p&gt;While working with Playwright for the past few months, it has come across as easy to install and setup. The package takes care of installing all the browsers (Chromium, Firefox, and WebKit). Capturing screenshots is an out-of-the-box experience. However, video recording requires separate installation of &lt;a href="https://playwright.tech/blog/record-your-browser-tests-with-playwright" rel="noopener noreferrer"&gt;playwright-video and ffmpeg&lt;/a&gt; but they all blend in with Playwright seamlessly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sample Playwright Code
&lt;/h3&gt;

&lt;p&gt;The code snippet below navigates to wikipedia.org in Chrome and checks if the correct title is being displayed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;chromium&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;playwright&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;expect&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;expect-playwright&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;browser&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nx"&gt;browser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;chromium&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;launch&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="nx"&gt;page&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;browser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;newPage&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;goto&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://www.wikipedia.org/&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;$&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.localized-slogan&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toEqualText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;The Free Encyclopedia&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;browser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;close&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;})();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Jest
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://jestjs.io/" rel="noopener noreferrer"&gt;Jest&lt;/a&gt; is a delightful JavaScript testing framework with a focus on simplicity. Playwright can be integrated into a project in two ways and one of them is by using the &lt;a href="https://github.com/playwright-community/jest-playwright" rel="noopener noreferrer"&gt;jest-playwright&lt;/a&gt; which has rich features like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Multi-browser and device (like iPhones with given screen sizes) support.&lt;/li&gt;
&lt;li&gt;jest-dev-server integration which can start your webserver like create-react-app before running the tests.&lt;/li&gt;
&lt;li&gt;expect-playwright integration which provides common expect helper functions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;jest-playwright is added to the jest configuration as a preset which makes all the features available to be used at your disposal. It was inspired by &lt;a href="https://github.com/smooth-code/jest-puppeteer/blob/master/README.md#start-a-server" rel="noopener noreferrer"&gt;jest-puppeteer&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Sample Jest Code
&lt;/h3&gt;

&lt;p&gt;The code snippet below navigates to wikipedia.org in Chrome and checks if the correct title is being displayed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;chromium&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;playwright&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nf"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Wikipedia home page&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;browser&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nx"&gt;browser&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;chromium&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;launch&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="nx"&gt;page&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;browser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;newPage&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="nf"&gt;it&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;should display correct page title&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;goto&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://www.wikipedia.org/&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;title&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;title&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;title&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;The Free Encyclopedia&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;browser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;close&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Playwright Advantages
&lt;/h3&gt;

&lt;p&gt;Playwright offers some great pros such as;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Test across all modern browsers with single API to automate Chromium, Firefox and WebKit.&lt;/li&gt;
&lt;li&gt;The API can be used in JavaScript &amp;amp; TypeScript, Python, C# and Java.&lt;/li&gt;
&lt;li&gt;It's simple to set up.&lt;/li&gt;
&lt;li&gt;Stable features.&lt;/li&gt;
&lt;li&gt;Bidirectional (events) – automating things like console logs is easy.&lt;/li&gt;
&lt;li&gt;Auto-wait for elements to be ready before executing actions (like click, fill).&lt;/li&gt;
&lt;li&gt;Intercept network activity for stubbing and mocking network requests.&lt;/li&gt;
&lt;li&gt;Seamless integration with Jest.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Playwright Disadvantages
&lt;/h3&gt;

&lt;p&gt;Playwright also presents some cons such as;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It is very new so the APIs are evolving.&lt;/li&gt;
&lt;li&gt;Has no support for IE11 or non-browser platforms.&lt;/li&gt;
&lt;li&gt;Documentations and community are not as good as the other framework yet.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To explore more on Playwright capability, you can check out the Playwright documentation and my &lt;a href="https://github.com/hariclerry/mediawiki/tree/master/tests/playwright" rel="noopener noreferrer"&gt;MediaWiki Core fork&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Playwright Vs WebdriverIO
&lt;/h2&gt;

&lt;p&gt;The below table is a comparison between Playwright and WebdriverIO in terms of;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Performance&lt;/li&gt;
&lt;li&gt;Developer Experience&lt;/li&gt;
&lt;li&gt;Documentation&lt;/li&gt;
&lt;li&gt;Ecosystem/Community&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Key Factors&lt;/th&gt;
&lt;th&gt;Playwright&lt;/th&gt;
&lt;th&gt;WebdriverIO&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Performance&lt;/td&gt;
&lt;td&gt;- Fast &lt;br&gt;- Stable &lt;br&gt;- Reliable&lt;/td&gt;
&lt;td&gt;- Slower &lt;br&gt;- Stable  &lt;br&gt;- Reliable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Developer Experience&lt;/td&gt;
&lt;td&gt;- Simple setup  &lt;br&gt;- Javascript-based&lt;/td&gt;
&lt;td&gt;- Additional browser driver set up (v5 and below) &lt;br&gt;- No additional browser driver set up (v6+)  &lt;br&gt;- Javascript-based&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Documentation&lt;/td&gt;
&lt;td&gt;- Great documentation &lt;br&gt;- Detailed instructions &lt;br&gt;- Good example projects&lt;/td&gt;
&lt;td&gt;- Fairly good documentation &lt;br&gt;- Great example projects&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Community&lt;/td&gt;
&lt;td&gt;- New framework &lt;br&gt;- Smaller community &lt;br&gt;- Few maintainers&lt;/td&gt;
&lt;td&gt;- Larger community &lt;br&gt;- Many maintainers&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  Statistics
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxooc2mbdva51yvbmbpte.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxooc2mbdva51yvbmbpte.png" alt="Alt Text" width="800" height="443"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The above data was adopted from &lt;a href="https://www.npmtrends.com/cypress-vs-playwright-vs-puppeteer-vs-selenium-vs-testcafe" rel="noopener noreferrer"&gt;npm trends&lt;/a&gt; showing WebdriverIO and Playwright downloads. From the above charts, we see that WebdriverIO still trumps Playwright when it comes to popularity among the testing community.&lt;/p&gt;

&lt;h3&gt;
  
  
  MediaWiki Core Tests
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqx2favb3gkrb86809vea.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqx2favb3gkrb86809vea.png" alt="Alt Text" width="800" height="304"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The above visualized chart represents data that was collected by running MediaWiki Core tests in WebdriverIO and Playwright. A total of 10 tests were run using both frameworks on Github Actions platform.&lt;/p&gt;

&lt;p&gt;The tests were run 40 times in both frameworks to ascertain stability and reliability. No flakiness and failures were encountered during the tests run. As shown above, there is consistency in time when the tests were run in WebdriverIO and Playwright.&lt;/p&gt;

&lt;p&gt;The above chart further shows that Playwright is much faster than WebdriverIO in terms of speed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Migrating From WebdriverIO
&lt;/h3&gt;

&lt;p&gt;From the various evaluations done with Playwright, there seems to be great potential replacement in the future. Playwright seem to stand out in terms of both speed and stability. However, the question being asked is, is it worth migrating from WebdriverIO to another test automation framework? Let’s look at the advantages and disadvantages of a potential migration.&lt;/p&gt;

&lt;h3&gt;
  
  
  Advantages
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;WebdriverIO is &lt;a href="https://en.wikipedia.org/wiki/JavaScript" rel="noopener noreferrer"&gt;JavaScript&lt;/a&gt; based and is built over &lt;a href="https://en.wikipedia.org/wiki/Node.js" rel="noopener noreferrer"&gt;Node.js&lt;/a&gt; just like Playwright thus making it easier for developers to stick to the same programming language in the face of a potential switch to Playwright.&lt;/li&gt;
&lt;li&gt;The MediaWiki Core test implementation follows the Page Object Pattern, this would make it easy to write Playwright tests using the existing structure.&lt;/li&gt;
&lt;li&gt;Playwright has a number of useful features that come with it like the reset helper functions and single API to automate Chromium, Firefox and WebKit, among others. Some of these features are missing in WebdriverIO thus making Playwright a better option for a switch.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Disadvantages
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Investment in WebdriverIO tool. Most tests are already written in WebdriverIO. About 30 MediaWiki repositories use it, so migrating from it to another tool would require a great deal of time and manpower.&lt;/li&gt;
&lt;li&gt;Update of documentation. Most documentation is already written and has references to WebdriverIO. Updating the documentation would require some time.&lt;/li&gt;
&lt;li&gt;WebdriverIO incorporates Puppeteer as second automation driver tool allowing for the extra features which pretty much make up for some of the features that Playwright has, hence no much point in switching to Playwright.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Refactor existing tests.&lt;/li&gt;
&lt;li&gt;Evaluate Puppeteer.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;As of the above statistics and comparison, Playwright is a better alternative tool over WebdriverIO in terms of speed. However, WebdriverIO is a great tool given that it keeps evolving, new and modern features are being added to it and the community is still vibrant and supportive. With the recent release of &lt;a href="https://webdriver.io/blog/2021/02/09/webdriverio-v7-released/" rel="noopener noreferrer"&gt;WebdriverIO v7&lt;/a&gt; which has some great feature update, and the fact that WebdriverIO incorporates a framework like Puppeteer as second automation driver tool makes WebdriverIO a powerful test automation framework. There is also a potential integration with Playwright in the near future. As of the time of the evaluation, there are no plans to switch to a different test automation framework but this could change in the future.&lt;/p&gt;

&lt;h2&gt;
  
  
  Acknowledgement
&lt;/h2&gt;

&lt;p&gt;The completion of this project wouldn't have been a success without the support of my mentors, &lt;a href="https://filipin.eu/" rel="noopener noreferrer"&gt;Željko Filipin&lt;/a&gt;, &lt;a href="https://www.vidhimody.me/" rel="noopener noreferrer"&gt;Vidhi Mody&lt;/a&gt; and &lt;a href="https://www.sohamp.dev/" rel="noopener noreferrer"&gt;Soham Parekh&lt;/a&gt;. I do appreciate the constant guidance, meetings, advice, code reviews, challenging, pair programmings, to mention but a few, that were offered during the project execution.&lt;/p&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.testim.io/blog/puppeteer-selenium-playwright-cypress-how-to-choose/" rel="noopener noreferrer"&gt;Puppeteer, Selenium, Playwright, Cypress – how to choose?&lt;/a&gt; by Benjamin Gruenbaum.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://playwright.tech/blog/using-jest-with-playwright" rel="noopener noreferrer"&gt;Using Jest with Playwright&lt;/a&gt; by Max Schmitt.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://2020.stateofjs.com/en-US/technologies/testing/#testing_experience_ranking" rel="noopener noreferrer"&gt;State of JS 2020: Testing&lt;/a&gt; by Sacha Greif and Raphaël Benitte.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/playwright-community/" rel="noopener noreferrer"&gt;Playwright Community&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>What is next.....??</title>
      <dc:creator>Harriet Ayugi</dc:creator>
      <pubDate>Sun, 07 Feb 2021 22:53:05 +0000</pubDate>
      <link>https://dev.to/hariclerry/what-is-next-4f38</link>
      <guid>https://dev.to/hariclerry/what-is-next-4f38</guid>
      <description>&lt;p&gt;It has been over two months into my internship at &lt;a href="https://www.wikimedia.org/" rel="noopener noreferrer"&gt;Wikimedia foundations&lt;/a&gt; under the &lt;a href="https://www.outreachy.org/" rel="noopener noreferrer"&gt;Outreachy&lt;/a&gt; program. I have written some blog posts about the internship &lt;a href="https://dev.to/dashboard?sort=views-desc"&gt;here&lt;/a&gt;. I'm really excited about the journey so far. There has been a lot of learning, building stuff, and experiences. Before starting to contribute to open source projects, I had the imposter syndrome whereby, I felt like because I didn't know much, I would fail and be probably be ousted but to my surprise, open-source communities are one of the most patient and tolerant communities I have ever come across! My mentors have been so supportive during this journey and I'm really grateful for that.&lt;/p&gt;

&lt;p&gt;The internship will be ending in a few weeks and the question that I'm asking myself right now is, what is next? I have thought about this and I have come to the conclusion that I need to get a job or internship as I continue to make contributions to Wikimedia foundations after the internship. I will be taking the following steps when the internship ended;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Go on a vacation for a week or two&lt;/li&gt;
&lt;li&gt;Update my Resume&lt;/li&gt;
&lt;li&gt;Update my Linkedin&lt;/li&gt;
&lt;li&gt;Apply for jobs&lt;/li&gt;
&lt;li&gt;Network by joining active community groups or job opportunities mailing groups.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;During my internship, most of the work I have been doing is related to test automation and a bit of continuous integration. Prior to the internship, I have had experience building frontend applications using Javascript/ReactJs. Below are some of the experiences and skills I have gained during the internship;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Test automation using Microsoft playwright&lt;/li&gt;
&lt;li&gt;Continuous integration using Github actions
With these skills and experiences, I'm open to remote roles with Frontend and Test automation full-time/part-time job opportunities or internships. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Moving forward, I do plan to continue learning more about test automation and test automation frameworks like WebdriverIO, Puppeteer, and Cypress.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Internship Project Progress</title>
      <dc:creator>Harriet Ayugi</dc:creator>
      <pubDate>Tue, 19 Jan 2021 13:19:20 +0000</pubDate>
      <link>https://dev.to/hariclerry/internship-project-progress-aok</link>
      <guid>https://dev.to/hariclerry/internship-project-progress-aok</guid>
      <description>&lt;p&gt;It has been about one and a half months into the internship with &lt;a href="https://www.wikimedia.org/" rel="noopener noreferrer"&gt;Wikimedia&lt;/a&gt;. I have written a number of blog &lt;a href="https://dev.to/dashboard"&gt;posts&lt;/a&gt; about my journey and the project I'm currently working on. Just a little a bit of a refresher about the project I'm working on, it's &lt;strong&gt;Evaluation of Microsoft Playwright as a replacement for the Wikimedia browser automation&lt;/strong&gt;. Before I had started working on the project back in December, there were some estimated project goals and deadlines that I had set such as;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;implementation of existing tests across moderately sized repo's in Microsoft Playwright&lt;/li&gt;
&lt;li&gt;Introduce video recording and screenshots of tests&lt;/li&gt;
&lt;li&gt;Benchmark Playwright against Puppeteer (using the previous implementation) and WebdriverIO.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;However, when the internship started, I and my mentors came up with more clear and defined project milestones such as;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dec 1 to Dec 15- Run Playwright tests in Continous Integration(CI)&lt;/li&gt;
&lt;li&gt;Dec 15 to Feb 01- Implement MediaWiki/core tests in Playwright&lt;/li&gt;
&lt;li&gt;Feb 02 to March 01- Benchmark Playwright against WebdriverIO (and Puppeteer).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;From the time the internship commenced, I started by setting up the project such as forking and cloning the MediaWiki/core repository from Github since it was decided that the evaluation of the Playwright would be done on Github instead of Gerrit to minimize some CI related issues. The first milestone(Run Playwright tests in CI) involves a number of tasks such as;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Setting up CI pipeline&lt;/li&gt;
&lt;li&gt;Configuring Nodejs, Docker, test to run in CI&lt;/li&gt;
&lt;li&gt;Configuring and Setting up Playwright, running MediaWiki-docker in CI, running sample Playwright test in CI, etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The above tasks were estimated to take two weeks, however, it took me about a month to accomplish the first milestone, some of the reasons for the delay are;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I started working with Travis CI as the CI tool for the project, however, within a week into the implementation, we realized that Travis CI doesn't store artifacts out of the box, it requires additional setup and configurations such as using AWS, Github pages, or any other external services to store artifacts. So, to simplify the workflow and configurations, we decided to use Github actions as the CI pipeline for the project. Configuring and setting up Github actions took me about a week.&lt;/li&gt;
&lt;li&gt;Configuring and Setting up Playwright, running MediaWiki-docker in CI, running sample Playwright test in CI took me about two weeks, there were issues like running MediaWiki-docker successfully too.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The general setup of the project was more complicated than I had anticipated but with much help from the mentors, whereby we could have several meetings a day and pair programming to resolve issues. I have managed to complete the first milestone even though it has taken me more time than expected.&lt;/p&gt;

&lt;p&gt;I'm currently working on the implementation of the second milestone(Implement MediaWiki/core tests in Playwright). This milestone involves writing and implementing different MediaWiki/core test suites in Playwright. There is so far tremendous progress with writing the tests as the overall project goals and expectations become much clearer. I'm working towards ensuring that all the tests are written within a week and start working on the implementation of the third milestone(Benchmark Playwright against WebdriverIO (and Puppeteer)), which should take me about two weeks.&lt;/p&gt;

&lt;p&gt;Looking back at how far I have come with working on the project, there are a couple of things I think I would have done differently;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Do prior research on Continuous integration tools that would suit the need of the project instead of just settling for a tool that I was familiar with(Travis CI).&lt;/li&gt;
&lt;li&gt;Perhaps asked for more help from my mentors during the setup and configurations.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With all the changes and challenges, I have also learned quite a valuable lesson about project estimations, that it's good to set deadlines and milestones, they help in achieving the end goal of the project but they are also expected to change as implementation begins and progresses. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Evaluation of Microsoft Playwright framework</title>
      <dc:creator>Harriet Ayugi</dc:creator>
      <pubDate>Tue, 05 Jan 2021 08:28:05 +0000</pubDate>
      <link>https://dev.to/hariclerry/evaluation-of-microsoft-playwright-framework-325o</link>
      <guid>https://dev.to/hariclerry/evaluation-of-microsoft-playwright-framework-325o</guid>
      <description>&lt;p&gt;It has been over a month since I started my internship with Wikimedia under the outreachy program. &lt;a href="https://www.wikimedia.org/" rel="noopener noreferrer"&gt;Wikimedia&lt;/a&gt; is a global movement whose mission is to bring free educational content to the world and strives to bring about a world in which every single human being can freely share in the sum of all knowledge. Wikimedia is the platform that runs Wikipedia and it's &lt;a href="https://en.wikipedia.org/wiki/Wikipedia:Wikimedia_sister_projects" rel="noopener noreferrer"&gt;sister projects&lt;/a&gt;. Wikimedia constitutes a global community of educators, learners, librarians, software developers, to mention but a few. The project that I'm working on is called &lt;a href="https://www.mediawiki.org/wiki/MediaWiki" rel="noopener noreferrer"&gt;MediaWiki&lt;/a&gt; which is used to collect and organize knowledge and make it available to people. It's implemented in PHP and powers a number of websites. I'm specifically working on the &lt;strong&gt;Evaluation of Microsoft Playwright as a replacement for the Wikimedia browser automation&lt;/strong&gt; project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project context&lt;/strong&gt;&lt;br&gt;
Wikimedia supports a large number of repositories as well as extensions. In order to ensure good code practices across all these repositories, an extensive amount of testing is performed and one of the tests performed is an end to end test. &lt;a href="https://webdriver.io/" rel="noopener noreferrer"&gt;WebdriverIO&lt;/a&gt; is the current browser automation framework being used for implementing end to end test. However, with the recent increase in awareness about an end to end testing, a number of equally competitive non-selenium solutions have been introduced and one of them is &lt;a href="https://github.com/microsoft/playwright" rel="noopener noreferrer"&gt;Microsoft Playwright&lt;/a&gt;. So, the goal of the project is to evaluate Microsoft Playwright against WebdriverIO as a potential replacement for the Wikimedia browser automation framework.&lt;/p&gt;

&lt;p&gt;Automated browser testing is a suite of tools to author, manage and run tests against browsers across platforms. Some of the common browser automation tools used are Selenium, Cypress, Puppeteer, and Microsoft Playwright. Microsoft Playwright is the newest addition to the list of the framework,  it's an open-source, JavaScript-based, cross-browser automation library for end-to-end testing. Playwright provides a single API to automate web applications across three major browser engines; Chromium, Firefox, and, WebKit which makes it different from the other Automated browser frameworks.&lt;/p&gt;

&lt;p&gt;There has been a lot of learning new things during this process so far. I have implemented unit test before, however, it is my first time implementing automated browser testing and there has been a lot of learning and implementation of new things such as; the different browser automation frameworks, how to use Github actions as continuous integration(CI) pipeline, learn about Microsoft Playwright and its implementation to mention but a few. This is both a challenging and exciting project for me to work on and hopefully, the evaluation of Microsoft Playwright will turn out to be successful and become the automation tool for Wikimedia.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Struggle, the road to growth</title>
      <dc:creator>Harriet Ayugi</dc:creator>
      <pubDate>Thu, 24 Dec 2020 08:39:05 +0000</pubDate>
      <link>https://dev.to/hariclerry/struggle-the-road-to-growth-217b</link>
      <guid>https://dev.to/hariclerry/struggle-the-road-to-growth-217b</guid>
      <description>&lt;p&gt;It has been more than 3 weeks into my Outreachy internship with Wikimedia foundations. The internship started well and the project that I'm working on is about evaluating &lt;a href="https://github.com/microsoft/playwright" rel="noopener noreferrer"&gt;Microsoft playwright&lt;/a&gt; as a possible replacement to the current automation testing framework being used. Week one was mostly about setting up the Wikimedia core by forking and cloning the Wikimedia core repository from Github. In order to simplify continuous integration, we are using Github as our code hosting platform to evaluate playwright instead of using Gerrit. The setup involved the following steps;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Forking the Wikimedia repository&lt;/li&gt;
&lt;li&gt;Cloning the repository, setting up and running it on my local machine&lt;/li&gt;
&lt;li&gt;Connecting my forked with upstream&lt;/li&gt;
&lt;li&gt;Configuring CI.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Week two followed up with more configurations and installations of dependencies, configuring CI to work with docker, run test, etc. The configurations and setup continued into week 3, I continued with setting up and configuring Playwright, jest, etc. On the third week, my mentors and I realized that Travis CI might not be the best CI tool to use for continuous integration in evaluating playwright because of a couple of reasons;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Travis CI doesn't store artifacts out of the box, it requires additional setup and configurations such as using AWS, Github pages, or any other external services to store artifacts.&lt;/li&gt;
&lt;li&gt;travis-ci.org is shutting down soon and will be migrating to travis-ci.com. So, to simplify the workflow and configurations, we decided to use Github actions as the CI pipeline for the project.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The change to using Github actions meant that I had to abandon Travis CI and move to Github actions whereby, I had to take a little bit of time to learn and get familiar with how Github actions work. Moving to Github actions has been a great idea because I'm seeing the tests and linter run much faster and we are now able to store artifacts by just adding minimal configurations. This has come with its own challenges like learning how to use GitHub actions and falling behind the project milestones and deadlines. I have struggled with a number of issues like;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How to work with the forked repository, updating upstream with the forked repo. There was a time when I updated the upstream with my master and immediately rebased with a feature branch, this added all the commits from upstream and messed up all my commits, we had to abandon the pull request and created a new branch. I learned from this. It has been a bit of a challenge and learning when it comes to working with a forked repo but with the help of my mentors, I'm getting past this.&lt;/li&gt;
&lt;li&gt;I have had several issues with setting up and configuring jest with Microsoft playwright, but my mentors have been there to help unblock me.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All in all, I have learned so much so far within this short time and have been able to make progress with the project. I'm also putting in extra effort to ensure that I hit the project milestones in time. My mentors have been very helpful in pointing me in the right direction whenever I get stuck or have issues with the tasks I'm working on. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>To dream a dream. My outreachy Journey</title>
      <dc:creator>Harriet Ayugi</dc:creator>
      <pubDate>Tue, 01 Dec 2020 13:23:03 +0000</pubDate>
      <link>https://dev.to/hariclerry/to-dream-a-dream-my-outreachy-journey-23f6</link>
      <guid>https://dev.to/hariclerry/to-dream-a-dream-my-outreachy-journey-23f6</guid>
      <description>&lt;p&gt;The year 2020 has been a year of massive change in the entire world, there are mixed feelings of loss, confusion among others, but all in all, there is always hope that keeps us moving forward. I must say that being accepted as an Outreachy intern has been that ray of light at the end of the tunnel that I needed to end the year and begin the new year. &lt;a href="https://www.outreachy.org/" rel="noopener noreferrer"&gt;Outreachy&lt;/a&gt; is a paid, remote internship program with the goal to support people from groups underrepresented in tech. Starting my career in the field of software engineering has been a journey of hard work, persistence, and seizing every opportunity since where I come from such opportunities are rare and the support for women's engagement in technology is quite low. &lt;/p&gt;

&lt;p&gt;My journey into being accepted as an outreachy intern started when I submitted my application about 3 months ago, the whole&lt;br&gt;
&lt;a href="https://www.outreachy.org/apply/" rel="noopener noreferrer"&gt;Outreachy application&lt;/a&gt; takes approximately 3 months. During the application process, I got the opportunity to contribute to open-source projects, which is one of the requirements of the initial application process. Contributing to open-source projects is something new to me, I had never contributed to any open-source project before even though I have been coding for a while now. This is a completely new path for me in my career as a Software Engineer and it's one I'm truly excited to embark on, though a bit scary but I know that great things will come out of it!.&lt;/p&gt;

&lt;p&gt;As part of the outreachy program, I got accepted as an intern at Wikimedia as a Software Developer intern, which will last for 3 months, and December 1st marks my day as an official Wikimedia intern. Excited!!. &lt;a href="https://www.wikimedia.org/" rel="noopener noreferrer"&gt;Wikimedia&lt;/a&gt; is a global movement whose mission is to bring free educational content to the world. One of the reasons why I'm passionate about technology is the impact it makes in the lives of people and in the world at large, the kind of impact I see Wikimedia making by providing free educational content. I'm thrilled to be working with such a community of great and smart minded people and continue to make an impact by building and contributing to open source. I have the privilege to be mentored by &lt;a href="https://twitter.com/vidhi_mody" rel="noopener noreferrer"&gt;Vidhi Mody&lt;/a&gt;, &lt;a href="https://twitter.com/zeljkofilipin" rel="noopener noreferrer"&gt;Željko Filipin&lt;/a&gt;, and &lt;a href="https://twitter.com/und3fined_v01d" rel="noopener noreferrer"&gt;Soham Parekh&lt;/a&gt; whom I look forward to learning from and collaborating with.&lt;/p&gt;

&lt;p&gt;Keep an eye on this corner for more blog posts and adventure! I will be blogging about my experience with the new technology I will be using, Outreachy, internship experience at Wikimedia, Open source projects, to mention but a few.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
