<feed xmlns="http://www.w3.org/2005/Atom"><title>Test Platform Blog</title><id>https://phabricator.wikimedia.org/phame/blog/feed/21/</id><link rel="self" type="application/atom+xml" href="https://phabricator.wikimedia.org/phame/blog/feed/21/" /><updated>2026-01-14T15:03:38+00:00</updated><subtitle>Written with ❤️ by #test-platform </subtitle><entry><title>Web Performance at FOSDEM 2025</title><link href="/phame/live/21/post/319/web_performance_at_fosdem_2025/" /><id>https://phabricator.wikimedia.org/phame/post/view/319/</id><author><name>Peter (Peter Hedenskog)</name></author><published>2025-03-07T06:18:59+00:00</published><updated>2025-06-08T11:05:46+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>At <a href="https://fosdem.org/2025/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Fosdem 2025</a> I had the opportunity to arrange the <a href="https://fosdem.org/2025/schedule/track/web-performance/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Web Performance developer room</a> together with Dave, Julien and Nazim from Mozilla.</p>

<p>FOSDEM is a completely free and open conference held annually in Brussels, Belgium, dedicated to promoting free and open-source software and knowledge sharing. One thing I particularly like about FOSDEM is that all speakers volunteer their time and expertise, making it truly community-driven. All sessions were recorded, so I&#039;m excited to share the videos here for those who couldn&#039;t attend.</p>

<p>Our developer room was fully packed during several sessions, it was great to see that people still care about web performance.</p>

<p><div class="phabricator-remarkup-embed-layout-center"><a href="https://phab.wmfusercontent.org/file/data/woxvlngtvfhrvdac4hvc/PHID-FILE-urntdibjvltragif2nzf/web-performance-fosdem-2025.jpg" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_0"><img src="https://phab.wmfusercontent.org/file/data/woxvlngtvfhrvdac4hvc/PHID-FILE-urntdibjvltragif2nzf/web-performance-fosdem-2025.jpg" width="400" alt="People waiting for the first session to start" /></a></div></p>

<p>Here are the talks from our Web Performance room this year:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item"><em>How browsers REALLY load Web pages</em> - <strong>Robin Marx </strong> (<a href="https://video.fosdem.org/2025/ua2220/fosdem-2025-4852-how-browsers-really-load-web-pages.mp4" class="remarkup-link remarkup-link-ext" rel="noreferrer">video</a>)</li>
<li class="remarkup-list-item"><em>Making Sense of the Long Animation Frames (LoAF) API</em> - <strong>Andy Davies</strong> (<a href="https://video.fosdem.org/2025/ua2220/fosdem-2025-6376-making-sense-of-the-long-animation-frames-loaf-api.mp4" class="remarkup-link remarkup-link-ext" rel="noreferrer">video</a>)</li>
<li class="remarkup-list-item"><em>Scheduling HTTP streams</em> - <strong>Alexander Krizhanovsky</strong> (<a href="https://video.fosdem.org/2025/ua2220/fosdem-2025-4903-scheduling-http-streams.mp4" class="remarkup-link remarkup-link-ext" rel="noreferrer">video</a>)</li>
<li class="remarkup-list-item"><em>Chromium on Android: How we doubled Speedometer &amp; developed the LoadLine benchmark</em> - <strong>Eric Seckler, Gurj Bahia</strong> (<a href="https://video.fosdem.org/2025/ua2220/fosdem-2025-5253-chromium-on-android-how-we-doubled-speedometer-developed-the-loadline-benchmark.mp4" class="remarkup-link remarkup-link-ext" rel="noreferrer">video</a>)</li>
<li class="remarkup-list-item"><em>Collaborate using the Firefox Profiler </em>- <strong>Nazım Can Altınova</strong> (<a href="https://video.fosdem.org/2025/ua2220/fosdem-2025-6738-collaborate-using-the-firefox-profiler.mp4" class="remarkup-link remarkup-link-ext" rel="noreferrer">video</a>)</li>
</ul>

<p>Enjoy watching the talks!</p></div></content></entry><entry><title>Google Web Vitals, 75th percentile and why every milliseconds count on Wikipedia</title><link href="/phame/live/21/post/318/google_web_vitals_75th_percentile_and_why_every_milliseconds_count_on_wikipedia/" /><id>https://phabricator.wikimedia.org/phame/post/view/318/</id><author><name>Peter (Peter Hedenskog)</name></author><published>2024-12-20T14:49:14+00:00</published><updated>2025-02-15T07:27:08+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>In late 2023, an <a href="https://www.technewsworld.com/story/craigslist-wikipedia-zillow-top-list-of-fastest-us-websites-178713.html" class="remarkup-link remarkup-link-ext" rel="noreferrer">article</a> claimed that Wikipedia is one of the fastest websites in the USA. Flattering, right? I&#039;ve been  measuring web performance for over a decade, I couldn&#039;t help but wonder: How did they measure that? How do you know that Wikipedia is one of the fastest websites? The article does not say anything on how they did measure it.</p>

<p>I went to the Web Performance Slack channel (yes, there&#039;s a dedicated place where web performance geeks hang out). I asked the question:</p>

<blockquote><p>“Has anyone seen the data or the actual “study” done by DigitalSilk about the fastest loading US websites? <a href="https://www.technewsworld.com/story/craigslist-wikipedia-zillow-top-list-of-fastest-us-websites-178713.html" class="remarkup-link remarkup-link-ext" rel="noreferrer">https://www.technewsworld.com/story/craigslist-wikipedia-zillow-top-list-of-fastest-us-websites-178713.html</a> - I can only find references to it and a screenshot, nothing else?”</p></blockquote>

<p>Not providing references? That&#039;s not Wikipedia! We&#039;re all about citations and verifiable sources. No one on the Slack channel knew anything about how the test was run. But then, one of the channel members took action: Stoyan Stefanov emailed the journalist and actually got an answer!</p>

<blockquote><p>Methodology<br />
The most visited websites based on web traffic were ran through Google&#039;s PageSpeed Insights tool, to find out how long it takes for each site to load in full on average“</p></blockquote>

<p>So, while it&#039;s flattering to see Wikipedia crowned as one of the fastest websites based on Google&#039;s PageSpeed Insights tool, I couldn&#039;t help but feel a tricked. They seemed to rely on the onload metric. That&#039;s a metric that, in the web performance world was regarded as old and <a href="https://www.stevesouders.com/blog/2013/05/13/moving-beyond-window-onload/" class="remarkup-link remarkup-link-ext" rel="noreferrer">not correlating to user experience since 2013</a>.</p>

<p>Understanding the limitations using the onload metric, let’s shift our focus to modern metrics that better reflect real-world user experiences: <em>Google Web Vitals</em></p>

<h3 class="remarkup-header">Google Web Vitals</h3>

<p><a href="https://web.dev/articles/vitals" class="remarkup-link remarkup-link-ext" rel="noreferrer">Google Web Vitals</a> is Google&#039;s initiative to focus on the metrics that matter to users and  <a href="https://developers.google.com/search/docs/appearance/core-web-vitals" class="remarkup-link remarkup-link-ext" rel="noreferrer">also affects Googles core ranking system</a>. Unlike the old-school onload time, Google Web Vitals better measure aspects of real world user experience.</p>

<p>The core metrics at the moment are three metrics:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item"><strong>Large Contentful Paint</strong> (LCP) - when in time is the largest element painted on the users screen. For Wikipedia that is very often a paragraph, but sometimes its an image element or a heading.</li>
<li class="remarkup-list-item"><strong>Interaction To Next Paint</strong> (INP) - measure the responsiveness of page, meaning that a page responds quickly to user interactions. For Wikipedia the responsiveness can be slow depending on the amount of JavaScript we ship, event listeners or click events.</li>
<li class="remarkup-list-item"><strong>Cumulative Layout Shift</strong>  (CLS) - measure the visual stability of the page. That means it measures if content is moved around. In the Wikipedia case this means when campaigns runs and we move the content of Wikipedia.</li>
</ul>

<p>Google also have two other web vitals, two metrics that are important for the user experience but not listed as core:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item"><strong>Time To First Byte</strong> (TTFB) -  measure the time between the request for a resource and when the first byte of a response begins to arrive. For Wikipedia TTFB depends on where the users are in the world and how far it is to the closest data center.</li>
<li class="remarkup-list-item"><strong>First Contentful Paint</strong> (FCP) - measure the time from when the user first navigated to the page to when any part of the page&#039;s text/images painted on the screen. For Wikipedia this is often text.</li>
</ul>

<p>Google pay special attention to the 75th percentile of those metrics. It was chosen because <a href="https://web.dev/articles/defining-core-web-vitals-thresholds" class="remarkup-link remarkup-link-ext" rel="noreferrer">&quot;First, the percentile should ensure that a majority of visits to a page or site experienced the target level of performance. Second, the value at the chosen percentile shouldn&#039;t be overly impacted by outliers.&quot;.</a> But what does the 75 percentile mean for us at Wikipedia?</p>

<h3 class="remarkup-header">The 75th percentile at Wikipedia</h3>

<p>Now let’s put the 75th percentile into perspective by applying it to Wikipedia’s vast global audience.</p>

<p>Imagine that there were 100 people visiting Wikipedia. Each person got a different user experience because of their device, the internet connection and how we build Wikipedia. For some users the experience will be really fast, for some it will be slower.</p>

<p>The <strong>75th percentile</strong> focus on the worst experience of the best 75%. If you take all 100 users and then sort the experience from fastest to slowest, the 75th experience is where you draw the line. This means that 75% of the users had a better or equal experience and 25% had a worse one.  So, how many users are in that 25% for us? We measure unique devices and not users so lets use that.</p>

<p>Well, for Wikipedia, those 100 users are actually <strong><a href="https://wikimediafoundation.org" class="remarkup-link remarkup-link-ext" rel="noreferrer">1,5 billion unique devices</a> </strong> per month and  <strong><a href="https://stats.wikimedia.org/#/all-projects" class="remarkup-link remarkup-link-ext" rel="noreferrer">24 billion page views</a></strong>.</p>

<p>That means if we look at the 75 percentile and we see that a metric move we know that at least <strong>6 billion page</strong> views per month ( 24 billion × 0.25) is affected. And <strong>375 million</strong> unique devices (1.5 billion × 0.25).</p>

<p>That is many devices. Suppose we have a regression of just <strong>100 milliseconds</strong> in the 75th percentile. That is at least 375 million devices are experiencing this delay. Collectively, those users are waiting an extra <strong>434 days</strong>. Yes, over a year of extra wait time for the users with the worst experience because of a (tiny) 100 ms change.</p>

<h3 class="remarkup-header">Is the English Wikipedia the fastest website in the USA according to Google Web Vitals?</h3>

<p>With the metrics Google collects from different web sites, you can compare different sites with each other!  The metrics are available per domain (not user country), so we can not compare if the English Wikipedia is one of the fastest web sites in the USA, but we can compare the English Wikipedia against other web entities with users all around the world.</p>

<p>However before we do that, I want to point out that &quot;Is the English Wikipedia fastest website in USA according to Google Web Vitals?&quot; is a very exclusionary question to ask since:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">The English Wikipedia is used in more places than the USA</li>
<li class="remarkup-list-item">There are many Wikipedias for other languages out there and we should not only focus on the English Wikipedia. We need to make sure that everyone independent of language has the same user experience.</li>
</ul>

<p>Looking just at &quot;Are we fast in the USA&quot;  we leave out a big part of the world. So today we gonna look at the English Wikipedia compared to other web sites and then also look at Wikipedias all around the world to see what kind of user experience all users have.</p>

<p>But first let&#039;s talk about how Google also categorises these experiences as good, needs improvement, or poor by setting specific limits for each metric. With Googles definitions we can see how many of our users have different kinds of experiences. In the data I will show, green means good, needs improvement yellow and red means bad/poor experience.</p>

<p>We collect all data that is available through the Chrome User Experience API and you can see that in our <a href="https://grafana.wikimedia.org/d/t_bhsNGMk/chrome-user-experience-report" class="remarkup-link remarkup-link-ext" rel="noreferrer">Chrome User Experience dashboard</a>. There&#039;s a lot of metrics, so I will focus on just the Largest Contentful Paint today.</p>

<p>First let&#039;s look at the actual 75 percentile Largest Contentful Paint. We compare against a couple of other web sites. Lower numbers are better. Green is good. We will start to look at the numbers for mobile.</p>

<h4 class="remarkup-header">Mobile</h4>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/3u7c2yequ24aqtco3f42/PHID-FILE-7klcixcvmp3tsm4fujmi/Screenshot_2024-12-06_at_05.30.50.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_1"><img src="https://phab.wmfusercontent.org/file/data/3u7c2yequ24aqtco3f42/PHID-FILE-7klcixcvmp3tsm4fujmi/Screenshot_2024-12-06_at_05.30.50.png" width="400" alt="Screenshot 2024-12-06 at 05.30.50.png (500×922 px, 76 KB)" /></a></div></p>

<p>This graph highlights that Wikipedia&#039;s mobile LCP performance is nearly as fast as Google&#039;s, which is quite remarkable!</p>

<p>We can also look at how many of our users have a slow/bad experience.</p>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/7hlufitniht53ovfigyf/PHID-FILE-ybw5gc6bmvxxraw7ne2y/Screenshot_2024-12-06_at_05.30.35.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_2"><img src="https://phab.wmfusercontent.org/file/data/7hlufitniht53ovfigyf/PHID-FILE-ybw5gc6bmvxxraw7ne2y/Screenshot_2024-12-06_at_05.30.35.png" width="400" alt="Screenshot 2024-12-06 at 05.30.35.png (500×910 px, 72 KB)" /></a></div></p>

<p>Wow we can see that we have less users in percentage with a bad experience than the rest of the sites. However the graph shows a small percentage of mobile users experiencing suboptimal LCP. For a website of Wikipedia&#039;s scale, this small percentage translates into millions of users, we need to be even better!</p>

<p>I wonder if it&#039;s the same for desktop users? Lets look at the 75 percentile again.</p>

<h4 class="remarkup-header">Desktop</h4>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/nbhnxloshkxvkic73nby/PHID-FILE-gbbuwhkjaqnad4mz356k/Screenshot_2024-12-06_at_05.30.20.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_3"><img src="https://phab.wmfusercontent.org/file/data/nbhnxloshkxvkic73nby/PHID-FILE-gbbuwhkjaqnad4mz356k/Screenshot_2024-12-06_at_05.30.20.png" width="400" alt="Screenshot 2024-12-06 at 05.30.20.png (504×920 px, 74 KB)" /></a></div></p>

<p>Again we can see that Wikipedia is almost the fastest, outperforming many major websites! We seem to be fast on both mobile and desktop.</p>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/xgqvcc66uy7rxhywdjjd/PHID-FILE-g4u43o3on6gmdq2etftm/Screenshot_2024-12-06_at_05.30.07.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_4"><img src="https://phab.wmfusercontent.org/file/data/xgqvcc66uy7rxhywdjjd/PHID-FILE-g4u43o3on6gmdq2etftm/Screenshot_2024-12-06_at_05.30.07.png" width="400" alt="Screenshot 2024-12-06 at 05.30.07.png (498×914 px, 73 KB)" /></a></div></p>

<p>Yes we are really fast! Can we open the champagne and celebrate?</p>

<h3 class="remarkup-header">Are we the fastest site known to human kind?</h3>

<p>Well I would take it a little easy here before we start to brag. Do you remember how we calculated how many users are left out when we use the 75 percentile? I would be careful with a web site with so many users. I would say that: &quot;The English Wikipedia is really fast compared to other web pages looking at the Largest Contentful Paint at the 75% percentile for Chrome users that Google collects metrics from&quot;.</p>

<p>Another way of looking at the data we get from Google is to see how many users have a bad experience using Wikipedia. By taking the ones that need improvement and poor experience, we can see how many users in percentage we need to move to having a good experience.</p>

<p>First let&#039;s look at Largest Contentful Paint again for desktop users. This time we look at the number of users in percentage that have a non good experience per wiki.</p>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/vbug42dxivs5hwujpyjr/PHID-FILE-hibhzs3gnkofozpcz4qa/Screenshot_2024-12-20_at_13.34.43.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_5"><img src="https://phab.wmfusercontent.org/file/data/vbug42dxivs5hwujpyjr/PHID-FILE-hibhzs3gnkofozpcz4qa/Screenshot_2024-12-20_at_13.34.43.png" width="100%" alt="Screenshot 2024-12-20 at 13.34.43.png (1×3 px, 382 KB)" /></a></div></p>

<p>And then we look at the same for mobile.<br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/e6am753pv2lbxhw5w5af/PHID-FILE-zz3wk74dwhdk4zlpcz4x/Screenshot_2024-12-20_at_13.35.57.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_6"><img src="https://phab.wmfusercontent.org/file/data/e6am753pv2lbxhw5w5af/PHID-FILE-zz3wk74dwhdk4zlpcz4x/Screenshot_2024-12-20_at_13.35.57.png" width="100%" alt="Screenshot 2024-12-20 at 13.35.57.png (1×3 px, 402 KB)" /></a></div></p>

<p>We can see that on desktop and mobile we have Wikipedias where we as developers have work to do to give more users a good experience.</p>

<p>As a last example I want to share the interaction to next paint data for mobile. This is interesting because here JavaScript comes into play and there are many things we can do on our side to give the user a better experience.</p>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/hxd5yjc3l56msoe2ytet/PHID-FILE-fkgrxleafjhqhvtlkxal/Screenshot_2024-12-20_at_13.37.08.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_7"><img src="https://phab.wmfusercontent.org/file/data/hxd5yjc3l56msoe2ytet/PHID-FILE-fkgrxleafjhqhvtlkxal/Screenshot_2024-12-20_at_13.37.08.png" width="100%" alt="Screenshot 2024-12-20 at 13.37.08.png (1×3 px, 406 KB)" /></a></div></p>

<p>We see that for almost every Wikipedia, 5% of the users have a not so good user experience.</p>

<h3 class="remarkup-header">Summary</h3>

<p>Wikipedia&#039;s performance story is one of scale and precision. By focusing on Google Web Vitals, we&#039;ve seen how milliseconds of delay can impact millions of users. Metrics like Largest Contentful Paint (LCP) and Interaction to Next Paint (INP) can provide valuable insights into real-world user experiences, guiding us to optimize for both mobile and desktop users.</p>

<p>With billions of page views monthly, even the smallest regressions in performance ripple across the globe. Yet, Wikipedia stands as a benchmark of speed in the US, rivaling even the likes of Google. This achievement underscores the importance of continuous monitoring, fine-tuning, and maintaining a user-first perspective in web development.</p>

<p>As we celebrate, we also need to acknowledge the challenges. Moving the needle for those users with &quot;non-good&quot; experiences remains our mission. By using data and ongoing analysis, we can ensure that Wikipedia stays fast, accessible, and enjoyable for everyone, everywhere.</p></div></content></entry><entry><title>Refactoring WebdriverIO Tests From Sync to Async Mode</title><link href="/phame/live/21/post/317/refactoring_webdriverio_tests_from_sync_to_async_mode/" /><id>https://phabricator.wikimedia.org/phame/post/view/317/</id><author><name>zeljkofilipin (Željko Filipin)</name></author><published>2024-10-15T09:47:25+00:00</published><updated>2024-12-15T05:11:03+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><h3 class="remarkup-header">Prehistory</h3>

<p>It&#039;s hard to believe it, but there were <a href="https://en.wikipedia.org/wiki/Selenium_(software)" class="remarkup-link remarkup-link-ext" rel="noreferrer">Selenium</a> tests in Wikimedia repositories even before I joined the Wikimedia Foundation. (12 years ago, in 2012.) In <a href="https://www.mediawiki.org/wiki/Core" class="remarkup-link remarkup-link-ext" rel="noreferrer">MediaWiki Core</a>, Selenium tests (in PHP) existed from <a href="https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/74d34f58ddb1c464649872a9fe8d60d6bf0d4828" class="remarkup-link remarkup-link-ext" rel="noreferrer">2010</a> until <a href="https://gerrit.wikimedia.org/r/c/mediawiki/core/+/68729" class="remarkup-link remarkup-link-ext" rel="noreferrer">2013</a>.</p>

<p>When I started working for the Foundation, Selenium tests (in Ruby) existed in the <a href="https://gerrit.wikimedia.org/g/qa/browsertests" class="remarkup-link remarkup-link-ext" rel="noreferrer">qa/browsertests</a> repository. The repository was active from <a href="https://gerrit.wikimedia.org/r/plugins/gitiles/qa/browsertests/+/799066db4b49393a14460bc66d654498309ddeab" class="remarkup-link remarkup-link-ext" rel="noreferrer">2012</a> until <a href="https://gerrit.wikimedia.org/r/plugins/gitiles/qa/browsertests/+/799ff37c0841932b02e38095cda50d2429c1aadf" class="remarkup-link remarkup-link-ext" rel="noreferrer">2014</a>. Tests from the <tt class="remarkup-monospaced">qa/browsertests</tt> repository moved to the MediaWiki Core repository in <a href="https://gerrit.wikimedia.org/r/c/mediawiki/core/+/133507" class="remarkup-link remarkup-link-ext" rel="noreferrer">2014</a>. They lived in <tt class="remarkup-monospaced">tests/browser</tt> folder until <a href="https://gerrit.wikimedia.org/r/c/mediawiki/core/+/343847" class="remarkup-link remarkup-link-ext" rel="noreferrer">2017</a>. (<a href="https://phabricator.wikimedia.org/T139740" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_8"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T139740</span></span></a>)</p>

<h3 class="remarkup-header">History</h3>

<p>In <a href="https://gerrit.wikimedia.org/r/c/mediawiki/core/+/328191" class="remarkup-link remarkup-link-ext" rel="noreferrer">2017</a> we decided to rewrite Selenium tests in Javascript.</p>

<p>Since then we had a few major framework updates:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">Port Selenium tests from Ruby to Node.js (2016 - 2023) (<a href="https://phabricator.wikimedia.org/T139740" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_9"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T139740</span></span></a>)</li>
<li class="remarkup-list-item">Evaluate WebdriverIO replacements for our browser automation framework (2020) (<a href="https://phabricator.wikimedia.org/T247835" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_10"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T247835</span></span></a>)</li>
<li class="remarkup-list-item">Upgrade WebdriverIO to v6 in all repositories (2020-2021) (<a href="https://phabricator.wikimedia.org/T247844" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_11"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T247844</span></span></a>)</li>
<li class="remarkup-list-item">Evaluate Microsoft Playwright as replacement for our browser automation (2020-2021) (<a href="https://phabricator.wikimedia.org/T262682" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_12"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T262682</span></span></a>)</li>
<li class="remarkup-list-item">Upgrade WebdriverIO to v7 in all repositories (2021-2023) (<a href="https://phabricator.wikimedia.org/T274579" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_13"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T274579</span></span></a>)</li>
<li class="remarkup-list-item">Switch to spec reporter (2021-2024) (<a href="https://phabricator.wikimedia.org/T280331" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_14"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T280331</span></span></a>)</li>
<li class="remarkup-list-item">Refactor WebdriverIO tests from sync to async mode (2020-2024) (<a href="https://phabricator.wikimedia.org/T256626" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_15"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T256626</span></span></a>)</li>
</ul>

<h3 class="remarkup-header">Async</h3>

<p>The sync to async migration is just one of the major updates to the framework. But, it&#039;s an important one.</p>

<p>In 2021 WebdriverIO <a href="https://webdriver.io/blog/2021/07/28/sync-api-deprecation/" class="remarkup-link remarkup-link-ext" rel="noreferrer">announced</a> they are deprecating the sync framework. In 2020 I created an epic task (<a href="https://phabricator.wikimedia.org/T256626" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_16"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T256626</span></span></a>) to track the migration in more than thirty repositories. (I&#039;m not sure why I created the task before the announcement. Maybe I knew the change was coming in advance.) I had resolved the task in 2024. It took us a while.</p>

<p>The migration project started with an <a href="https://filipin.eu/outreachy-2022" class="remarkup-link remarkup-link-ext" rel="noreferrer">internship</a> (2021-2022). During the internship we did the majority of the migration. The internship lasted only a few months. We tried to migrate as many repositories as possible. We managed to migrate repositories that didn&#039;t give us a lot of trouble. The few remaining repositories were hard to migrate.</p>

<p>This <a href="https://gerrit.wikimedia.org/r/q/bug:T256626+OR+bug:T293071+OR+bug:T300790+OR+bug:T300791+OR+bug:T300212+OR+bug:T321904+OR+bug:T300793+OR+bug:T300196+OR+bug:T300205+OR+bug:T334094+OR+bug:T293073+OR+bug:T299684+OR+bug:T300535+OR+bug:T293074+OR+bug:T299102+OR+bug:T293076+OR+bug:T293078+OR+bug:T293072+OR+bug:T293079+OR+bug:T300797+OR+bug:T300798+OR+bug:T300208+OR+bug:T300800+OR+bug:T299756+OR+bug:T293080+OR+bug:T343886+OR+bug:T293081+OR+bug:T293082+OR+bug:T293084+OR+bug:T300807+OR+bug:T300808" class="remarkup-link remarkup-link-ext" rel="noreferrer">monster Gerrit search</a> finds most commits related to this project. There are 92 commits. 58 merged, 34 abandoned.</p>

<p>We started strong in 2020, but  we were not able to finish the migration for several repositories. The main problem was technical. We could not set up a working development environment for some repositories (<a href="https://phabricator.wikimedia.org/T344682" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_17"><span class="phui-tag-core phui-tag-color-object">T344682</span></a>).</p>

<p>At the <a href="https://filipin.eu/wikimedia-hackathon-2024" class="remarkup-link remarkup-link-ext" rel="noreferrer">Wikimedia Hackathon 2024</a> I talked with several people from <a href="https://www.wikimedia.de/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Wikimedia Deutschland</a> about the async project. (At least with <a href="https://phabricator.wikimedia.org/p/Lucas_Werkmeister_WMDE/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_67"><span class="phui-tag-core phui-tag-color-person">@Lucas_Werkmeister_WMDE</span></a> and <a href="https://phabricator.wikimedia.org/p/WMDE-Fisch/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_68"><span class="phui-tag-core phui-tag-color-person">@WMDE-Fisch</span></a>.) After looking at the tracking Phabricator task (<a href="https://phabricator.wikimedia.org/T256626" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_18"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T256626</span></span></a>), they said their repositories are already migrated to async, but nobody closed the subtasks.</p>

<h3 class="remarkup-header">Documentation</h3>

<p>After closing relevant subtasks, the only thing left to do was to update the documentation (<a href="https://phabricator.wikimedia.org/T364268" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_19"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T364268</span></span></a>). All of our documentation was using sync syntax. After the hackathon I started updating the documentation.</p>

<p>After looking at the documentation I realized that there are several pages with a lot of code on them. All of the code was now broken. If we update the code now, it will become broken the next time we make a change to our framework. Nobody would know that the sample code on a wiki page was broken. That is, until somebody tried to use it.</p>

<p>To solve the problem of broken code on wiki pages, we have decided to move all sample code to MediaWiki Core (<a href="https://phabricator.wikimedia.org/T368535" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_20"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T368535</span></span></a>). That way, we would be reminded (actually, forced) to update the sample code at the same time we update the framework. If we update the framework and not the sample code, our continuous integration would break.</p>

<p>I had a lot of help from people on my team. We have an office hours meeting almost every day. I was working on the documentation during the day and asking for feedback during the meeting. The process worked great.</p>

<p>When all the code was moved from the wiki pages to MediaWiki Core and updated to use async syntax, we copy/pasted the code back to the wiki pages. That&#039;s the last remaining step that is still manual. Nobody on my team knew how to embed a file in a wiki page. If you know how to do it, please let me know.</p>

<p>Updating the documentation finished the async migration project.</p>

<h3 class="remarkup-header">Languages and Tools</h3>

<p>While doing some online archaeology for this blog post, I stumbled upon Selenium tests in Wikimedia projects written in <a href="https://en.wikipedia.org/wiki/PHP" class="remarkup-link remarkup-link-ext" rel="noreferrer">PHP</a> (<a href="https://codesearch.wmcloud.org/search/?q=selenium&amp;files=\.php" class="remarkup-link remarkup-link-ext" rel="noreferrer">search</a>), <a href="https://en.wikipedia.org/wiki/Python_(programming_language)" class="remarkup-link remarkup-link-ext" rel="noreferrer">Python</a> (<a href="https://codesearch.wmcloud.org/search/?q=selenium&amp;files=%5C.py" class="remarkup-link remarkup-link-ext" rel="noreferrer">search</a>) and <a href="https://en.wikipedia.org/wiki/Ruby_(programming_language)" class="remarkup-link remarkup-link-ext" rel="noreferrer">Ruby</a> (<a href="https://codesearch.wmcloud.org/search/?q=selenium&amp;files=%5C.rb" class="remarkup-link remarkup-link-ext" rel="noreferrer">search</a>).</p>

<p>Also, Selenium is not the only tool we use for end-to-end testing. There&#039;s <a href="https://en.wikipedia.org/wiki/Cypress_(software)" class="remarkup-link remarkup-link-ext" rel="noreferrer">Cypress</a> (<a href="https://codesearch.wmcloud.org/search/?q=cypress" class="remarkup-link remarkup-link-ext" rel="noreferrer">search</a>), <a href="https://pptr.dev/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Puppeteer</a> (<a href="https://codesearch.wmcloud.org/search/?q=puppeteer&amp;excludeFiles=node_modules" class="remarkup-link remarkup-link-ext" rel="noreferrer">search</a>), <a href="https://en.wikipedia.org/wiki/Playwright_(software)" class="remarkup-link remarkup-link-ext" rel="noreferrer">Playwright</a> (<a href="https://codesearch.wmcloud.org/search/?q=playwright" class="remarkup-link remarkup-link-ext" rel="noreferrer">search</a>) and <a href="https://nightwatchjs.org/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Nightwatch</a> (<a href="https://codesearch.wmcloud.org/search/?q=nightwatch&amp;excludeFiles=node_modules" class="remarkup-link remarkup-link-ext" rel="noreferrer">search</a>).</p>

<h3 class="remarkup-header">Future</h3>

<p>We&#039;re currently working on a few projects that will further improve our Selenium testing framework. There are plenty of future improvements we plan to do. See <em>Selenium Framework Updates Timeline</em> section at the end of the article for more information.</p>

<p>A notable project is <a href="/T344682" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_21"><span class="phui-tag-core phui-tag-color-object">T344682: Run Selenium tests targeting available local and remote testing environments</span></a>. We need testing environments for more than forty repositories. Unfortunately, that&#039;s not a solved problem. There are many options, but I&#039;m not sure that any of them would work with all repositories. A good solution would be to find at least one development environment where a particular repository would work. If that means we have to use multiple environments to get all repositories working locally, I&#039;m fine with that. I&#039;m not happy with that, but even that would be an improvement over the current situation. For some repositories we don&#039;t have a working local development environment at all.</p>

<h3 class="remarkup-header">Async Migration Timeline</h3>

<ul class="remarkup-list">
<li class="remarkup-list-item">Core (2021-2022) (<a href="https://phabricator.wikimedia.org/T293071" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_22"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T293071</span></span></a>)</li>
<li class="remarkup-list-item">AbuseFilter (2022-2023) (<a href="https://phabricator.wikimedia.org/T300790" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_23"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T300790</span></span></a>)</li>
<li class="remarkup-list-item">AdvancedSearch (2022-2023) (<a href="https://phabricator.wikimedia.org/T300791" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_24"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T300791</span></span></a>)</li>
<li class="remarkup-list-item">CentralNotice (2022) (<a href="https://phabricator.wikimedia.org/T300212" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_25"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T300212</span></span></a>)</li>
<li class="remarkup-list-item">CheckUser (2022) (<a href="https://phabricator.wikimedia.org/T321904" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_26"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T321904</span></span></a>)</li>
<li class="remarkup-list-item">CirrusSearch (2022-2023) (<a href="https://phabricator.wikimedia.org/T300793" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_27"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T300793</span></span></a>)</li>
<li class="remarkup-list-item">Cite (2022-2023) (<a href="https://phabricator.wikimedia.org/T300196" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_28"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T300196</span></span></a>)</li>
<li class="remarkup-list-item">CodeMirror (2022-2023) (<a href="https://phabricator.wikimedia.org/T300205" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_29"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T300205</span></span></a>)</li>
<li class="remarkup-list-item">ContactPage (2023) (<a href="https://phabricator.wikimedia.org/T334094" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_30"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T334094</span></span></a>)</li>
<li class="remarkup-list-item">Echo (2021-2023) (<a href="https://phabricator.wikimedia.org/T293073" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_31"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T293073</span></span></a>)</li>
<li class="remarkup-list-item">ElectronPdfService (2022) (<a href="https://phabricator.wikimedia.org/T299684" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_32"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T299684</span></span></a>)</li>
<li class="remarkup-list-item">FileImporter (2022-2023) (<a href="https://phabricator.wikimedia.org/T300535" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_33"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T300535</span></span></a>)</li>
<li class="remarkup-list-item">GlobalWatchlist (2021-2023) (<a href="https://phabricator.wikimedia.org/T293074" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_34"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T293074</span></span></a>)</li>
<li class="remarkup-list-item">GrowthExperiments (2022) (<a href="https://phabricator.wikimedia.org/T299102" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_35"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T299102</span></span></a>)</li>
<li class="remarkup-list-item">Math (2021-2022) (<a href="https://phabricator.wikimedia.org/T293076" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_36"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T293076</span></span></a>)</li>
<li class="remarkup-list-item">Newsletter (2021-2022) (<a href="https://phabricator.wikimedia.org/T293078" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_37"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T293078</span></span></a>)</li>
<li class="remarkup-list-item">Popups (2021-2023) (<a href="https://phabricator.wikimedia.org/T293072" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_38"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T293072</span></span></a>)</li>
<li class="remarkup-list-item">ProofreadPage (2021-2023) (<a href="https://phabricator.wikimedia.org/T293079" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_39"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T293079</span></span></a>)</li>
<li class="remarkup-list-item">RelatedArticles (2022) (<a href="https://phabricator.wikimedia.org/T300797" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_40"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T300797</span></span></a>)</li>
<li class="remarkup-list-item">RevisionSlider (2022-2023) (<a href="https://phabricator.wikimedia.org/T300798" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_41"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T300798</span></span></a>)</li>
<li class="remarkup-list-item">TemplateWizard (2022-2023) (<a href="https://phabricator.wikimedia.org/T300208" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_42"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T300208</span></span></a>)</li>
<li class="remarkup-list-item">TwoColConflict (2022-2023) (<a href="https://phabricator.wikimedia.org/T300800" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_43"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T300800</span></span></a>)</li>
<li class="remarkup-list-item">VisualEditor (2022) (<a href="https://phabricator.wikimedia.org/T299756" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_44"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T299756</span></span></a>)</li>
<li class="remarkup-list-item">Wikibase (2021-) (<a href="https://phabricator.wikimedia.org/T293080" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_45"><span class="phui-tag-core phui-tag-color-object">T293080</span></a>, <a href="https://phabricator.wikimedia.org/T343886" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_46"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T343886</span></span></a>)</li>
<li class="remarkup-list-item">WikibaseLexeme (2021-2024) (<a href="https://phabricator.wikimedia.org/T293081" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_47"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T293081</span></span></a>)</li>
<li class="remarkup-list-item">WikiLambda (2021-2022) (<a href="https://phabricator.wikimedia.org/T293082" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_48"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T293082</span></span></a>)</li>
<li class="remarkup-list-item">MinervaNeue (2021-2023) (<a href="https://phabricator.wikimedia.org/T293084" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_49"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T293084</span></span></a>)</li>
<li class="remarkup-list-item">Termbox (2022-2023) (<a href="https://phabricator.wikimedia.org/T300807" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_50"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T300807</span></span></a>)</li>
<li class="remarkup-list-item">Wikibase Query Service GUI (2022-2024) (<a href="https://phabricator.wikimedia.org/T300808" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_51"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T300808</span></span></a>)</li>
<li class="remarkup-list-item">wdio-wikibase (2022-2023) (<a href="https://phabricator.wikimedia.org/T300811" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_52"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T300811</span></span></a>)</li>
</ul>

<h3 class="remarkup-header">Selenium Framework Updates Timeline</h3>

<h4 class="remarkup-header">Past</h4>

<ul class="remarkup-list">
<li class="remarkup-list-item">Port Selenium tests from Ruby to Node.js (2016 - 2023) (<a href="https://phabricator.wikimedia.org/T139740" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_53"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T139740</span></span></a>)</li>
<li class="remarkup-list-item">Evaluate WebdriverIO replacements for our browser automation framework (2020) (<a href="https://phabricator.wikimedia.org/T247835" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_54"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T247835</span></span></a>)</li>
<li class="remarkup-list-item">Upgrade WebdriverIO to v6 in all repositories (2020-2021) (<a href="https://phabricator.wikimedia.org/T247844" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_55"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T247844</span></span></a>)</li>
<li class="remarkup-list-item">Evaluate Microsoft Playwright as replacement for our browser automation (2020-2021) (<a href="https://phabricator.wikimedia.org/T262682" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_56"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T262682</span></span></a>)</li>
<li class="remarkup-list-item">Upgrade WebdriverIO to v7 in all repositories (2021-2023) (<a href="https://phabricator.wikimedia.org/T274579" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_57"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T274579</span></span></a>)</li>
<li class="remarkup-list-item">Refactor WebdriverIO tests from sync to async mode (2020-2024) (<a href="https://phabricator.wikimedia.org/T256626" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_58"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T256626</span></span></a>)</li>
<li class="remarkup-list-item">Switch to spec reporter (2021-2024) (<a href="https://phabricator.wikimedia.org/T280331" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_59"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T280331</span></span></a>)</li>
</ul>

<h4 class="remarkup-header">Present</h4>

<ul class="remarkup-list">
<li class="remarkup-list-item">Run Selenium tests targeting available local and remote testing environments (2023-) (<a href="https://phabricator.wikimedia.org/T344682" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_60"><span class="phui-tag-core phui-tag-color-object">T344682</span></a>)</li>
<li class="remarkup-list-item">Replace Node.js Assert library with WebdriverIO Expect library (2022-) (<a href="https://phabricator.wikimedia.org/T325740" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_61"><span class="phui-tag-core phui-tag-color-object">T325740</span></a>)</li>
</ul>

<h4 class="remarkup-header">Future</h4>

<ul class="remarkup-list">
<li class="remarkup-list-item">Upgrade WebdriverIO to v8 in all repositories (2022-) (<a href="https://phabricator.wikimedia.org/T324685" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_62"><span class="phui-tag-core phui-tag-color-object">T324685</span></a>)<ul class="remarkup-list">
<li class="remarkup-list-item">Use import instead of require (2024-) (<a href="https://phabricator.wikimedia.org/T373125" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_63"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T373125</span></span></a>)</li>
</ul></li>
<li class="remarkup-list-item">Upgrade WebdriverIO to v9 in all repositories (2024-) (<a href="https://phabricator.wikimedia.org/T363704" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_64"><span class="phui-tag-core phui-tag-color-object">T363704</span></a>)</li>
<li class="remarkup-list-item">Implement mediawiki core selenium test suite in popular alternatives (2022-) (<a href="https://phabricator.wikimedia.org/T325552" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_65"><span class="phui-tag-core phui-tag-color-object">T325552</span></a>)</li>
<li class="remarkup-list-item">Find flaky Selenium tests (2021-) (<a href="https://phabricator.wikimedia.org/T291254" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_66"><span class="phui-tag-core phui-tag-color-object">T291254</span></a>)</li>
</ul></div></content></entry><entry><title>Moving performance testing tools out of AWS</title><link href="/phame/live/21/post/315/moving_performance_testing_tools_out_of_aws/" /><id>https://phabricator.wikimedia.org/phame/post/view/315/</id><author><name>Peter (Peter Hedenskog)</name></author><published>2024-08-12T07:44:53+00:00</published><updated>2024-09-04T16:25:57+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Some time ago I did the final work to move out the web performance tooling out of Amazon Web Services (AWS). It&#039;s been a long journey. Let me tell you how it all started.</p>

<p>But first, what is the performance tooling? It&#039;s tools that automate the web browsers, where we navigate to Wikipedia and measure the performance of Wikipedia pages. When we are measuring the performance we want as stable server and environment as possible. The more stable server where we deploy our tool, the smaller performance regressions we can pick up.</p>

<h3 class="remarkup-header">The AWS Background</h3>

<p>In 2015 I deployed our first own hosted version of the Open Source web performance tool WebPageTest (<a href="https://phabricator.wikimedia.org/T109666" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_69"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T109666</span></span></a>). At that time, WebPageTest was Windows only and we didn&#039;t want to host Windows machines in our own hosting so we started to use AWS. Hosting outside of our data center also made sense since we wanted to simulate performance testing as our users. Our users do not live in our data center. We started out with a couple of Amazon Elastic Compute Cloud servers and used Amazon object storage for hosting the HTML reports from the tool.</p>

<p>A couple of years later (2018 in <a href="https://phabricator.wikimedia.org/T189184" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_70"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T189184</span></span></a>), the tool evolved and moved to Linux. I did a lot of testing to make Firefox work in the new setup. We continued to use AWS because it was easy to just spin up a couple of Linux servers.</p>

<p>We also started to host our own time series database outside of our own hosting, to make it easy to add metrics from servers running outside of our own hosting. Have you guessed where it ended up? On AWS because it was easy.</p>

<p>We continued to work on our performance testing and <a href="https://phabricator.wikimedia.org/p/Gilles/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_77"><span class="phui-tag-core phui-tag-color-person"><span class="phui-tag-dot phui-tag-color-grey"></span>@Gilles</span></a> and I started to try out front end performance testing using replay proxies (<a href="https://phabricator.wikimedia.org/T176361" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_71"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T176361</span></span></a>). A replay proxy records the web traffic and replay it locally. That way you measure the front end performance without the disturbance of the internet. That worked out great and we also tried out different host providers to see where we would get the most stable metrics and at that point it was on AWS. With the replay proxy tests, we added a couple of more servers.</p>

<p>We also tried running tests on bare metal servers, however in retrospect, at that time I didn&#039;t have the correct skills to configure the servers correctly and AWS gave us better results so we continued to use AWS.</p>

<h3 class="remarkup-header">The AWS Problem</h3>

<p>Why did we want to move out of AWS? The numbers were good compared to other cloud providers. However we still had problems. One thing that the <a href="https://www.youtube.com/watch?v=pYbgcDfM2Ts" class="remarkup-link remarkup-link-ext" rel="noreferrer">Netflix team talked</a> about how even if you deploy the same EC2 type, the performance can vary between 10-20% of the instance. You can read more about the variance at Brendan Greggs <a href="https://www.brendangregg.com/blog/2017-12-31/reinvent-netflix-ec2-tuning.html" class="remarkup-link remarkup-link-ext" rel="noreferrer">blog post</a>. We also did try to measure the variance. We could see that we had different performance on the same EC2 type. That meant we needed to make sure that a test ran on a specific EC2 instance. If it ran on another one, we would have a change in our performance metrics.</p>

<p>We also have seen that performance changes over time and that we get different performance at different times <a href="https://phabricator.wikimedia.org/T289516" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_72"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T289516</span></span></a>. That makes it harder to find small performance regressions.</p>

<h3 class="remarkup-header">The New Setup</h3>

<p>A couple of years ago I re-evaluated running tests on bare metal servers and it worked out great this time. We can get stable metrics on bare metal servers . We can get the same performance all the time by tuning and configuring the server.</p>

<p>I started to move all of our testing out of AWS to use bare metal (<a href="https://phabricator.wikimedia.org/T311981" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_73"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T311981</span></span></a> and <a href="https://phabricator.wikimedia.org/T345595" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_74"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T345595</span></span></a>). The price for the servers was also cheaper, so the move was a win/win. The new provider re-use old servers from other customers. Instead of buying new hardware we can reuse older ones that were bought for other purposes. That&#039;s better in an ecological aspect.</p>

<p>A couple of weeks ago I took the last step and moved our time series database to another host <a href="https://phabricator.wikimedia.org/T362020" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_75"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T362020</span></span></a> and instead of Amazon object storage we store the performance result on a disk on a server.</p>

<p>The new setup run on <a href="https://en.wikipedia.org/wiki/Bare-metal_server" class="remarkup-link remarkup-link-ext" rel="noreferrer">bare metal servers</a>. That is cheaper and gives us more reliable performance metrics. For services that do not need that stability we use <a href="https://wikitech.wikimedia.org/wiki/Portal:Cloud_VPS" class="remarkup-link remarkup-link-ext" rel="noreferrer">Cloud VPS</a>.</p>

<h3 class="remarkup-header">The Result</h3>

<p>By moving the test servers to a cheaper provider I could run more performance tests at a lower price. We increased the number of test servers with a lower total price. With more test servers, we can do more tests and more runs.</p>

<p>I used extra test runs to implement the <a href="https://en.wikipedia.org/wiki/Mann–Whitney_U_test" class="remarkup-link remarkup-link-ext" rel="noreferrer">Mann Whitney U test</a> (<a href="https://phabricator.wikimedia.org/T351929" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_76"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T351929</span></span></a>). By running more tests and using Mann Whitney we know if a performance regression is of statistical significance. That way we can make sure that we only alert on real regressions. That decreases the number of false alerts and time spent investigating regressions. I&#039;ll write more about how we use Mann Whitney U in my next blog post.</p></div></content></entry><entry><title>Web Performance at FOSDEM 4th of February</title><link href="/phame/live/21/post/314/web_performance_at_fosdem_4th_of_february/" /><id>https://phabricator.wikimedia.org/phame/post/view/314/</id><author><name>Peter (Peter Hedenskog)</name></author><published>2024-01-31T18:11:56+00:00</published><updated>2024-02-09T13:11:32+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>This is a reminder that this Sunday we in QTE together with Mozilla&#039;s performance team host the web performance developer room at FOSDEM. You can find the schedule at <a href="https://fosdem.org/2024/schedule/track/web-performance/" class="remarkup-link remarkup-link-ext" rel="noreferrer">https://fosdem.org/2024/schedule/track/web-performance/</a> and the talks will be live  streamed on this <a href="https://fosdem.org/2024/schedule/room/h2214/" class="remarkup-link remarkup-link-ext" rel="noreferrer">link</a> starting 09.00 CET on Sunday. There are some really interesting talks and I am really looking forward to them!</p>

<p>If you cannot watch it live, we will collect all the videos and make them available after the event.</p></div></content></entry><entry><title>Web Performance @ FOSDEM 2024 - call for participation</title><link href="/phame/live/21/post/311/web_performance_fosdem_2024_-_call_for_participation/" /><id>https://phabricator.wikimedia.org/phame/post/view/311/</id><author><name>Peter (Peter Hedenskog)</name></author><published>2023-11-10T14:21:14+00:00</published><updated>2023-12-04T17:36:12+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>I&#039;m happy to announce that QTE together with the Mozilla performance team will host the web performance developer room at <a href="https://fosdem.org/2024/" class="remarkup-link remarkup-link-ext" rel="noreferrer">FOSDEM 2024</a>! It will be half a day of web performance and will happen on the 4th of February 2024.</p>

<p>Wikimedias performance team has hosted the room twice and now the torch is passed to QTE :) The last time we had a physical event it was standing room only, I hope that it will be that popular again.</p>

<p>Please help us share the call for participation so we can get the same high quality talks as last times:<br />
<a href="https://wikitech.wikimedia.org/wiki/Performance/FOSDEM_2024_Call_for_Participation" class="remarkup-link remarkup-link-ext" rel="noreferrer">https://wikitech.wikimedia.org/wiki/Performance/FOSDEM_2024_Call_for_Participation</a></p>

<p>The developer room is a unique chance to talk about Open Source web performance. See you there!</p></div></content></entry><entry><title>The golden rule of web performance revisited (Wikipedia edition)</title><link href="/phame/live/21/post/310/the_golden_rule_of_web_performance_revisited_wikipedia_edition/" /><id>https://phabricator.wikimedia.org/phame/post/view/310/</id><author><name>Peter (Peter Hedenskog)</name></author><published>2023-11-14T12:45:17+00:00</published><updated>2025-11-13T02:29:31+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Flashback to 2007: an engineer at Yahoo named Steve Souders studied users&#039; time spent for different web sites and came to the conclusion that <a href="https://www.oreilly.com/library/view/high-performance-web/9780596529307/" class="remarkup-link remarkup-link-ext" rel="noreferrer">80-90% of the load time of a web page is spent in the frontend</a> (compared to the backend). He did a <a href="https://www.stevesouders.com/blog/2012/02/10/the-performance-golden-rule/" class="remarkup-link remarkup-link-ext" rel="noreferrer">follow up 2012</a> and numbers were the same. He called it the web performance golden rule. What does that mean? Well, the conclusion was that to decrease the load time for users, start by optimising the frontend since there’s so much more time spent there.</p>

<p>I wonder if the same percentage applies to Wikipedia? We are serving content to the whole world and some of our users are far from our data centers. We have users with slow devices and slow internet connection. Also a lot has happened since 2007: traffic moved from desktop only to over 50% on mobile. Does that percentage apply? Let&#039;s find out!</p>

<h3 class="remarkup-header">How do we get the metrics?</h3>

<p>We collect the metrics we need in our <a href="https://www.mediawiki.org/wiki/Extension:NavigationTiming" class="remarkup-link remarkup-link-ext" rel="noreferrer">Navigation Timing Extension</a>. The data is collected from real users. In the original post the time used for the calculations is the time to first byte and when the load event end happens (all responses are loaded) so let&#039;s use the same. We  don’t do the calculation per user, instead we can use median or percentiles of those specific metrics. And we can slice and dice it per country and per desktop/mobile.</p>

<h3 class="remarkup-header">Users in the USA</h3>

<p>Let&#039;s first look at desktop traffic from the USA, using the 50 percentile. That&#039;s the median and means that 50% of the users have that experience or better. Here we can see that 15% is spent in the backend and 85% is spent in the frontend. That matches Steve&#039;s findings.<br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/qt3vkulypkazlbknkdym/PHID-FILE-gxbffqlazlb4cncjyrpv/Screenshot_2023-11-08_at_09.05.01.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_78"><img src="https://phab.wmfusercontent.org/file/data/qt3vkulypkazlbknkdym/PHID-FILE-gxbffqlazlb4cncjyrpv/Screenshot_2023-11-08_at_09.05.01.png" width="100%" alt="Screenshot 2023-11-08 at 09.05.01.png (1×2 px, 246 KB)" /></a></div></p>

<p>But just to make sure, let&#039;s look at 95 percentile (the users in the USA that have the slower experience). We can see an increase in time spent in the backend 22% but the majority of the time is still spent in the frontend.<br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/3xxbk4vhadac5jgyyrlu/PHID-FILE-cobyhk35varlw75slzz4/Screenshot_2023-11-10_at_05.56.46.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_79"><img src="https://phab.wmfusercontent.org/file/data/3xxbk4vhadac5jgyyrlu/PHID-FILE-cobyhk35varlw75slzz4/Screenshot_2023-11-10_at_05.56.46.png" width="100%" alt="Screenshot 2023-11-10 at 05.56.46.png (1×2 px, 245 KB)" /></a></div></p>

<p>So what kind of numbers do you think our mobile users have? Let&#039;s again look at the 50 and 95 percentile.</p>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/bqlzpsxmdeefy5v37ibn/PHID-FILE-e22x4teagbgskihifbkt/Screenshot_2023-11-08_at_08.54.21.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_80"><img src="https://phab.wmfusercontent.org/file/data/bqlzpsxmdeefy5v37ibn/PHID-FILE-e22x4teagbgskihifbkt/Screenshot_2023-11-08_at_08.54.21.png" width="100%" alt="Screenshot 2023-11-08 at 08.54.21.png (1×2 px, 244 KB)" /></a></div><br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/ltijqrmhhodie4pzzr3a/PHID-FILE-hzlgu3liacflwtai7bmr/Screenshot_2023-11-08_at_08.54.45.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_81"><img src="https://phab.wmfusercontent.org/file/data/ltijqrmhhodie4pzzr3a/PHID-FILE-hzlgu3liacflwtai7bmr/Screenshot_2023-11-08_at_08.54.45.png" width="100%" alt="Screenshot 2023-11-08 at 08.54.45.png (1×2 px, 249 KB)" /></a></div></p>

<p>Ah ok, we can see that more time here is spent in the backend. Something between 25-33%. Still the frontend is the major part.</p>

<p>Does this reflect in the rest of the world?</p>

<h3 class="remarkup-header">India, South Africa and Brazil</h3>

<p>Here&#039;s a couple of graphs for mobile users in India, South Africa and users in Brazil. What we can see is that we have higher numbers than Steves&#039; original study but users still spend 2/3 of the time in the frontend.</p>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/hpezvkmfq7it6keql5ie/PHID-FILE-bsuwhro2xcfqhuzqkqtf/Screenshot_2023-11-08_at_08.55.01.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_82"><img src="https://phab.wmfusercontent.org/file/data/hpezvkmfq7it6keql5ie/PHID-FILE-bsuwhro2xcfqhuzqkqtf/Screenshot_2023-11-08_at_08.55.01.png" width="100%" alt="Screenshot 2023-11-08 at 08.55.01.png (1×2 px, 261 KB)" /></a></div></p>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/emv7oeuqhhhkjpjfyfxd/PHID-FILE-6txqapndhh3nfgh2bsy2/Screenshot_2023-11-08_at_08.55.58.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_83"><img src="https://phab.wmfusercontent.org/file/data/emv7oeuqhhhkjpjfyfxd/PHID-FILE-6txqapndhh3nfgh2bsy2/Screenshot_2023-11-08_at_08.55.58.png" width="100%" alt="Screenshot 2023-11-08 at 08.55.58.png (1×2 px, 276 KB)" /></a></div></p>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/acb3blyvqg7kphkewdpf/PHID-FILE-m2cr6ldt2o3ygq3qp75f/Screenshot_2023-11-08_at_08.56.16.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_84"><img src="https://phab.wmfusercontent.org/file/data/acb3blyvqg7kphkewdpf/PHID-FILE-m2cr6ldt2o3ygq3qp75f/Screenshot_2023-11-08_at_08.56.16.png" width="100%" alt="Screenshot 2023-11-08 at 08.56.16.png (1×2 px, 268 KB)" /></a></div></p>

<h3 class="remarkup-header">Summary</h3>

<p>I think it&#039;s fair to say that our users spend most time in the frontend. You can <a href="https://grafana.wikimedia.org/d/rum/real-user-monitoring?orgId=1&amp;viewPanel=137&amp;var-geo_country=All&amp;var-geo_continent=All&amp;var-ua_family=All&amp;var-mw_skin=All&amp;var-mw_group=All&amp;var-mw_context=anonymous_mainspace_view&amp;var-percentile=0.50&amp;var-timespan=6h" class="remarkup-link remarkup-link-ext" rel="noreferrer">check out the dashboard</a> yourself and dig into our data.</p>

<p>But do the frontend/backend measurements give us the full story of our users&#039; experience? <strong>Noooo</strong> it doesn&#039;t, it shows us where we should focus. In the next blog post I&#039;ll look deeper into the actual experience of our users.</p></div></content></entry><entry><title>Wikimedia Hackathon 2023, Athens, Greece</title><link href="/phame/live/21/post/305/wikimedia_hackathon_2023_athens_greece/" /><id>https://phabricator.wikimedia.org/phame/post/view/305/</id><author><name>zeljkofilipin (Željko Filipin)</name></author><published>2023-06-30T13:51:11+00:00</published><updated>2023-07-10T00:54:25+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/v64gl4gccnjla2e66pnp/PHID-FILE-bjaem4dlfswyu26miwvf/Wmhack-2023-group-flat-vertical-1x1-18mpixels.jpg" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_85"><img src="https://phab.wmfusercontent.org/file/data/5uuip5vgtguunvj74v4r/PHID-FILE-7ydroq6rawblcp2t37df/preview-Wmhack-2023-group-flat-vertical-1x1-18mpixels.jpg" width="220" height="220" alt="Wmhack-2023-group-flat-vertical-1x1-18mpixels.jpg (512×512 px, 152 KB)" /></a></div></p>

<p><a href="https://commons.wikimedia.org/wiki/File:Wmhack-2023-group-flat-vertical-1x1-18mpixels.jpg" class="remarkup-link remarkup-link-ext" rel="noreferrer">Fuzheado</a>, <a href="https://creativecommons.org/licenses/by-sa/4.0/" class="remarkup-link remarkup-link-ext" rel="noreferrer">CC BY-SA 4.0</a>, via Wikimedia Commons</p>

<h2 class="remarkup-header">Long time no see</h2>

<p>Last month I was in beautiful Athens, Greece for the Wikimedia Hackathon 2023. The last time I saw anybody from the Wikimedia Foundation in person was in <a href="https://filipin.eu/san-francisco-2020" class="remarkup-link remarkup-link-ext" rel="noreferrer">San Francisco in 2020</a>. The last time I saw anybody from the Wikimedia movement was in <a href="https://filipin.eu/atlanta-2019" class="remarkup-link remarkup-link-ext" rel="noreferrer">Atlanta in 2019</a>. The last in person hackathon was in <a href="https://filipin.eu/wikimedia-hackathon-2019" class="remarkup-link remarkup-link-ext" rel="noreferrer">Prague in 2019</a>. So, I didn&#039;t see some people for 3 and some for 4 years. I have also seen some people for the first time, even if we collaborated for years.</p>

<h2 class="remarkup-header">Hackathon</h2>

<p>It&#039;s really hard to summarize a hackathon. It&#039;s a crazy mixture of technical talks, coding, socializing, sightseeing and fun.</p>

<p>It started with project pitches. Everybody that wanted to, could get people interested in their project. But, since there were about 200 people there, everybody got only 30 seconds. Fun part was that if you went over your time, you were clapped off the stage.</p>

<p>One of the interesting sessions I went to was <a href="/T332794" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_87"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T332794: [Session] Using Pixel tool for visual regression </span></span></a> by <a href="https://phabricator.wikimedia.org/p/Etonkovidova/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_94"><span class="phui-tag-core phui-tag-color-person">@Etonkovidova</span></a>. Elena was very nervous before the session, but she did a great job. We had a great discussion during the session. <a href="https://phabricator.wikimedia.org/p/dom_walden/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_95"><span class="phui-tag-core phui-tag-color-person">@dom_walden</span></a> showed us how he set up <a href="/T337539" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_88"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T337539: Add WikiLambda extension and tests to Pixel</span></span></a>.</p>

<p>Another interesting session was how to <a href="/T332881" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_89"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T332881: [Session] Improve your technical writing</span></span></a> by <a href="https://phabricator.wikimedia.org/p/kostajh/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_96"><span class="phui-tag-core phui-tag-color-person">@kostajh</span></a>. At that session I learned about <a href="https://languagetool.org/" class="remarkup-link remarkup-link-ext" rel="noreferrer">LanguageTool</a> and <a href="https://developers.google.com/tech-writing" class="remarkup-link remarkup-link-ext" rel="noreferrer">Google&#039;s Technical Writing Courses</a>.</p>

<p>The last session I&#039;m going to mention is the <a href="/T337340" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_90"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T337340: [session] Using Patch demo to test or demonstrate patches outside of your local dev environment (or without one!)</span></span></a> by <a href="https://phabricator.wikimedia.org/p/matmarex/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_97"><span class="phui-tag-core phui-tag-color-person">@matmarex</span></a>. I&#039;m very interested in development/testing environments, so I try to learn at least the basics of available ones.</p>

<p>My plan was to work on one of several projects at the hackathon. Either documentation (<a href="/T256239" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_91"><span class="phui-tag-core phui-tag-color-object">T256239: Run Selenium tests targeting MediaWiki-Docker</span></a>), or a refactoring (<a href="/T256626" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_92"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T256626: Refactor WebdriverIO tests from sync to async mode</span></span></a>), or an upgrade (<a href="/T324685" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_93"><span class="phui-tag-core phui-tag-color-object">T324685: Upgrade WebdriverIO to v8 in all repositories</span></a>). That didn&#039;t happen. But that&#039;s how hackathons sometimes go.</p>

<p>I applied for the hackathon months ago. In the meantime, I didn&#039;t work for a couple of months because I was on parental leave. The hackathon was near the end of my leave, so I was pretty lost and confused at the event.</p>

<h2 class="remarkup-header">Misc</h2>

<p>I managed to do some sightseeing. One day after the sessions a few of us walked to the <a href="https://en.wikipedia.org/wiki/Philopappos_Monument" class="remarkup-link remarkup-link-ext" rel="noreferrer">Philopappos Monument</a>. It&#039;s on the top of a hill with a beautiful view of Athens. Another day I visited <a href="https://en.wikipedia.org/wiki/Acropolis_of_Athens" class="remarkup-link remarkup-link-ext" rel="noreferrer">Acropolis</a>.</p>

<p>A few of my teammates from the <a href="/tag/quality-and-test-engineering-team/" class="phui-tag-view phui-tag-type-shade phui-tag-violet phui-tag-shade phui-tag-icon-view " data-sigil="hovercard" data-meta="0_99"><span class="phui-tag-core "><span class="visual-only phui-icon-view phui-font-fa fa-users" data-meta="0_98" aria-hidden="true"></span>Quality-and-Test-Engineering-Team</span></a> were at the hackathon, so one day we met for lunch. We didn&#039;t see each other in person for at least 3 years. It was great to be able to socialize after such a long time.</p>

<p>I have also learned about a new saint, <a href="https://en.wikipedia.org/wiki/Saint_Javelin" class="remarkup-link remarkup-link-ext" rel="noreferrer">Saint Javelin</a>.</p>

<p>I was disappointed that there was no organized sightseeing, considering we were in one of the most interesting cities in the world.</p>

<h2 class="remarkup-header">Chess</h2>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/bvvqcmy5y2wv4bvofma5/PHID-FILE-42xrdu3frgjcoptmptg4/Late_night_chess_after_Wikimedia_Hackathon_2023_closing_dinner.jpg" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_86"><img src="https://phab.wmfusercontent.org/file/data/5ghpnfixwgthf5mi2bog/PHID-FILE-omw75dux3fgkyx472xma/preview-Late_night_chess_after_Wikimedia_Hackathon_2023_closing_dinner.jpg" width="165" height="220" alt="Late_night_chess_after_Wikimedia_Hackathon_2023_closing_dinner.jpg (768×576 px, 127 KB)" /></a></div></p>

<p><a href="https://commons.wikimedia.org/wiki/File:Late_night_chess_after_Wikimedia_Hackathon_2023_closing_dinner.jpg" class="remarkup-link remarkup-link-ext" rel="noreferrer">01tonythomas</a>, <a href="https://creativecommons.org/licenses/by-sa/4.0/" class="remarkup-link remarkup-link-ext" rel="noreferrer">CC BY-SA 4.0</a>, via Wikimedia Commons</p>

<p>I forgot to bring a chess set, so I bought a cheap plastic set. I led a <a href="https://filipin.eu/chess-basics" class="remarkup-link remarkup-link-ext" rel="noreferrer">Chess Basics</a> workshop during lunch one day and had a few games of chess during the hackathon. I was hoping for a few easy wins. I have played about 10 games. I think I managed to win just 2, and somehow draw 1 game. I lost the rest. I&#039;m glad this was a hackathon and not a chess tournament. My <a href="https://en.wikipedia.org/wiki/Elo_rating_system" class="remarkup-link remarkup-link-ext" rel="noreferrer">rating</a> would be seriously decreased. 😅</p>

<h2 class="remarkup-header">Links</h2>

<ul class="remarkup-list">
<li class="remarkup-list-item"><a href="https://www.mediawiki.org/wiki/Wikimedia_Hackathon_2023" class="remarkup-link remarkup-link-ext" rel="noreferrer">Wikimedia Hackathon 2023</a> at mediawiki.org</li>
<li class="remarkup-list-item"><a href="https://blog.legoktm.com/2023/05/31/2023-wikimedia-hackathon-recap.html" class="remarkup-link remarkup-link-ext" rel="noreferrer">2023 Wikimedia Hackathon recap</a> at legoktm.com</li>
<li class="remarkup-list-item"><a href="https://www.kostaharlan.net/posts/hackathon-notes/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Notes on the Wikimedia 2023 Athens Hackathon</a> at kostaharlan.net</li>
<li class="remarkup-list-item"><a href="https://taavi.wtf/posts/wikimedia-hackathon-athens-2023/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Wikimedia Hackathon Athens 2023</a> at taavi.wtf</li>
<li class="remarkup-list-item"><a href="https://diff.wikimedia.org/2023/06/06/a-short-account-of-the-wikimedia-hackathon-2023/" class="remarkup-link remarkup-link-ext" rel="noreferrer">A short account of the Wikimedia Hackathon 2023</a> at diff.wikimedia.org</li>
<li class="remarkup-list-item"><a href="https://wmhack2023.github.io/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Wikimedia Hackathon 2023 Blog</a> at github.io</li>
<li class="remarkup-list-item"><a href="https://commons.wikimedia.org/wiki/Category:Wikimedia_Hackathon_Athens_2023" class="remarkup-link remarkup-link-ext" rel="noreferrer">Wikimedia Hackathon Athens 2023</a> at commons.wikimedia.org</li>
</ul></div></content></entry><entry><title>An Introduction to General Systems Thinking by Gerald M. Weinberg</title><link href="/phame/live/21/post/301/an_introduction_to_general_systems_thinking_by_gerald_m._weinberg/" /><id>https://phabricator.wikimedia.org/phame/post/view/301/</id><author><name>zeljkofilipin (Željko Filipin)</name></author><published>2023-01-31T16:05:31+00:00</published><updated>2025-02-14T17:03:36+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><h2 class="remarkup-header">Three sentence summary</h2>

<p>Prepare for a very hard read. You will not understand anything the first time you read the book. If you&#039;re like me, you will not like the book and you will not want to read it the second time.</p>

<h2 class="remarkup-header">Book Club</h2>

<p>This was the sixth book in our <a href="/T247665" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_100"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T247665: QTE book club</span></span></a> and the first one that wasn&#039;t on software testing. We were reading it for three months, from November 2022 to January 2023. The club meets once a month for an hour long discussion. We had three very interesting discussions. Some members of the club like the book, some don&#039;t. This is by far the oldest book we&#039;ve read. It was published in 1975.</p>

<h2 class="remarkup-header">Random thoughts</h2>

<p>It&#039;s one of those books that you have to read once just to get an idea of what the book is about. Then you have to read it at least one more time. I&#039;ve read it once and I&#039;ve had enough of it for now. I&#039;m not sure I know what the book is about. Maybe I&#039;ll read it again in the future. Maybe.</p>

<p>According to my notes, in 2022 I&#039;ve read over 100 books. Only 5 got a 2-star rating. 4 were kid&#039;s books I didn&#039;t like. The fifth 2-star book was this one.</p>

<p>This book was recommended in <em>Lessons Learned in Software Testing</em> (5-star rating from me), so I was expecting much more.</p>

<p>According to <a href="https://en.wikipedia.org/wiki/Gerald_Weinberg" class="remarkup-link remarkup-link-ext" rel="noreferrer">Wikipedia</a>, this is one of the two of the author&#039;s most famous books. The second one is <em>The Psychology of Computer Programming</em>. I&#039;ve read his <em>Perfect Software: And Other Illusions about Testing</em> (twice) and really liked it (4-star rating).</p>

<p><a href="https://www.goodreads.com/book/show/583766.An_Introduction_to_General_Systems_Thinking" class="remarkup-link remarkup-link-ext" rel="noreferrer">Goodreads</a> and <a href="https://www.amazon.com/Introduction-General-Systems-Thinking-ebook/product-reviews/B004VS9AUS" class="remarkup-link remarkup-link-ext" rel="noreferrer">Amazon</a> reviews say I&#039;m not alone in not liking the book. But, at both sites, the book has a great average rating (3.96 and 4.2).</p>

<p>I usually sort books in fiction and non-fiction. Or, practical and non-practical. This book looked like a practical book, but I didn&#039;t get anything practical out of it. Maybe it&#039;s not the book. Maybe I just didn&#039;t put enough effort in the book. Maybe I&#039;ve approached it wrongly, expecting it to be a practical book.</p>

<p>Usually, when I read a practical book, I summarize each chapter. That&#039;s what I did for this book. Well, I&#039;ve tried. I&#039;ve struggled with chapter summaries for the first three chapters, then gave up for chapters four to seven.</p>

<h2 class="remarkup-header">Quotes</h2>

<p>All that said, there are good quotes in the book.</p>

<h3 class="remarkup-header">Chapter 1. The Problem</h3>

<blockquote><p>The first step to knowledge is the confession of ignorance. We know far, far less about our world than most of us care to confess. (p. 10)</p></blockquote>



<blockquote><p>Any field with the word “science” in its name is guaranteed not to be a science. (p. 32)</p></blockquote>



<h3 class="remarkup-header">Chapter 2. The Approach</h3>

<blockquote><p>If you never say anything wrong, you never say anything. (p. 47)</p></blockquote>



<h3 class="remarkup-header">Chapter 3. System and Illusion</h3>

<blockquote><p>What is a system? As any poet knows, a system is a way of looking at the world. (p. 55)</p></blockquote>



<h3 class="remarkup-header">Chapter 4. Interpreting Observations</h3>

<blockquote><p>The Lump Law: If we want to learn anything, we mustn’t try to learn everything. (p. 105)</p></blockquote>



<h3 class="remarkup-header">Chapter 5. Breaking Down Observations</h3>

<blockquote><p>The Axiom of Experience: The future will be like the past, because, in the past, the future was like the past. (p. 141)</p></blockquote>



<h3 class="remarkup-header">Chapter 6. Describing Behavior</h3>

<blockquote><p>Count-to-Three Principle: If you cannot think of three ways of abusing a tool, you do not understand how to use it. (p. 191)</p></blockquote>



<h3 class="remarkup-header">Chapter 7. Some Systems Questions</h3>

<blockquote><p>These, then, are the three great questions that govern general systems thinking, the Systems Triumvirate:</p>

<ol class="remarkup-list">
<li class="remarkup-list-item">Why do I see what I see?</li>
<li class="remarkup-list-item">Why do things stay the same?</li>
<li class="remarkup-list-item">Why do things change? (p. 221)</li>
</ol></blockquote></div></content></entry><entry><title>Testival 2022, Osijek, Croatia</title><link href="/phame/live/21/post/299/testival_2022_osijek_croatia/" /><id>https://phabricator.wikimedia.org/phame/post/view/299/</id><author><name>zeljkofilipin (Željko Filipin)</name></author><published>2022-11-11T14:06:49+00:00</published><updated>2022-11-11T14:09:18+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/hvxvgtzbo3v5xnidslok/PHID-FILE-ybqdsyv4qc6xmskapu4u/venue.jpeg" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_101"><img src="https://phab.wmfusercontent.org/file/data/jljef4d6cynxuk5vdfs5/PHID-FILE-f7dgsj2dxggcqjt7oqaw/preview-venue.jpeg" width="220" height="165" alt="venue.jpeg (768×1 px, 269 KB)" /></a></div><br />
<em>The venue. Not the tower, but the building behind it.</em> 😎</p>

<p>Finally, after a few years, I&#039;ve been to a conference. The last conference I went to was <a href="https://filipin.eu/webcamp-zagreb-2019" class="remarkup-link remarkup-link-ext" rel="noreferrer">WebCamp Zagreb 2019</a>. This was the first Testival conference that I have attended as a participant, not an organizer.</p>

<p>Unfortunately, I have been really busy in the last couple of months. I didn&#039;t have the time to write something about the conference until now. I took some photos and notes during the conference, so I think I have enough material for a blog post.</p>

<p>The organizing team did a great job. There were more than 130 people at the conference. When I was one of the organizers, we never had more than about 70. 😅</p>

<p>I really like the Testival conference <a href="http://citconf.com/openspace.php" class="remarkup-link remarkup-link-ext" rel="noreferrer">open space</a> format that the conference used for years. In addition to open space, Testival had two keynotes and lightning talks. I gave two lightning talks, one about the <a href="/T247665" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_104"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T247665: QTE book club</span></span></a> I organized for my team at work and another one about <a href="https://filipin.eu/tags/chess" class="remarkup-link remarkup-link-ext" rel="noreferrer">chess</a>. Since the lunch break was long, I organized a chess workshop during the break.</p>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/epfellm5oc3zazlucs4m/PHID-FILE-rzplrurptfqjgmxblngi/chess.jpeg" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_102"><img src="https://phab.wmfusercontent.org/file/data/xhj3obsay353aeqdpjbz/PHID-FILE-xcwlzqdlcyxd7lapelus/preview-chess.jpeg" width="220" height="165" alt="chess.jpeg (768×1 px, 349 KB)" /></a></div><br />
<em>Chess is more important than lunch.</em> ♟️</p>

<p>I have participated in several sessions including career development, the future of testing and self education.</p>

<p>After the conference I had dinner with <a href="https://www.davorbanovic.com/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Davor Banović</a> (a published book author) and <a href="https://karlosmid.com/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Karlo Šmid</a> (a performing stand-up comedian). Davor has organized the first testing conference in Croatia, <a href="https://filipin.eu/viaqa-2010" class="remarkup-link remarkup-link-ext" rel="noreferrer">viaqa</a> (in 2010). Karlo has organized the first testing meetup in Croatia, <a href="https://filipin.eu/zagreb-stc-1" class="remarkup-link remarkup-link-ext" rel="noreferrer">Software Testers Speak Up Meeting</a> (in 2011). The three of us were the Testival core organizing team for about a decade, organizing monthly meetups and yearly conferences.</p>

<p>I woke up early before the conference, so I had the time for an easy and long run on the beautiful Drava river bank.</p>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/iju57m64s3gz5tboclbl/PHID-FILE-77xorqnllhaepv3fxklx/strava.jpg" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_103"><img src="https://phab.wmfusercontent.org/file/data/n3mmye7z6oseq34qdmtd/PHID-FILE-eqq6jzlqzm4wvuv5ucbp/preview-strava.jpg" width="220" height="220" alt="strava.jpg (1×1 px, 522 KB)" /></a></div></p>

<p>For more information and photos, read the <a href="https://testival.eu/testival-conference-2022-wrap-up/" class="remarkup-link remarkup-link-ext" rel="noreferrer">official Testival blog post</a>.</p></div></content></entry><entry><title>Testing Computer Software by Cem Kaner, Jack Falk and Hung Q. Nguyen</title><link href="/phame/live/21/post/298/testing_computer_software_by_cem_kaner_jack_falk_and_hung_q._nguyen/" /><id>https://phabricator.wikimedia.org/phame/post/view/298/</id><author><name>zeljkofilipin (Željko Filipin)</name></author><published>2022-10-28T14:58:18+00:00</published><updated>2022-10-28T14:58:32+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><h2 class="remarkup-header">Three sentence summary</h2>

<p>This book is about doing testing when your coworkers don&#039;t, won&#039;t and don&#039;t have to follow the rules (p. vii). Realistic test planning is dominated by the need to select a few test cases from a huge set of possibilities (p. 17). Testing is best conceived as a group that provides technical services and information. (p. 343)</p>

<h2 class="remarkup-header">Book Club</h2>

<p>This is the fifth book that my team is reading for our <a href="/T247665" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_105"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T247665: QTE book club</span></span></a>. We were reading this book from August to September 2022. We had a meeting every month to discuss the book. I like talking with people about good books as much as I like reading them.</p>

<h2 class="remarkup-header">Random thoughts</h2>

<p>I&#039;ve already started reading this book many years ago, and gave up. I remember thinking it was very hard to read. I didn&#039;t find it so hard to read now.</p>

<p>This is one of the rare books that I&#039;m reading from a paper copy. I usually read e-books. This one is pretty old. It has the very familiar smell of an old book. The smell takes me back to my childhood when I was reading a lot of comics that smelled exactly like that.</p>

<p>I was planning to read the book while traveling the Croatian seaside this summer. So, the book visited three islands with me, Brač, Hvar and Čiovo. Unfortunately, I didn&#039;t have any time to read the book there.</p>

<h2 class="remarkup-header">Chapters</h2>

<p>When I read a book, I like to write a short summary of each chapter. It&#039;s usually a quote from the chapter. For some chapters a have a few random thoughts or quotes.</p>

<h3 class="remarkup-header">Section 1 - Fundamentals</h3>

<h4 class="remarkup-header">1 An example test series</h4>

<p>Summary: This chapter introduces the book by illustrating how an experienced tester could approach the early testing of a simple program. (p. 1)</p>

<h4 class="remarkup-header">2 The objectives and limits of testing</h4>

<p>Summary: Realistic test planning is dominated by the need to select a few test cases from a huge set of possibilities. No matter how hard you try, you will miss important tests. As we see it, testing is the process of searching for errors. Good test cases are more likely to find errors, or more likely to find serious errors, than poor test cases. (p. 17)</p>

<h4 class="remarkup-header">3 Test types and their place in the software development process</h4>

<p>Summary: This chapter is a general overview of the field of testing. (p. 27)</p>

<p>Quote: Some readers have identified this as the most boring chapter of the book. People who stopped reading this book tell us they stopped here. (p. 28)</p>

<p>As far as I can remember, in my entire life, there are only two books that I&#039;ve started reading but didn&#039;t finish. About a decade ago, I started reading this book but gave up. Probably in chapter 3. 😅 The other book is Crime and Punishment by Fyodor Dostoevsky. (It was required reading in high school.)</p>

<p>Quote: In bebugging a program, someone deliberately introduces bugs into it before the person who will test it starts testing. (p. 49)</p>

<p>I don&#039;t think I&#039;ve ever seen this done.</p>

<h4 class="remarkup-header">4 Software errors</h4>

<p>Summary: This brief chapter defines &quot;quality&quot; and &quot;software error&quot;. Then (...) we describe thirteen categories of software errors. (p. 59)</p>

<h4 class="remarkup-header">5 Reporting and analyzing bugs</h4>

<p>Summary: How well you report a bug directly affects how likely the programmer is to fix it. (p. 65)</p>

<h3 class="remarkup-header">Section 2 - Specific testing skills</h3>

<h4 class="remarkup-header">6 The problem tracking system</h4>

<p>Summary: Here we describe what happens to the Problem report after you report it. This chapter provides the basic design of a problem tracking database and puts it in perspective.</p>

<p>Random thoughts: This chapter might be the most obsolete part of the book. It assumes you have to create a task/bug tracking system. Many such systems exist today and it&#039;s very unlikely the company isn&#039;t already using one.</p>

<h4 class="remarkup-header">7 Test case design</h4>

<p>Summary: This chapter is about creating good black box test cases. (p.123)</p>

<h4 class="remarkup-header">8 Testing printers (and other devices)</h4>

<p>Summary: This chapter is about configuration testing in general and about printer testing in particular. (p. 143)</p>

<p>Random thoughts: I&#039;ve never needed to test a printer. The vast majority of this chapter is about that. I guess an equally important device to test these days would be a phone.</p>

<h4 class="remarkup-header">9 Localization testing</h4>

<p>Summary: Localization is even more important now than when the book was written. In the chapter they focus on West European languages and DOS. Today localization testing is much harder. There are three major desktop and two major mobile operating systems. Programs are translated to many more languages, some of them quite tricky (right-to-left, script...)</p>

<h4 class="remarkup-header">10 Testing user manuals</h4>

<p>Summary: The product includes more than the program. For example, most products also include documentation, packaging, samples and service (such as technical support). (p. 179)</p>

<h4 class="remarkup-header">11 Testing tools</h4>

<p>Summary: This is a basic introduction to black box testing tools: what you might want to accomplish with them, what types of things they can do, and what some of their limitations are. (p. 189)</p>

<p>Random thoughts: Fundamental tools have not changed in a couple of decades (since 1999). We still use a computer, text editors, spreadsheets, diff tools, file viewers, screen captures, inspectors... (pp. 189-190)</p>

<h4 class="remarkup-header">12 Test planning and test documentation</h4>

<p>Summary: This chapter ... discusses the general strategy and objectives of test planning. We regard this chapter as the technical centerpiece of this book. (p. 203) Remember your primary task - finding bugs and getting them fixed - not designing or filling out forms. (p. 253)</p>

<p>Random thoughts: I found this chapter pretty boring to read.</p>

<h3 class="remarkup-header">Section 3 - Managing testing projects and groups</h3>

<h4 class="remarkup-header">13 Tying it together</h4>

<p>Summary: This chapter ties together the organizational and strategic issues. (p. 255)</p>

<p>Random thoughts: It&#039;s been a long time since I&#039;ve tested a piece of software that went through all phases (idea, alpha, beta...). The book suggests that is the usual case. Teams start deploying very early these days, with incremental changes.</p>

<h4 class="remarkup-header">14 Legal consequences of defective software</h4>

<p>Summary: QC should recognize product defects that are so serious that the company will be sued over them. QC should be able to use the law as ammunition, in an argument to get a serious defect fixed. (p. 303)</p>

<p>Random thoughts: This was a very boring chapter. It is also focused on US law, making it less useful for people outside the US.</p>

<h4 class="remarkup-header">15 Managing a testing group</h4>

<p>Summary: Testing is best conceived as a group that provides technical services and information. (p. 343)</p>

<p>Random thoughts: I&#039;m not a manager, but I find this chapter very interesting and useful. Especially a very short career growth section, a topic that I&#039;m very interested in.</p>

<p>Quote: It seems to us that every company already has a proper group to set standards, evaluate and train staff, and generally monitor and work to improve every phase of product development. That group is called Management. Management is the real quality assurance group in every company. (p. 347)</p>

<p>I couldn&#039;t agree more.</p>

<h4 class="remarkup-header">Appendix: Common software errors</h4>

<p>Summary: Check a comprehensive &quot;standard&quot; list to get further ideas for testing a program. (p. 363)</p>

<p>Random thoughts: I thought the appendix would be boring. It is actually an interesting read.</p></div></content></entry><entry><title>Exploratory Software Testing by James A. Whittaker</title><link href="/phame/live/21/post/295/exploratory_software_testing_by_james_a._whittaker/" /><id>https://phabricator.wikimedia.org/phame/post/view/295/</id><author><name>zeljkofilipin (Željko Filipin)</name></author><published>2022-08-31T15:38:57+00:00</published><updated>2023-12-06T02:47:12+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><h2 class="remarkup-header">Three sentence summary</h2>

<p>Tourism benefits from a mix of structure and freedom, and so does exploratory testing. (p. 42)<br />
The industry’s approach to manual testing has been either to overprepare by writing scripts, scenarios, and plans in advance or underprepare by simply proceeding in an ad hoc manner. Exploratory testing with tours is a good middle ground. (pp. 121-122)</p>

<h2 class="remarkup-header">Book Club</h2>

<p>This is the fourth book that my team at work is reading for our <a href="/T247665" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_106"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T247665: QTE book club</span></span></a>. All books we&#039;ve read so far were on software testing. We were reading this book from May to July 2022. We&#039;ve had two book club meetings to discuss the book.</p>

<h2 class="remarkup-header">Random thoughts</h2>

<p>As it usually goes 🙄 I&#039;ve finished reading this book in June but I didn&#039;t have the time to write the review then. I was on vacation for a few weeks in August so writing the review got further delayed. I think it&#039;s way past the last responsible moment to write the review, but better now than even later.</p>

<p>After a very successful tech career, the author is now an <a href="https://www.linkedin.com/in/docjamesw/" class="remarkup-link remarkup-link-ext" rel="noreferrer">investor/owner of a brewery</a>.</p>

<p>I&#039;m pretty sure the author&#039;s other popular book, <a href="https://www.goodreads.com/book/show/2114066.How_to_Break_Software" class="remarkup-link remarkup-link-ext" rel="noreferrer">How to Break Software</a> is the first book on software testing that I&#039;ve ever read. In 2004 I was interviewing for my first software testing job. Back then, I didn&#039;t even know software testing existed. The company gave me a couple of books to read. I&#039;m not sure which was the other book, but I&#039;m pretty sure How to Break Software was one of them. I remember that I liked the book and learned a lot from it. I plan to read it again one of these days.</p>

<p>The book is roughly separated into two parts. The book and the appendices. I was reading on Kindle. The book starts at 6%. The appendices start at 60% and end at 89%. So the book is 54%, the appendices are 29%.</p>

<p>I won&#039;t summarize all chapters, but a few of them stood out.</p>

<p>Chapter 6 (Exploratory Testing in Practice) is interesting because it provides viewpoints from different people, teams and products. But, it&#039;s also mediocre.</p>

<p>Chapter 7 (Touring and Testing’s Primary Pain Points) is one of the most interesting chapters of the book. I don&#039;t remember any other serious discussion about these serious problems that testing has.</p>

<p>Chapter 8 (The Future of Software Testing) offers very interesting thoughts on the future. I don&#039;t remember reading about the future anywhere else.</p>

<p>When I first scanned the book, I thought appendices were there just to make the book bigger. I was pleasantly surprised while reading them. There are three of them. The first one is Building a Successful Career in Testing and the second and the third one are a selection of author&#039;s blog posts. Both are worth reading. I have more notes from appendices than from the book.</p>

<h2 class="remarkup-header">Quotes</h2>

<p>I have written down many many quotes from the book. Here are a few of them, with my comments.</p>

<blockquote><p>“Any sufficiently advanced bug is indistinguishable from a feature.” Rich Kulawiec (p. 21).</p></blockquote>

<p>A funny variation of:  “Any sufficiently advanced technology is indistinguishable from magic.” Arthur C. Clarke</p>

<blockquote><p>Imagine trying to predict the winner of the Super Bowl or Premier League before the season begins. (pp. 37-38)</p></blockquote>

<p>A beautiful example of the impossibility of planning all testing in advance.</p>

<blockquote><p>“One man’s crappy software is another man’s full time job.” Jessica Gaston (p. 113)</p></blockquote>

<p>A funny variation of: &quot;one man&#039;s meat is another man&#039;s poison&quot;.</p>

<blockquote><p>These are some number of bugs that simply cannot be found until the house is lived in, and software is no different. (p. 119)</p></blockquote>

<p>Oh so true.</p>

<blockquote><p>Anyone who thinks they can learn testing in a single day is a fool who has no business testing software. (p. 152).</p></blockquote>

<p>I guess it&#039;s the same for other things, chess for example. You can learn the basics in a day, but it will take you a lifetime to master it.</p>

<blockquote><p>Certainly, I’ll agree that, like artists, software testers need to be creative, but art implies skill without training. Most virtuoso artists were born to the task, and those of us unlucky enough to have no artistic talent are unlikely to develop such skill despite a lifetime of practice. (p. 157)</p></blockquote>

<p>I think this is completely wrong. Art requires a lot of training. I don&#039;t think any virtuoso was born with it. Some people have more talent than others, but if you don&#039;t train, your talent is wasted.</p>

<blockquote><p>A discipline is a branch of knowledge or learning. Mastery of a discipline is achieved through training, not practice. (p. 158)</p></blockquote>

<p>The above two quotes are from Software Testing as an Art, a Craft and a Discipline blog post. This is one of the most interesting chapters of the book. The difference between craft (learn on the job) and discipline (learn by deliberate training) is an eye opening insight.</p>

<blockquote><p>Spam, phishing, and pharming...(p. 160)</p></blockquote>

<p>TIL pharming is a cyberattack intended to redirect a website&#039;s traffic to another, fake site by installing a malicious program on the computer.</p>

<blockquote><p>Smart people who dream big inspire me. Smart people who don’t understand testing and dream big scare the hell out of me. (p. 182).</p></blockquote>

<p>I&#039;ve been there. 😅</p>

<blockquote><p>Software tester wanted. Position requires comparing an insanely complicated, poorly documented product to a nonexistent or woefully incomplete specification. Help from original developers will be minimal and given grudgingly. Product will be used in environments that vary widely with multiple users, multiple platforms, multiple languages, and other such impossibilities yet unknown but just as important. We’re not quite sure what it means, but security and privacy are paramount and post release failures are unacceptable and could cause us to go out of business. (p. 200)</p></blockquote>

<p>This hilarious job post is from the Software Tester Wanted blog post.</p></div></content></entry><entry><title>Testival Meetup #64, Zagreb, Croatia</title><link href="/phame/live/21/post/294/testival_meetup_64_zagreb_croatia/" /><id>https://phabricator.wikimedia.org/phame/post/view/294/</id><author><name>zeljkofilipin (Željko Filipin)</name></author><published>2022-08-31T15:35:26+00:00</published><updated>2022-08-31T15:35:26+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/lpsy77g7cjhg5n3m43of/PHID-FILE-3d5zjpawnlss5bxhr4pc/testival-64-1.jpg" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_107"><img src="https://phab.wmfusercontent.org/file/data/o7qn4cprl2zt4hserpmx/PHID-FILE-wvr2lzejen2xrictc4o7/preview-testival-64-1.jpg" width="220" height="165" alt="testival-64-1.jpg (768×1 px, 279 KB)" /></a></div></p>

<h2 class="remarkup-header">Introduction</h2>

<p>It was a very long time since the last in-person Testival meetup. Just before the COVID pandemic, we had meetup <a href="https://filipin.eu/testival-58" class="remarkup-link remarkup-link-ext" rel="noreferrer">#58</a>, in March 2020. Before that, we&#039;ve been meeting regularly every month for years. We also had a conference every year. It feels really strange that there was no in-person meetup or a conference in over two years.</p>

<p>There were a few online-only meetups in 2020 and 2021. Even online meetups have stopped since <a href="https://blog.tentamen.eu/testival-community-ending-scene/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Karlo</a> and <a href="https://filipin.eu/stepping-down-as-testival-organizer" class="remarkup-link remarkup-link-ext" rel="noreferrer">I have stepped down</a> as organizers.</p>

<p><a href="https://www.linkedin.com/in/niko-madar/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Niko Mađar</a> has decided to organize the <a href="https://testival.eu/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Testival conference</a> this year. In addition to that, he decided to organize the Testival meetup. I wish him all the luck.</p>

<h2 class="remarkup-header">Testival Meetup #64</h2>

<p>Finally, this month we had <a href="https://www.meetup.com/testival/events/286034317/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Testival Meetup #64</a>. About 30 people came. A nice number considering the meetup was on a break for a couple of years.</p>

<p>The meetup used the usual format that I really like. Nike gave a short introduction. Then everybody shortly introduced themselves. I think this is such a critical part of the meetup. It&#039;s really important to get to know the people. It&#039;s really rare that somebody doesn&#039;t want to introduce themselves. During the introduction <a href="https://www.linkedin.com/in/ivacicinsain/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Iva Čičin-Šain</a> said she was the one that came up with the name Testival. (I couldn&#039;t remember that when I wrote <a href="https://filipin.eu/stepping-down-as-testival-organizer" class="remarkup-link remarkup-link-ext" rel="noreferrer">Stepping down as Testival Organizer</a>.)</p>

<h2 class="remarkup-header">Talks</h2>

<p>There were two talks. I have a few notes.</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">Vesna Bilić - Excel in your QA career!</li>
<li class="remarkup-list-item">Niko Mađar - How programs test programs</li>
</ul>

<p>From Vesna&#039;s talk:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">You can manage your career proactive or reactive.</li>
<li class="remarkup-list-item">To advance your career you have to step out of your comfort zone.</li>
<li class="remarkup-list-item">Life is long. There is time.</li>
<li class="remarkup-list-item">Besides technical knowledge, life experience is required.</li>
<li class="remarkup-list-item">Book recommendation - <a href="https://www.goodreads.com/book/show/44135420" class="remarkup-link remarkup-link-ext" rel="noreferrer">Team Topologies</a>: Organizing Business and Technology Teams for Fast Flow by Matthew Skelton and Manuel Pais.</li>
</ul>

<p>From Niko&#039;s talk:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item"><a href="https://medium.com/photomath-engineering" class="remarkup-link remarkup-link-ext" rel="noreferrer">Photomath Engineering</a> blog.</li>
</ul>

<p>There was interesting discussion during and after each talk.</p>

<p>The only complaint I have is that it was hard to hear the speakers. For the first talk I was sitting at the back and I was struggling to hear. I&#039;ve moved to the first row during the break between the talks, so I could hear better. A sound system is required for such a big room.</p>

<p>Niko announced lightning talks at the beginning, but forgot about them at the end. I think it&#039;s perfectly normal to forget something the first time you&#039;re organizing a meetup.</p>

<h2 class="remarkup-header">After the Talks</h2>

<p>After the talks the majority of the people stayed to chat. The reason I don&#039;t like online meetups is that this social component is missing. Online, you can&#039;t easily form small groups that split and merge chaotically.</p>

<h2 class="remarkup-header">Conclusion</h2>

<p>It was great to see, after a very long time, Testival organizers and regular attendees. Niko said the plan is to continue with meetups every month. I&#039;m looking forward to more meetups.</p>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/htbne7572n4u3istfoh3/PHID-FILE-i5bufu7z7rsm5awhuuws/testival-64-2.jpg" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_108"><img src="https://phab.wmfusercontent.org/file/data/fbqcyjrayo5eprhayzwe/PHID-FILE-q2vf6y7rc7xjxndenwzk/preview-testival-64-2.jpg" width="220" height="165" alt="testival-64-2.jpg (768×1 px, 243 KB)" /></a></div></p></div></content></entry><entry><title>Explore It by Elisabeth Hendrickson</title><link href="/phame/live/21/post/287/explore_it_by_elisabeth_hendrickson/" /><id>https://phabricator.wikimedia.org/phame/post/view/287/</id><author><name>zeljkofilipin (Željko Filipin)</name></author><published>2022-05-27T15:28:37+00:00</published><updated>2022-05-27T15:49:17+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><h2 class="remarkup-header">Three sentence summary</h2>

<p>Testing = checking + exploring. You can plan some testing in advance, that&#039;s checking. You can&#039;t plan some testing in advance, that&#039;s exploring.</p>

<h2 class="remarkup-header">Random thoughts</h2>

<p><a href="https://phabricator.wikimedia.org/p/dom_walden/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_110"><span class="phui-tag-core phui-tag-color-person">@dom_walden</span></a> suggested we should read Explore It for our book club at work. When I checked its ratings on Goodreads and Amazon, I was very impressed. I can&#039;t remember when I&#039;ve seen such good ratings. Goodreads <a href="https://www.goodreads.com/book/show/15980494-explore-it" class="remarkup-link remarkup-link-ext" rel="noreferrer">4.30</a> (302 ratings, 29 reviews), Amazon <a href="https://www.amazon.com/Explore-Increase-Confidence-Exploratory-Testing/product-reviews/1937785025" class="remarkup-link remarkup-link-ext" rel="noreferrer">4.7</a> (77 ratings, 39 reviews). After reading the book, I completely agree with the ratings.</p>

<h2 class="remarkup-header">Book Club</h2>

<p>Once a month, we have a book club meeting. We usually read a book for one or two months. So, we have one or two meetings about the book. This was the first time we were reading the book for three months. As with <a href="/J274" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_109"><span class="phui-tag-core phui-tag-color-object">Blog Post: Lessons Learned in Software Testing: A Context-Driven Approach</span></a>, I wanted to invite the author to the meeting.</p>

<p>After a bit of searching my archives, I&#039;ve found that I&#039;ve <a href="https://filipin.eu/poklon-1" class="remarkup-link remarkup-link-ext" rel="noreferrer">reported a bug</a> on her website in 2005 and she sent me a <a href="https://filipin.eu/poklon-2" class="remarkup-link remarkup-link-ext" rel="noreferrer">journal and a couple of bracelets</a> as a thank you note. I met her in <a href="https://filipin.eu/san-francisco-2013" class="remarkup-link remarkup-link-ext" rel="noreferrer">2013</a> while visiting San Francisco for business. In 2014 she <a href="https://www.meetup.com/wikimedia-tech/events/207856222/" class="remarkup-link remarkup-link-ext" rel="noreferrer">gave a talk</a> on exploratory testing at the Wikimedia Foundation office (<a href="https://youtu.be/ylWjw9iPWg0" class="remarkup-link remarkup-link-ext" rel="noreferrer">video</a>). So, I didn&#039;t feel like a complete fool when I asked her to come to the meeting.</p>

<p>To my big surprise, she agreed to come! 😅 My biggest takeaway from the meeting was the discussion about how hard it was to write the book and how much a good editor (the person, not the text editor) contributes to the end result.</p>

<h2 class="remarkup-header">Reviewers</h2>

<p>I would like to thank <a href="https://phabricator.wikimedia.org/p/thcipriani/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_111"><span class="phui-tag-core phui-tag-color-person">@thcipriani</span></a> for reviewing the article and a lot of advice on how to make it better.</p></div></content></entry><entry><title>Sixth Phase — Reaching Destination</title><link href="/phame/live/21/post/280/sixth_phase_—_reaching_destination/" /><id>https://phabricator.wikimedia.org/phame/post/view/280/</id><author><name>Osamaahmed17 (Osama Ahmed Tahir)</name></author><published>2022-04-17T16:20:35+00:00</published><updated>2022-09-30T05:03:06+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><blockquote><p>Life is like riding a bicycle. To keep your balance you must keep moving. — Albert Einstien</p></blockquote>

<p><strong>Overview</strong><br />
Programs like Outreachy help an individual a lot when you are starting to work on open source. Over time, I have learned a lot throughout this program and have gotten the confidence to work in any system. Getting confidence, learning new technologies, and working with collaboration were a few aspects of this internship.</p>

<p><strong>What were the most amazing and fearful aspects of this program?</strong><br />
When contributing to it for the first time, I was having a fear that I wouldn’t be having the required expertise but as I started to learn more about it, it became easier to resolve assigned tasks. During the internship journey, there were several challenges that I came across. One of the challenges was about “Falsy” and “Truthy” values were highly interesting. After a few experiments, I learned that these terms are not exactly the same “True” and “False”.</p>

<p><strong>What technical skills did I acquire?</strong><br />
Getting to know more about Gerrit, how the system handles CI/CD, and upskilling my sync/async knowledge. This will be going to help me write code in an efficient manner in the future and develop resilient architecture. Moreover, working in an open-source environment would help me to contribute further to different technologies. My mentor used to help me whenever I used to get stuck on a bug. We used to have regular meetings, where we used to discuss issues and the latest methods. From time to time, he has provided me with valuable lessons and suggestions.</p>

<p><strong>Did this program increase my confidence?</strong><br />
As mentioned earlier, the Outreachy program has provided me with all the right skills to contribute to more open-source areas, and hence, I feel more confident to contribute more to open-source in the future. Moreover, having conversations with individuals from different areas has improved my communication and presentation skills. Now I can deliver my message more clearly.</p>

<p><strong>What are my future perspectives?</strong><br />
I was able to async and deploy one of the core repositories while continuing working on other sub repositories. Even though the Outreachy program has finished, I would still continue working on the remaining repositories and would try to fix the remaining issues.</p></div></content></entry><entry><title>Fifth Phase - Experience and Learning</title><link href="/phame/live/21/post/279/fifth_phase - experience_and learning/" /><id>https://phabricator.wikimedia.org/phame/post/view/279/</id><author><name>Osamaahmed17 (Osama Ahmed Tahir)</name></author><published>2022-04-17T16:16:24+00:00</published><updated>2022-04-17T16:16:49+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><blockquote><p>Anyone who has never made a mistake has never tried anything new — Albert Einstein</p></blockquote>

<p>When you are trying new things, you always need time to become an expert. It’s been quite a while since I have been working for Outreachy and it has taught me a lot of things. Well, these are the few things which I have come across.</p>

<p><strong>The mystery behind “Truthy and Falsy&quot;</strong><br />
From the definition, In JavaScript Truthy value is considered true when encountered in a Boolean context and vice versa for <strong>Falsy</strong></p>

<p><em>So what’s the mystery behind this?</em></p>

<p>This is the concept behind it but <strong>why</strong> is it being utilized in my open source project?</p>

<p>Well, I was making all the use cases from <a href="https://medium.com/@osamaahmedtahir17/fourth-phase-career-opportunities-ebb5afdbda96" class="remarkup-link remarkup-link-ext" rel="noreferrer">sync</a> to <a href="https://medium.com/@osamaahmedtahir17/fourth-phase-career-opportunities-ebb5afdbda96" class="remarkup-link remarkup-link-ext" rel="noreferrer">async</a> and on the way, my mentor and I observed something strange. The values inside the assert were returning a <a href="https://www.geeksforgeeks.org/javascript-promises/" class="remarkup-link remarkup-link-ext" rel="noreferrer">“Promise”</a> rather than an actual value. We didn’t figure this out earlier because tests were passing and we thought that there wasn’t an issue. In reality, what was actually happening was that the tests were passing because “assert” considers a Promise as a Truthy value rather than a Falsy, and for that when it used to receive a Promise, it used to mark it as a pass.</p>

<p>In simple terms, all the values besides these are considered Truthy.</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">false</li>
<li class="remarkup-list-item">0</li>
<li class="remarkup-list-item">-0</li>
<li class="remarkup-list-item">“”</li>
<li class="remarkup-list-item">null</li>
<li class="remarkup-list-item">undefined</li>
<li class="remarkup-list-item">NaN</li>
</ul>

<p>So this was something new that I didn’t know before so definitely it was a learning experience for me.</p>

<p><strong>WebdriverIO — An Encyclopedia of its own</strong><br />
The documentation of <a href="https://webdriver.io/" class="remarkup-link remarkup-link-ext" rel="noreferrer">WebdriverIO</a> is indeed intensive and that’s really helpful. Over the time of my career, I have come across a lot of documentation and for some of the time, I have written my own as well but I haven’t seen documentation as extensive as this one.</p>

<p><strong>Zuul, Jenkins, and Gerrit — Three Musketeers</strong><br />
<a href="https://zuul-ci.org/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Zuul</a> is considered to be an open-source CI that powers some of the largest Open Source development efforts whereas <a href="https://www.jenkins.io/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Jenkins</a> itself is a leading open source automation server. Jenkins provides hundreds of plugins to support building, deploying, and automating any project. <a href="https://www.gerritcodereview.com/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Gerrit</a> is a free, web-based team code collaboration tool. Software developers in a team can review each other’s modifications to their source code using a Web browser and approve or reject those changes. If you are using these three in a project, developers in your team would be appreciating you a lot. My experience with these three tools has been great and it looks like when you are in a battle, this trio is always there to protect you.</p>

<p><strong>Experience Uptill now</strong><br />
The experience has been really superb up till now and I have learned a lot. This experience would help me in my career to become even a better software engineer in the future who doesn&#039;t only know about software development but would know about software testing as well!</p></div></content></entry><entry><title>Outreachy, December 2021-March 2022</title><link href="/phame/live/21/post/277/outreachy_december_2021-march_2022/" /><id>https://phabricator.wikimedia.org/phame/post/view/277/</id><author><name>zeljkofilipin (Željko Filipin)</name></author><published>2022-03-29T13:09:10+00:00</published><updated>2023-09-10T15:22:13+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><h2 class="remarkup-header">Mentoring</h2>

<p>Every time I finish a mentorship, I read my blog posts about previous mentorships. Almost every time I finish a mentorship I write that I&#039;ll probably take a break from mentoring for a while, but then I don&#039;t. 😅</p>

<h2 class="remarkup-header">Introduction</h2>

<p>For the last few months I have been mentoring <a href="https://phabricator.wikimedia.org/p/Osamaahmed17/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_117"><span class="phui-tag-core phui-tag-color-person">@Osamaahmed17</span></a>. He was an <a href="/tag/outreachy/" class="phui-tag-view phui-tag-type-shade phui-tag-blue phui-tag-shade phui-tag-icon-view " data-sigil="hovercard" data-meta="0_116"><span class="phui-tag-core "><span class="visual-only phui-icon-view phui-font-fa fa-umbrella" data-meta="0_115" aria-hidden="true"></span>Outreachy</span></a> <a href="https://www.mediawiki.org/wiki/Outreachy/Round_23" class="remarkup-link remarkup-link-ext" rel="noreferrer">Round 23</a> intern. He was working on <a href="/T256626" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_112"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T256626: Refactor WebdriverIO tests from sync to async mode</span></span></a>. That was a very challenging task. Both of us didn&#039;t know much about async/await when the internship started.</p>

<p>As I was preparing for this blog post, I checked when was the first time I&#039;ve met Osama. Looks like the first interaction we had was on Zulip in October 2021. He introduced himself and asked a question. We&#039;ve had many conversations since and got to know each other pretty well.</p>

<h2 class="remarkup-header">Tasks</h2>

<p>He created <a href="https://phabricator.wikimedia.org/maniphest/query/mEKeSiZyuPe3/#R" class="remarkup-link" rel="noreferrer">23 tasks</a> in Phabricator (our task tracking tool) and resolved <a href="https://phabricator.wikimedia.org/maniphest/query/yG7L5nEAxIE6/#R" class="remarkup-link" rel="noreferrer">13</a> of them. Besides his main task, he also worked on several small side projects. An interesting one was <a href="/T300386" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_113"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T300386: Delete Invisible Unicode Characters</span></span></a>. He also worked on <a href="/T256239" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_114"><span class="phui-tag-core phui-tag-color-object">T256239: Run Selenium tests targeting MediaWiki-Docker</span></a>.</p>

<h2 class="remarkup-header">Commits</h2>

<p>Osama created <a href="https://gerrit.wikimedia.org/r/q/owner:osamaahmedtahir17%2540gmail.com" class="remarkup-link remarkup-link-ext" rel="noreferrer">45 commits</a> in Gerrit, our code review tool. <a href="https://gerrit.wikimedia.org/r/q/owner:osamaahmedtahir17%2540gmail.com+is:merged" class="remarkup-link remarkup-link-ext" rel="noreferrer">16</a> of those commits are merged so far. A notable commit is <a href="https://gerrit.wikimedia.org/r/c/mediawiki/core/+/730546" class="remarkup-link remarkup-link-ext" rel="noreferrer">730546</a> for the MediaWiki Core repository that needed 69 updates before it was merged. We needed <a href="https://gerrit.wikimedia.org/r/q/owner:osamaahmedtahir17%2540gmail.com+project:mediawiki/core+is:merged" class="remarkup-link remarkup-link-ext" rel="noreferrer">3 more follow up commits</a> to finish the task in that repository. 😬</p>

<p>Besides his main project, notable commits include releasing a <a href="https://gerrit.wikimedia.org/r/c/mediawiki/core/+/744818" class="remarkup-link remarkup-link-ext" rel="noreferrer">new version</a> of an npm package and <a href="https://gerrit.wikimedia.org/r/c/wikimedia/portals/deploy/+/766163" class="remarkup-link remarkup-link-ext" rel="noreferrer">fixing a dependency</a> in one of our projects.</p>

<h2 class="remarkup-header">Communication</h2>

<p>Osama has documented the internship both on <a href="https://medium.com/@osamaahmedtahir17" class="remarkup-link remarkup-link-ext" rel="noreferrer">his personal blog</a> and on <a href="https://phabricator.wikimedia.org/phame/blog/view/21/" class="remarkup-link" rel="noreferrer">my team blog</a>. We have used <a href="https://wikimedia.zulipchat.com/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Zulip</a> for chat and <a href="https://apps.google.com/meet/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Google Meet</a> for video meetings.</p>

<h2 class="remarkup-header">Conclusion</h2>

<p>I really like mentoring. I learn something new with each intern I mentor. I hope they also learn something from me.</p></div></content></entry><entry><title>Fourth Phase — Career Opportunities</title><link href="/phame/live/21/post/276/fourth_phase — career_opportunities/" /><id>https://phabricator.wikimedia.org/phame/post/view/276/</id><author><name>Osamaahmed17 (Osama Ahmed Tahir)</name></author><published>2022-03-21T15:56:39+00:00</published><updated>2022-04-17T16:03:46+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><blockquote><p>“Peace cannot be kept by force. It can only be achieved by understanding.” — Albert Einstein</p></blockquote>

<p>When you are working on a project, sometimes things can become quite stressful but quotes like above are always motivating. The Outreachy program has taught me a few things related to technical fields which I believe would be beneficial in the long run in my career. As the program is halfway through and I have learned a lot, there are a few things that I like to mention.</p>

<p><strong>Concept of Sync and Async</strong><br />
The project to which I was assigned relied heavily upon the concept of <strong>synchronous</strong> and <strong>asynchronous</strong>. As I have been working in the field of software engineering for a while, I was already aware of the concept. For people who don’t know about it, here you go.<br />
In synchronous operations, tasks are executed one at a time, and only after one is finished is the next allowed. In other words, you must wait for one activity to complete before moving on to the next.</p>

<p><strong>Asynchronous operations</strong>, on the other hand, allow you to switch to another activity before the preceding one completes. As a result of asynchronous programming, you may handle multiple requests at the same time, executing more tasks in a much shorter time.</p>

<p>This is the concept behind it but <strong>why</strong> is it being utilized in my open source project?</p>

<p>There is a package called <a href="https://www.npmjs.com/package/@wdio/sync" class="remarkup-link remarkup-link-ext" rel="noreferrer">WebdriverIO Sync</a> and its support has been dropped by <a href="https://webdriver.io/" class="remarkup-link remarkup-link-ext" rel="noreferrer">WebdriverIO</a> due to breaking changes in fibers and V8. As this package was being used as a dependency for the selenium tests, it was required to move all selenium tests from sync to async. <br />
To do so, the first challenge was to get aware of the documentation provided by WebdriverIO. The documentation provided me with an understanding of how the <a href="https://webdriver.io/docs/sync-vs-async" class="remarkup-link remarkup-link-ext" rel="noreferrer">sync and async</a> concept is being utilized and how it can be implemented in the MediaWiki Selenium tests. For instance, the following code contains a test and is mentioned in sync mode.</p>

<p>For us to make it into async, it is required that the test uses async and await. Plus, all WebdriverIO commands return a <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise" class="remarkup-link remarkup-link-ext" rel="noreferrer">Promise</a> and need to be awaited to get the result. Observe the following.</p>

<p>This is one area where I have been currently working and to be more familiar regarding sync and async usage would definitely recommend you to have a look at the getting started <a href="https://webdriver.io/docs/gettingstarted" class="remarkup-link remarkup-link-ext" rel="noreferrer">guide</a>.</p>

<p><strong>Gerrit and why do I like it?</strong><br />
I have been working with Gerrit for a while and personally, I like it. So before I can jump into more depth, let&#039;s see what Gerrit is.<br />
As per <a href="https://en.wikipedia.org/wiki/Gerrit_%28software%29" class="remarkup-link remarkup-link-ext" rel="noreferrer">Wikipedia</a>, “it is a free, web-based team code collaboration tool. Software developers in a team can review each other’s modifications on their source code using a Web browser and approve or reject those changes. It integrates closely with Git, a distributed version control system”.</p>

<p>So why do I like <strong>Gerrit</strong>?</p>

<p>The reason is its ability to make multiple patches on a commit before merging it. You can easily make individual comments on each patch that can be reviewed by one or more individuals.</p>

<p><strong>How will these things help me with my career?</strong><br />
So not to make this blog so long, in the end I would say that it&#039;s just a part of the things that I have learned uptill now and with a month still remaining, I am aiming to learn even more. Ultimately, working in an opensource platform will help me to get my dream job and I am definitely ensured that hard work will definitely help me to ace that future interview!</p></div></content></entry><entry><title>Lessons Learned in Software Testing: A Context-Driven Approach</title><link href="/phame/live/21/post/274/lessons_learned_in_software_testing_a_context-driven_approach/" /><id>https://phabricator.wikimedia.org/phame/post/view/274/</id><author><name>zeljkofilipin (Željko Filipin)</name></author><published>2022-03-01T19:12:42+00:00</published><updated>2022-03-01T19:12:42+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/u3n6oyqdfq56d4fd4hk6/PHID-FILE-c4mat54neyatblazqkl2/lessons-learned.jpg" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_118"><img src="https://phab.wmfusercontent.org/file/data/livu523jngvg65twhtsl/PHID-FILE-dqbak6bpa2ubeghjlmxc/preview-lessons-learned.jpg" width="220" height="220" alt="lessons-learned.jpg (612×612 px, 127 KB)" /></a></div></p>

<p><em>Lessons Learned in Software Testing signed by Bret Pettichord.</em></p>

<h2 class="remarkup-header">The Book in Five Sentences</h2>

<p>Testing is a mental activity that requires skill and experience. Your job is to find information about the project, fast. You will not find all the problems. Writing well is as important as testing well. It&#039;s better to do a lot of kinds of testing well than to do just a few kinds of testing perfectly.</p>

<h2 class="remarkup-header">Introduction</h2>

<p>I read 100-200 books a year. I rate books on a 1-5 scale. (5 is the best.) It&#039;s rare that a book gets a 5. This is one of those books. In the last two years, only about 2% of the books I&#039;ve read got a 5. (In 2021 I&#039;ve read over a 100 books, only 2 books got a 5. In 2020 I&#039;ve read over 200 books, only 5 books got a 5.)</p>

<p>I read Lessons Learned for the first time <a href="https://filipin.eu/lessons-learned-in-software-testing-2012" class="remarkup-link remarkup-link-ext" rel="noreferrer">a decade ago</a>, in 2012. (I gave it a 4 then.) As with the previous book I wrote about, <a href="/J264" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_120"><span class="phui-tag-core phui-tag-color-object">Blog Post: Perfect Software by Gerald M. Weinberg</span></a>, I don&#039;t think I had enough experience to fully appreciate the book then. It took another decade of experience to understand how well written the book is, and how important the topics discussed in it are.  In 2012 I thought the chapters on test automation and career development were the most important. Looking back, I agree that those two chapters were the most important then. At the time, I was working as a freelancer, mainly on small and short projects. Being good at test automation and taking care of my career were the most important things then, and in a lot of sense even now.</p>

<p>As I review the chapters now, I would like to add more chapters to the most-important list. I&#039;m struggling not to put all 11 chapters on the list. If I had to pick only one more, I would pick the chapter on testing strategy. That&#039;s something I&#039;ve seen not done at all, not done on purpose, or not done well, over and over.</p>

<p>Technical books get obsolete very fast. Lessons Learned was written in 2002. For a 20 year old book it&#039;s surprisingly up to date. There were a few mentions of obsolete technologies in it, but the vast majority of the book is as relevant now as it was when it was written.</p>

<h2 class="remarkup-header">Book Club</h2>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/oecu7artcdpl4tmjhbc5/PHID-FILE-rdlecbxqzggjl2mp5lqg/book-club.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_119"><img src="https://phab.wmfusercontent.org/file/data/5a5dyz7v4tk32w2pid3c/PHID-FILE-jhosxmg4l6h727xwq2rj/preview-book-club.png" width="220" height="92.125" alt="book-club.png (268×640 px, 225 KB)" /></a></div></p>

<p>I was reading this book as part of a <a href="/T247665" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_121"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T247665: QTE book club</span></span></a> at work. We pick a book and read it for a month or two, depending on how much it takes us to read it. At the end of each month we have a book club meeting discussing the book. We&#039;ve read this book for a couple of months. For the second meeting I&#039;ve invited one of the authors, Bret Pettichord, to join us. That was the best book club meeting we had so far. Bret shared a lot of stories with us. From how they wrote the book to some of his recent projects. We also got to ask a lot of questions.</p></div></content></entry><entry><title>Third Phase – Midpoint Progress in the journey</title><link href="/phame/live/21/post/270/third_phase_–_midpoint_progress_in_the_journey/" /><id>https://phabricator.wikimedia.org/phame/post/view/270/</id><author><name>Osamaahmed17 (Osama Ahmed Tahir)</name></author><published>2022-01-23T22:43:22+00:00</published><updated>2022-02-12T21:26:04+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><blockquote><p>“Simplicity is the ultimate sophistication” - Leonardo da Vinci</p></blockquote>

<p>A human being is a complex organism because it is made up of a million individual systems. When you are ill, the doctor tries to find the root of the problem by often trying simple tests first. The same thing happens with software as well. As software often becomes complex, its debugging usually requires simple steps. That is one of the best things which I was able to learn from my journey up till now and I believe that over time, I will be further able to master my capability to simplify things. Simplification was one of the aspects which I was able to grasp but there were a few challenges along the way that helped me grasp other things as well.</p>

<p><strong>Challenges</strong><br />
When you are working on code that has a really great impact on the software, you always have to be extra careful. I started my work on the core component of the software as most of my other work was highly dependent upon it. Making changes to that component and then merging that change to the main software was a challenging task. Changes or commits made used to go through Wikipedia CI/CD (Continuous Integration and Continuous Deployment) software called <a href="https://zuul-ci.org/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Zuul</a>. As Wikipedia is an open source platform, dozens of people commit their code every day. Hence, there used to be a possibility that continuous integration would fail a few times so figuring out why it failed used to be the first challenge. It becomes even more challenging when other developers are working on the same library so when it used to fail, you need to figure out whether it’s your fault or someone else.</p>

<p>A complex platform is often dependent on multiple packages and from time to time, these packages get updated as well. There is also a possibility that the updated package would stop providing particular functionality and if your platform is using that functionality, you might get an error. It usually happens when you update the package in the platform as their support is no longer available. This was the second challenge that I faced during the debugging sessions and figuring out the right package version for the platform was a complicated task. However, after multiple tries and countless hours, I was able to figure out the package version and the code was able to pass all the tests in the Zuul.</p>

<p><strong>Achievements and Learning</strong><br />
After facing multiple challenges in my journey up till now, I was able to learn a lot of things. Simplicity was one of the aspects which I was able to grasp and came to know about new software like Gerrit and Zuul. Even though I have worked with similar platforms and software, using it felt a bit different. Pairing programming, thinking out of the box, and debugging were some of the other aspects which I was able to learn. After working for multiple weeks and learning new things at the same time, I was able to get my first major commit merged for the MediaWiki Core!</p></div></content></entry><entry><title>Second Phase – Everybody struggles and what does the audience think about it?</title><link href="/phame/live/21/post/269/second_phase_–_everybody_struggles_and_what_does_the_audience_think_about_it/" /><id>https://phabricator.wikimedia.org/phame/post/view/269/</id><author><name>Osamaahmed17 (Osama Ahmed Tahir)</name></author><published>2022-01-23T22:38:47+00:00</published><updated>2022-02-12T21:34:16+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Failures and setbacks are always part of life and sometimes it feels more like a roller coaster. You can either enjoy it or just spend the whole time screaming in fear. Those ups and downs in roller coasters are more similar to failures and success in life. If you think about it, it’s more like a journey where you have a starting point and a destination.</p>

<p>For myself, taking part in the Outreachy program was one of the steps in the journey and when you take part in a technical exam, it’s more like a rollercoaster where at one time your code is perfect and at other times, you are just giving up. I guess this is a story for everyone and from my perspective, how you conceive that journey, all it matters. If you learn from that journey, you are just adding power-up to yourself. But the secret ingredient to this power-up is that you need to trust your struggle altogether.</p>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/2y57xycoybcwkrcswzna/PHID-FILE-euetcfaf7vznitszqrpm/Screenshot_2022-01-24_at_9.35.32_AM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_122"><img src="https://phab.wmfusercontent.org/file/data/ckm3powsljbsxxmjsg7w/PHID-FILE-xjija6ykooihjvxz4ere/preview-Screenshot_2022-01-24_at_9.35.32_AM.png" width="220" height="92.520064205457" alt="Screenshot 2022-01-24 at 9.35.32 AM.png (524×1 px, 71 KB)" /></a></div></p>

<p><strong>Journey Uptill Now!</strong><br />
So coming back to my struggles in the Outreachy program. Contributing to the project felt more like moving to a different country and learning a new language. Signs look different, language is different, rules are different … so many things.</p>

<p><strong>So how do you counter this?</strong><br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/vxrmuhpafyy4lytopbfc/PHID-FILE-4s73mtffytnkr2nefzim/Screenshot_2022-01-24_at_9.36.46_AM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_123"><img src="https://phab.wmfusercontent.org/file/data/v4cbhdupf3523dbzxmgd/PHID-FILE-wsj4y6ukny7vebnf3gww/preview-Screenshot_2022-01-24_at_9.36.46_AM.png" width="220" height="140.99838969404" alt="Screenshot 2022-01-24 at 9.36.46 AM.png (796×1 px, 159 KB)" /></a></div></p>

<p>In the beginning, one of my struggles was to figure out Gerrit. I have used GitHub a lot but Gerrit felt different. In GitHub, you can push multiple commits at once and you can just log all your work into GitHub but in Gerrit, it feels more like an updated version of what I have been using for the past couple of years. In a single commit, you can have multiple “patchsets” and these patches can be then updated through updating the commit. Understanding this took me a while but once I learned it, it became a norm.</p>

<p>During the internship, there came a point when our code wasn’t working as per our requirements. We tried multiple things and spent hours understanding where we were going wrong. The struggle of debugging the code for the error was quite challenging but during this struggle, I learned an important art from my mentor which was “simplification”. Not everything needs to be made complicated. Sometimes, the answer lies just there and you are looking everywhere, making things complicated!</p>

<p><strong>The Audience Perspective!</strong><br />
If you are learning throughout your journey and dealing with your struggles, you get noticed by people around you. Sometimes, people also have the same issues as you, and guiding them towards the right direction through your experience is something which I always value. It increases networking opportunities and empathy in society.</p>

<p>If you are dealing with any struggle, then few words of motivation!<br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/3e6dmzefs24sjgm4d2ia/PHID-FILE-7yyfaydmbpvyscbw6dwz/Screenshot_2022-01-24_at_9.38.09_AM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_124"><img src="https://phab.wmfusercontent.org/file/data/34ikudvpu52kj4u5qgiy/PHID-FILE-xo45i76i5rwoy6fs7m5v/preview-Screenshot_2022-01-24_at_9.38.09_AM.png" width="220" height="171.34959349593" alt="Screenshot 2022-01-24 at 9.38.09 AM.png (958×1 px, 575 KB)" /></a></div></p></div></content></entry><entry><title>First Phase – Introduce yourself</title><link href="/phame/live/21/post/268/first_phase_–_introduce_yourself/" /><id>https://phabricator.wikimedia.org/phame/post/view/268/</id><author><name>Osamaahmed17 (Osama Ahmed Tahir)</name></author><published>2022-01-23T22:32:32+00:00</published><updated>2023-09-05T10:40:40+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><blockquote><p>“A journey of a thousand miles begins with a single step” - Lao Tzu</p></blockquote>

<p>I have always been amazed by the latest technology and programming new software is a hobby of mine. From my perspective, the environment plays an important role in the way you develop software and whether you are working in a startup or corporate sector, programming style would be different. Hence, my feelings were different when I started to contribute to open source platforms. Joining the Outreachy program was my first step towards this journey.</p>

<p><strong>What is an Outreachy Program?</strong><br />
As per Wikipedia, Outreachy is a program organized by the Software Freedom Conservancy that arranges three-month paid internships with free and open source software projects for people who are typically underrepresented in those projects.</p>

<p><strong>About myself</strong><br />
I am Osama Ahmed Tahir, an explorer during the day and technology enthusiastic during the night. This would feel like someone who is just from DC comics but being a software engineer feels like you are doing something extraordinary every day. Maybe programming a delivery system for the latest startup or debugging errors of a new feature in an application that is gonna be used by millions of people. Every day feels like a different day when you are a fan of making the world a better place through technology. Every individual has core values which from my terms, are his superpowers! So I also do have some superpowers through which I am trying to make the world a better place. Here are a few of them.</p>

<p><strong>Creativity</strong><br />
Everyone has a different term for the word “Creativity”. In nerd terms, it’s gonna be “Creativity is a phenomenon whereby something new and valuable is formed. The created item may be intangible or a physical object.” Doesn’t sound so creative, doesn’t it? Well in my view, if you are trying something new, you are then creative! I use this superpower a lot, like in everything! When developing software, I think from a different perspective how it can make the person sitting next to you say, wow!</p>

<p><strong>Compassion</strong><br />
Whatever I love to do, I do with compassion. That’s something that has led me far ahead in the field of technology. Being a technology enthusiast from an early age, I started to do programming from an early age. Compassionate towards software development helped me to work on projects that were used by millions of people and were having a great impact on the environment around us.</p>

<p><strong>Curiosity</strong><br />
The other superpower which has helped me to explore new stuff is being curious. It has helped me to learn new programming languages and explore the latest technologies. Combining this power with creativity and compassion has persuaded me to master the latest programming languages much quicker.</p>

<p>In the next blog post, I will discuss my experience regarding joining the Outreachy program so stay tuned!</p></div></content></entry><entry><title>Perfect Software by Gerald M. Weinberg</title><link href="/phame/live/21/post/264/perfect_software_by_gerald_m._weinberg/" /><id>https://phabricator.wikimedia.org/phame/post/view/264/</id><author><name>zeljkofilipin (Željko Filipin)</name></author><published>2021-12-23T14:58:44+00:00</published><updated>2022-01-05T17:38:46+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><h2 class="remarkup-header">The Book in Three Sentences</h2>

<p>There is no perfect software. Testing provides information. Most people you work with will know little about testing.</p>

<h2 class="remarkup-header">Introduction</h2>

<p>When I first read Perfect Software I didn&#039;t understand it. It took a decade of experience for the lessons to sink in.</p>

<p>Please keep in mind that he published the book when he was 75 years old. You can tell the author has many decades of experience. The book is full of real life examples. I could recognize myself in characters from the examples, for more examples that I would like to admit. 😅</p>

<p>Some parts of this book are pure gold. When reading those parts, I was almost writing down everything stated in the book. Some parts of the book are common sense, but it&#039;s still good to have it written down as a reminder and reference. Some parts of the book are more psychology than testing. Surprisingly, those parts are maybe the most important ones.</p>

<p>I really like the format of each chapter. First the main part, followed by a very short summary, then a lot of examples in the &quot;common mistakes&quot; section.</p>

<p>I really liked the chapters where the material is presented in the format of a story (9, 10, 12 and 13). I wish there was more of it. Even the entire novel that would teach you a topic (in this case software testing) by following different characters as the story develops. In the book, three fictional characters (a manager, a developer and a tester) are discussing a problem. First in the office, then over lunch. It&#039;s written very well. I&#039;ve heard that The Phoenix Project is written that way. (I haven&#039;t read it yet, it&#039;s on my to-read list.)</p>

<p>I also really liked the last two chapters (17 and 18). They are about scams. I&#039;ve seen so many of them in my career. I&#039;ve written more about it in the chapter summary.</p>

<p>I&#039;ll try to summarize each chapter. For some chapters, I&#039;ve included a quote that I particularly liked. Often the quote is the perfect summary of the chapter.</p>

<h2 class="remarkup-header">Chapters</h2>

<h3 class="remarkup-header">1 Why do we bother testing?</h3>

<p>We are testing all the time. If we were perfect, we would not need to test. Testing provides information. Testers should not decide if the project is ready, that&#039;s the manager&#039;s job.</p>

<p><em>We can predict anything except the future. (Page 8.)</em></p>

<h3 class="remarkup-header">2 What testing cannot do?</h3>

<p>Don&#039;t test if you don&#039;t plan to use the information gathered.</p>

<h3 class="remarkup-header">3 Why not just test everything?</h3>

<p>There are an infinite number of tests. You can&#039;t think and run them all. Make the best use of your resources and time by running the best sample you can.</p>

<p><em>Testing can be exhausting, but it can never be exhaustive. (Page 24.)</em></p>

<h3 class="remarkup-header">4 What&#039;s the difference between testing and debugging?</h3>

<p><em>Many different tasks requiring many different skills are often lumped under the rubric of testing. (Page 36.)</em></p>

<h3 class="remarkup-header">5 Meta-Testing</h3>

<p><em>You can greatly improve the efficacy of your testing, and lower your costs, if you learn to use meta-information - information about the quality of information. (Page 47.)</em></p>

<h3 class="remarkup-header">6 Information immunity</h3>

<p><em>Information is neutral, but people&#039;s reactions to information are rarely neutral. To assess testing information, you must take into account people&#039;s emotional defenses. (Page 59.)</em></p>

<h3 class="remarkup-header">7 How to deal with defensive reactions</h3>

<p><em>Take people&#039;s emotions into account, try to understand them and resolve the problems caused by them. (Page 66.)</em></p>

<h3 class="remarkup-header">8 What makes a good test?</h3>

<p><em>You&#039;ll never know for sure whether your testing was done well, but there are many ways to know or estimate if it was done badly. (Page 72.)</em></p>

<h3 class="remarkup-header">9 Major fallacies about testing</h3>

<p><em>Learning to recognize a handful of major fallacies about testing could eliminate half the gross mistakes project managers make. (Page 81.)</em></p>

<h3 class="remarkup-header">10 Testing is more than banging keys</h3>

<p><em>To qualify as a test, an action has to seek information that will influence action, whether or not it involves banging on keys. (Page 90.)</em></p>

<h3 class="remarkup-header">11 Information intake</h3>

<p><em>Intake is an active process. You are not a victim, having data put into you, but are at least potentially in control of what you take in. (Page 101.)</em></p>

<h3 class="remarkup-header">12 Making meaning</h3>

<p><em>It is up to human beings to attach meaning to data they take in, and each person does so differently. It&#039;s best to keep in mind that there are many possible interpretations of the data. (Page 113.)</em></p>

<h3 class="remarkup-header">13 Determining significance</h3>

<p><em>Our emotions carry information about how important things are. If we pay attention to emotions, listen and address important matters before unimportant matters, we&#039;ll be doing the best we can with the data we have. (Page 124.)</em></p>

<h3 class="remarkup-header">14 Making a response</h3>

<p><em>If a project hasn&#039;t been managed well before testing, most good responses will no longer be available. In many cases, there is no response that will save the project - except starting over and doing it right from the beginning. (Page 134.)</em></p>

<h3 class="remarkup-header">15 Preventing software testing from growing more difficult</h3>

<p><em>There are intrinsic system dynamics that make testing and fixing take longer as products grow larger and more complex. (Page 140.)</em></p>

<h3 class="remarkup-header">16 Testing without machinery</h3>

<p><em>There are many ways of testing without involving computers, but no way of testing that doesn&#039;t involve using brains. Test early and often; use all the brains you can muster. (Page 151.)</em></p>

<h3 class="remarkup-header">17 Testing scams</h3>

<p>I&#039;ve used several testing tools. I&#039;ve contributed to the development of one. I have many years of experience with tools. I am very suspicious of tools making promises. There are a lot of tools that are claiming they have some special super-power, magic or can read your mind. These days they frequently have AI/ML in their name or description.</p>

<p><em>Whenever you&#039;re desperate to clean up the bugs and ship a product, you&#039;re vulnerable to a variety of testing scams that promise quick, painless relief. (Page 160.)</em></p>

<h3 class="remarkup-header">18 Oblivious scams</h3>

<p><em>When we want so much for everything to go well, it&#039;s all too easy to inject our fantasies into our data. (Page 168.)</em></p>

<h2 class="remarkup-header">Reviewers</h2>

<p>I would like to thank <a href="https://phabricator.wikimedia.org/p/thcipriani/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_125"><span class="phui-tag-core phui-tag-color-person">@thcipriani</span></a> for reviewing the article and a lot of advice on how to make it better.</p></div></content></entry><entry><title>Lessons from 16 Years of Working Remotely</title><link href="/phame/live/21/post/263/lessons_from_16_years_of_working_remotely/" /><id>https://phabricator.wikimedia.org/phame/post/view/263/</id><author><name>zeljkofilipin (Željko Filipin)</name></author><published>2021-12-06T14:26:35+00:00</published><updated>2022-01-06T02:55:31+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>I have been working remotely since 2005. Recently, an intern has asked me for advice about it. I&#039;ve decided to write a blog post. I hope the advice will be useful to a wide range of people. From people new to remote work (possibly because of COVID) to people with years of experience.</p>

<p>Some of the advice I&#039;ll give in this post might apply to you, some of it might not. Most of the advice should be useful regardless of where you work from, from the office, from a co-working space or from home. You don&#039;t have to take all of the advice. Especially not all at once. I didn&#039;t.</p>

<h2 class="remarkup-header">Computer</h2>

<p>You&#039;ll probably need one. I&#039;ve used many desktops and laptops. Most computers today should work just fine. I prefer one big screen or two smaller ones. I have a 27 inch iMac from 2012, and it still works great. (I did upgrade RAM and SSD a few years ago.)</p>

<p>When traveling, I prefer a very small laptop. I&#039;ve tried a few options over the years, even very small (and cheap) Chromebooks. I&#039;ve settled on an 11 inch MacBook Air from 2014. It still works just fine.</p>

<h2 class="remarkup-header">Internet</h2>

<p>I never had to pay much for the internet (even in 2005) and it worked well most of the time. I had some trouble with routers, but not much. Today, probably the cheapest wired internet you can buy would work just fine. If you work from a crowded apartment building, WiFi might now work all the time, for various reasons. It took me some effort to set it up because my desk was not so close to the router. Buying a very long <a href="https://en.wikipedia.org/wiki/Ethernet" class="remarkup-link remarkup-link-ext" rel="noreferrer">ethernet</a> cable and plugging it in the router and my desktop machine improved my internet speed, latency and stability significantly. I would recommend <a href="https://fast.com/" class="remarkup-link remarkup-link-ext" rel="noreferrer">fast.com</a> (by Netflix) for testing your connection.</p>

<p>Sometimes I work while traveling, and setting up my phone as a router works great.</p>

<h2 class="remarkup-header">Desk</h2>

<p>&quot;I&#039;ll work from my couch.&quot; Don&#039;t. You&#039;ll need your body long after you&#039;ve retired. Don&#039;t break it while you&#039;re young. Our bodies are made for moving, not for sitting down for many hours, for many decades. I&#039;m not an ergonomics expert, but I&#039;ve learned a bit about it over the years.  Working from the couch puts your body in a position that&#039;s not good for your back and your hands.</p>

<p>Any office desk should work just fine. Bonus points for desks with adjustable height, so you can alternate between sitting and standing. I know IKEA has a few of those.</p>

<h2 class="remarkup-header">Chair</h2>

<p>&quot;I&#039;ll work from the kitchen.&quot; Don&#039;t. It&#039;s probably better than the couch, but you&#039;ll be sitting down for many hours, for many years. Kitchen chairs are not made for that. Invest in a good chair. I have <a href="https://www.spinalis.com/office-chairs/spinalis-hacker/" class="remarkup-link remarkup-link-ext" rel="noreferrer">SpinaliS HACKER</a> for a decade or so. I don&#039;t know how available they are globally.</p>

<h2 class="remarkup-header">Keyboard</h2>

<p>I&#039;ve used many keyboards. I really liked Apple&#039;s bluetooth keyboard, but after a few years of using it, it caused some hand pain. A few years ago, I switched to <a href="https://kinesis-ergo.com/shop/advantage2/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Kinesis Advantage2</a> and never had any problems since. It did take me a while to get used to it, but it was worth the effort.</p>

<h2 class="remarkup-header">Mouse</h2>

<p>I&#039;ve tried many mice, and I really like Apple&#039;s bluetooth mouse. Any mouse I&#039;ve used with my right hand has caused some hand pain. I&#039;ve tried switching to my left hand (I&#039;m right-handed) and never had any trouble since. It does take some time to learn how to use the mouse with the left hand, but it&#039;s definitely worth the effort.</p>

<h2 class="remarkup-header">Headphones</h2>

<p>You&#039;ll need headphones. And if you&#039;re sharing an office you&#039;ll probably want to block disturbing noises. Listening to music or white noise is a good way to do that. Headphones are also very important for video meetings, and it looks like we&#039;ll have more of those in the next few years. I&#039;ve tried many, in-ear, over-the-ear, cheap and expensive, bluetooth and wired, and I mostly use the cheap Apple wired in-ear headphones.</p>

<h2 class="remarkup-header">Text Chat</h2>

<p>I&#039;ve used many chat software, but I don&#039;t have strong opinions. For many years, I&#039;ve used IRC via <a href="https://www.irccloud.com" class="remarkup-link remarkup-link-ext" rel="noreferrer">IRCCloud</a>. Lately I mostly use Slack. From a communication perspective, it&#039;s almost not important which tool you use. It&#039;s important that you can communicate both socially (non-work related topics) and professionally (work related topics) with the people you work with. When possible, I try to avoid Slack. I don&#039;t like their <a href="https://en.wikipedia.org/wiki/Vendor_lock-in" class="remarkup-link remarkup-link-ext" rel="noreferrer">vendor lock-in</a> model.</p>

<h2 class="remarkup-header">Audio/Video Chat</h2>

<p>I&#039;ve separated this from text chat, because it&#039;s different. Most of the time, e-mail, text chat and similar will work just fine, but sometimes, the best way to resolve problems is to talk face-to-face, or share a screen. As usual, I&#039;ve used a lot of video chat apps and most of them work just fine.</p>

<h2 class="remarkup-header">Water-cooler Meeting</h2>

<p>Water-cooler meeting is a special type of video call with your colleagues. It&#039;s a social time, where you can build social connections and learn more about people you work with. We&#039;re not robots. We are social creatures. To work well with other people, we need shared experiences and trust.</p>

<h2 class="remarkup-header">Time Tracking</h2>

<p>I think I&#039;ve started tracking time as soon as I&#039;ve started working remotely. Remote work gives you great flexibility, most of the time. You can start or stop working whenever you want. You can split the day with a long lunch break. It&#039;s very easy to spend the day doing private stuff instead of working. To paraphrase Spider-Man: &quot;with great flexibility comes great responsibility&quot;. I track my time in 5-minute intervals. I don&#039;t track things that take less than 5 minutes. I don&#039;t think  any employer ever asked me to track my time, but I still do it.</p>

<h2 class="remarkup-header">Flexibility</h2>

<p>I would encourage you to take advantage of the flexibility that remote work offers. You can do shopping, exercise at your favorite gym, go to movies (...) when most of the people are working. Just make sure you track the time you&#039;ve worked.</p>

<h2 class="remarkup-header">Work Hours</h2>

<p>There isn&#039;t a universal best time to work. It will mostly depend on your current situation. Most of the people I work with live in the US, while I live in Europe. For some of my colleagues, there is a nine-hour time difference. Some people choose to work at the time when most of the company works, however unusual that work hours are in their country. I have a family, so that doesn&#039;t work for me. I still have plenty of late meetings, sometimes until 7pm.</p>

<h2 class="remarkup-header">Travel</h2>

<p>Before COVID, I used to travel for work a few times a year. Just enough for my taste to see the world, but not too much, since I like to travel. I&#039;ve visited many countries and cities. Unfortunately, sometimes the only thing I saw was the hotel and the conference venue. Fortunately, trips like that were very rare. I usually manage to spend at least half a day sightseeing. Sometimes even for a few days.</p>

<p>Meeting face-to-face at least several times a year with people you work with is very important. It&#039;s much easier to resolve conflicts and problems with people you trust and have strong social connections with. That is currently very hard to do. The best we can do for now is to be social using technology.</p>

<h2 class="remarkup-header">Exercise</h2>

<p>I originally named this chapter Serious Exercise. You will be sitting for many hours. For decades. Your body is not made for that.</p>

<p>I like running, so that&#039;s what I&#039;ve decided to become serious about. It&#039;s almost not important which sport you&#039;ll pick. It&#039;s more important that you pick something you like doing, so you stick with it for years and decades.</p>

<p>If it&#039;s a group sport, join a club. If it&#039;s something you can do alone (like running), I would still recommend joining a club, or getting a coach. Especially if you haven&#039;t exercised in years, or decades. The most important thing is to create a habit of exercise and avoid injury. A club or a coach will help you start slow and improve over time.</p>

<p>To learn more, I would highly recommend <a href="https://pragprog.com/titles/jkthp/the-healthy-programmer/" class="remarkup-link remarkup-link-ext" rel="noreferrer">The Healthy Programmer</a> book. It is marketed towards programmers, but it offers good advice for any office job.</p>

<h2 class="remarkup-header">Reviewers</h2>

<p>I would like to thank <a href="https://shime.sh/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Hrvoje Šimić (Shime)</a> for reviewing the article and a lot of advice on how to make it better.</p></div></content></entry><entry><title>Schools of Software Testing</title><link href="/phame/live/21/post/258/schools_of_software_testing/" /><id>https://phabricator.wikimedia.org/phame/post/view/258/</id><author><name>zeljkofilipin (Željko Filipin)</name></author><published>2021-10-19T17:13:46+00:00</published><updated>2022-06-17T14:15:49+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><h2 class="remarkup-header">Reading Club</h2>

<p>A few years ago we had regular reading club meetings at work. I really liked it. We would pick an article or a book and read it. Every month we would have a meeting and discuss the article or the book. If it was a long book, we would split it in several months. We didn&#039;t have a reading club for a while. I&#039;ve missed it.</p>

<p>I&#039;ve started working from an office recently and I&#039;ve found several interesting books there. I&#039;ve read most of them, but a long time ago. I wanted to read them again. Reading with other people is always more fun, so I&#039;ve decided to start the reading club again.</p>

<p>I&#039;ve thought hard about the order in which to read the books. People on my team are on several continents, so I&#039;ve tried finding books that are available in ebook format. That should make it easier for everybody to get the book. I&#039;ve also checked book ratings on Goodreads and Amazon. <a href="/T247665" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_126"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T247665: QTE book club</span></span></a> lists the books in the order in which we plan to read them. Book prices and ratings are also included.</p>

<h2 class="remarkup-header">Schools of Software Testing</h2>

<p>I thought a shorter read would be a good warm up for the reading club. I&#039;ve heard about schools of software testing many years ago. I liked the idea immediately. I find it a good tool to explain why the experts are talking about different things when they talk about testing. It&#039;s probably not the perfect model, but it&#039;s a useful one.</p>

<p>After a bit of searching, I&#039;ve found several presentations, blog posts and videos about the topic. If you know about more good sources of information about the topic, please do let me know. This is the list.</p>

<ul class="remarkup-list">
<li class="remarkup-list-item"><a href="http://www.testingeducation.org/conference/wtst_pettichord_FSofST2.pdf" class="remarkup-link remarkup-link-ext" rel="noreferrer">Four Schools of Software Testing</a> by <a href="http://www.pettichord.com/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Bret Pettichord</a>, slides (pdf), from 2003, ~ 5 minutes.<ul class="remarkup-list">
<li class="remarkup-list-item">Schools: Analytical, Factory, Quality Assurance, Context-Driven.</li>
</ul></li>
<li class="remarkup-list-item"><a href="http://kaner.com/?p=15" class="remarkup-link remarkup-link-ext" rel="noreferrer">Schools of software testing</a> by <a href="https://en.wikipedia.org/wiki/Cem_Kaner" class="remarkup-link remarkup-link-ext" rel="noreferrer">Cem Kaner</a>, blog post, from 2006, ~ 20 minutes.<ul class="remarkup-list">
<li class="remarkup-list-item">Schools: Factory, Control, Test-driven, Analytical, Context-driven.</li>
</ul></li>
<li class="remarkup-list-item"><a href="https://www.prismnet.com/~wazmo/papers/four_schools.pdf" class="remarkup-link remarkup-link-ext" rel="noreferrer">Five Schools of Software Testing</a> by <a href="http://www.pettichord.com/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Bret Pettichord</a>, slides (pdf), from 2007, ~ 5 minutes.<ul class="remarkup-list">
<li class="remarkup-list-item">Schools: Analytic, Standard, Quality, Context-Driven, Agile.</li>
</ul></li>
<li class="remarkup-list-item"><a href="https://youtu.be/4GwHGbQZP2s" class="remarkup-link remarkup-link-ext" rel="noreferrer">Are Testing &quot;Schools&quot; a good idea?</a> by <a href="https://www.linkedin.com/in/doughoffman/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Doug Hoffman</a> and <a href="https://en.wikipedia.org/wiki/James_Marcus_Bach" class="remarkup-link remarkup-link-ext" rel="noreferrer">James Bach</a>, video, from 2012, ~ 70 minutes.</li>
<li class="remarkup-list-item"><a href="https://context-driven-testing.com/schools-of-software-testing-useful-or-negative-influence/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Schools of Software Testing: Useful or Negative Influence?</a> by <a href="https://en.wikipedia.org/wiki/Cem_Kaner" class="remarkup-link remarkup-link-ext" rel="noreferrer">Cem Kaner</a> and <a href="https://en.wikipedia.org/wiki/Rex_Black" class="remarkup-link remarkup-link-ext" rel="noreferrer">Rex Black</a>, blog post, from 2014, ~ 45 minutes.</li>
</ul>

<p>School names change from author to author and with the time. These are the five schools, their names and short descriptions. (Descriptions are from <a href="https://www.prismnet.com/~wazmo/papers/four_schools.pdf" class="remarkup-link remarkup-link-ext" rel="noreferrer">Five Schools of Software Testing</a> by <a href="http://www.pettichord.com/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Bret Pettichord</a>.)</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">Analytic / Analytical - sees testing as rigorous and technical with many proponents in academia.</li>
<li class="remarkup-list-item">Standard / Factory - sees testing as a way to measure progress with emphasis on cost and repeatable standards.</li>
<li class="remarkup-list-item">Quality / Quality Assurance / Control - emphasizes process, policing developers and acting as the gatekeeper.</li>
<li class="remarkup-list-item">Context-Driven - emphasizes people, seeking bugs that stakeholders care about.</li>
<li class="remarkup-list-item">Agile / Test-driven - uses testing to prove that development is complete; emphasizes automated testing.</li>
</ul>

<h2 class="remarkup-header">Meetings</h2>

<p>My team name is Quality and Test Engineering. There are about 10 people in it. We are part of a bigger team, Engineering Productivity. There are about 20 people in it. We had two meetings about the topic. First in the smaller team that&#039;s focused on testing. Then in the bigger team. There were about 5-10 people in each meeting. The meeting with the smaller team was in the form of a discussion. The meeting with the bigger team was mostly me talking about the schools. My guess is that people in the smaller team were more familiar with testing and had more opinions and experience with it.</p></div></content></entry><entry><title>Blog Post Writing Club</title><link href="/phame/live/21/post/256/blog_post_writing_club/" /><id>https://phabricator.wikimedia.org/phame/post/view/256/</id><author><name>zeljkofilipin (Željko Filipin)</name></author><published>2021-10-01T17:36:46+00:00</published><updated>2021-10-22T16:43:31+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><h2 class="remarkup-header">Inspiration</h2>

<blockquote><p>Smokers pressure you to light one, drinkers pressure you to drink one, we pressure you to publish one. -- Hrvoje Šimić</p></blockquote>

<p>In August 2020 I&#039;ve read a very interesting article. <a href="https://shime.sh/word-rafting" class="remarkup-link remarkup-link-ext" rel="noreferrer">Word rafting</a> by Hrvoje Šimić. The idea is simple. Create a small club. Agree on the rules. Each member has to publish an article in a time frame. If you don&#039;t publish, you have to leave the club.</p>

<h2 class="remarkup-header">The Club</h2>

<p>I liked the idea. I had a blog since 2005. Sometimes I would publish multiple posts in day. Sometimes there would be months between posts. I wanted to write more. I didn&#039;t think I could publish every week. Publishing every month sounded  more realistic.</p>

<p>I&#039;ve asked around at work and in October 2020 three of us started on the adventure. <a href="https://www.linkedin.com/in/elena-tonkovidova-362b9316/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Elena</a> and <a href="https://www.sohamp.dev/blog/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Soham</a> joined me in this crazy experiment. In the first year, we&#039;ve had members joining and leaving the club. The club never had less than 2 or more than 4 members.</p>

<p><a href="https://tylercipriani.com/blog/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Tyler</a> joined Elena and me in June 2021, completing our current membership.</p>

<h2 class="remarkup-header">Rules</h2>

<p>We&#039;ve made some minor changes to the rules over the last year. These are the current rules.</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">You have to publish 1 blog post a month. (The last day of the month is the deadline.)</li>
<li class="remarkup-list-item">If you do not publish on time, you are kicked out of the club. (You can join the club after 1 month.)</li>
<li class="remarkup-list-item">The club can have a maximum of 5 members at any time.</li>
<li class="remarkup-list-item">All communication happens at invite-only private super-secret Slack group writing-club.</li>
</ul>

<h2 class="remarkup-header">Results</h2>

<p>In the last 12 months, I&#039;ve published between 1 and 5 articles a month, 28 articles in total. That&#039;s a bit over 2 articles a month on average. Exactly what I was looking for. Positive peer pressure to keep me publishing every month.</p>

<p>I was hoping our internal chat will be more busy, with members reviewing each other draft posts. That didn&#039;t happen. At least not yet. I&#039;ve also tried suggesting that every member leaves a public comment for other member&#039;s posts. That didn&#039;t happen too.</p>

<p>I&#039;m hesitant to open the invitation to the club to anybody. I&#039;m not sure how the club would work if we didn&#039;t all know each other. If I know you well, and you&#039;re interested, let me know. The club still is accepting 2 more members.</p></div></content></entry><entry><title> On  Benefits of Team Chores </title><link href="/phame/live/21/post/255/on_benefits_of_team_chores/" /><id>https://phabricator.wikimedia.org/phame/post/view/255/</id><author><name>Etonkovidova (Elena)</name></author><published>2021-10-01T02:35:30+00:00</published><updated>2021-10-04T17:30:47+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><blockquote><p>It has been my philosophy of life that difficulties vanish when faced boldly.<br />
― <strong>Isaac Asimov</strong></p></blockquote>

<p>Since doing household chores is undoubtedly makes a house cleaner and better organized, so doing the team chores have the same effect on a team work.  Creating a list of tasks for important team activities and going through that list regularly  makes handling workload  better,  monitoring for issues  better, and, ultimately, makes the overall quality of delivered products better.  The Growth team has been practicing chores list duties for several months now and  the results seem to be useful,  helpful and even delightful.</p>

<p>It&#039;s all started with the idea of chores the Web team has implemented on <a href="https://www.mediawiki.org/wiki/Reading/Web/Chores" class="remarkup-link remarkup-link-ext" rel="noreferrer">Web team chores page</a>. The page has a list of monitoring/triaging activities that are done every weekday by different team members.  The Growth team has largely adopted the structure of the chores - <a href="https://www.mediawiki.org/wiki/Growth/Team/Chores" class="remarkup-link remarkup-link-ext" rel="noreferrer">Growth Team Chores</a> ( thanks <a href="https://phabricator.wikimedia.org/p/kostajh/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_128"><span class="phui-tag-core phui-tag-color-person">@kostajh</span></a>!) . The <a href="https://www.mediawiki.org/wiki/Growth/Team/Chore_list" class="remarkup-link remarkup-link-ext" rel="noreferrer">Growth Team Chore list</a> page explains details of doing <a href="https://www.mediawiki.org/wiki/Growth/Team/Chores" class="remarkup-link remarkup-link-ext" rel="noreferrer">Growth Team Chores</a>  and provides some guidance and instructions on how to do the chores efficiently.  Both Growth team pages get regular evaluation on how well they reflect the current team&#039;s workflows and priorities, and  whether the chores suit the needs of the current team projects.</p>

<p>Let&#039;s do a quick overview of the format for the chores list. The list of chores is a table that has three groups of chores - monitoring logstash (<strong>Logs</strong>) , triaging incoming phabricator tickets  (<strong>Triage/Tidy</strong>), and looking for potential performance issues (<strong>Performance</strong>). <br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/p7powcwn2pa7hl3qv4u2/PHID-FILE-6dpiixnxnbbk25bbjw6s/Screen_Shot_2021-09-29_at_12.54.39_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_127"><img src="https://phab.wmfusercontent.org/file/data/p7powcwn2pa7hl3qv4u2/PHID-FILE-6dpiixnxnbbk25bbjw6s/Screen_Shot_2021-09-29_at_12.54.39_PM.png" width="500" alt="Screen Shot 2021-09-29 at 12.54.39 PM.png (1×1 px, 218 KB)" /></a></div></p>

<p>Two columns - <strong>Status </strong>and <strong>Last updated</strong> have important information on the state of those sections and when the info has been updated.   The  <strong>Status </strong> icons indicate whether something needs attention or not, and <strong>Last updated</strong> column should have  a signature of  a person who did the chores  and a timestamp</p>

<p><strong>Logs</strong> section has links to the Growth team dashboards.  There are four separate dashboards for server-side errors, client-side errors, and for the event validation errors. The last link is for the Link recommendation service dashboard. Next section - <strong>Triage/Tidy</strong> refers to new phab tasks  that are recently filed or have been moved into <strong>Needs discussion/analysis</strong> column on the Growth team workboard.  And the last section, <strong>Performance</strong>, refers to grafana dashboards.</p>

<p>Going through the chores tasks turned out to be an insightful QA practice.  Doing chores is <strong>useful </strong>. From the QA process point of view, the error reports in logstash might give a good picture on what issues are there and, more importantly,  how they might be (or already are) affecting users. Ideally, each error report should be evaluated for its severity and frequency.  Some errors are severe because they impact user experience or  they may be severe because the number of reports is high.</p>

<p>The practice of going through the chores is  also <strong>helpful</strong> - as a QA, I may see that some features need more testing, or that a different testing approach needs to be designed. Some errors might need to be investigated for user impact, or for how to reproduce it. So, there might be lots of valuable info for modifying testing methods and practices.</p>

<p>And, finally, it&#039;s  really rewarding and even <strong>delightful</strong> to do such chores!  The list of chores adds structure and reduces uncertainty.  It increases the probability  of catching bugs 🕷 sooner rather than later, thus, minimizing bugs&#039;  visibility and their impact. In addition,  there might be bugs that haven&#039;t been caught during feature testing due to specific configuration or other environmental parameters that were difficult (or, sometime, even impossible) to have in a testing environment.</p></div></content></entry><entry><title>macOS vs Ubuntu Linux Part 2</title><link href="/phame/live/21/post/254/macos_vs_ubuntu_linux_part_2/" /><id>https://phabricator.wikimedia.org/phame/post/view/254/</id><author><name>zeljkofilipin (Željko Filipin)</name></author><published>2021-09-24T16:48:18+00:00</published><updated>2022-01-21T17:13:24+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><h2 class="remarkup-header">Introduction</h2>

<p>In <a href="/J241" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_132"><span class="phui-tag-core phui-tag-color-object">Blog Post: macOS vs Ubuntu Linux</span></a> I&#039;ve written about a fun experiment. I&#039;ve dual booted an MacBook Air with macOS and Ubuntu. Then, I ran the same npm scripts on both operating systems. To make things more interesting, I&#039;ve ran the scripts both on the host operating system and inside a Docker container. Running scripts on Ubuntu was so faster, that I wanted to dual boot my iMac too. At the time, I could not dual boot the iMac because my disk refused to be partitioned. In the last couple of weeks, I&#039;ve formatted disks on both machines and did a clean install of both macOS and Ubuntu. It&#039;s time to run the experiment again!</p>

<h2 class="remarkup-header">Machines</h2>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/xy7r2u5bt6dy5aezevph/PHID-FILE-a5wththyumblnlzhnpa4/machines.jpg" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_129"><img src="https://phab.wmfusercontent.org/file/data/iet6adoggz6d26u43auc/PHID-FILE-5sbaiiei3h5bxb4dupnp/preview-machines.jpg" width="220" height="165" alt="machines.jpg (480×640 px, 101 KB)" /></a></div></p>

<p>For reference, here&#039;s the table with the two machines and the Fresh container, with some relevant data.</p>

<div class="remarkup-table-wrap"><table class="remarkup-table">
<tr><td>Machine</td><td>iMac <a href="https://support.apple.com/en-us/HT201634" class="remarkup-link remarkup-link-ext" rel="noreferrer">13,2</a> (27-inch, 2012)</td><td>MacBook Air <a href="https://support.apple.com/en-us/HT201862" class="remarkup-link remarkup-link-ext" rel="noreferrer">6,1</a> (11-inch, 2014)</td><td>Fresh</td></tr>
<tr><td>Processor</td><td>3,2 GHz Quad-Core Intel Core i5</td><td>1,4 GHz Dual-Core Intel Core i5</td><td></td></tr>
<tr><td>RAM (GB)</td><td>16</td><td>4</td><td></td></tr>
<tr><td>macOS</td><td>10.15.7</td><td>11.6</td><td></td></tr>
<tr><td>Linux</td><td>Ubuntu 21.04</td><td>Ubuntu 21.04</td><td>Debian 9 (stretch)</td></tr>
<tr><td>Docker</td><td>20.10.8</td><td>20.10.8</td><td></td></tr>
<tr><td>Docker Compose</td><td>1.29.2</td><td>1.29.2</td><td></td></tr>
<tr><td>Fresh</td><td>21.04.1</td><td>21.04.1</td><td></td></tr>
<tr><td>Node.js</td><td>10.24.1</td><td>10.24.1</td><td>10.15.2</td></tr>
<tr><td>npm</td><td>6.14.12</td><td>6.14.12</td><td>6.14.5</td></tr>
<tr><td>MediaWiki</td><td>1.38.0-alpha</td><td>1.38.0-alpha</td><td></td></tr>
<tr><td>Chrome (macOS)</td><td>94.0.4606.61</td><td>94.0.4606.61</td><td></td></tr>
<tr><td>Chromium (Linux)</td><td>93.0.4577.82</td><td>93.0.4577.82</td><td>73.0.3683.75</td></tr>
<tr></tr>
</table></div>



<h2 class="remarkup-header">Docker</h2>

<p>I&#039;ve left Docker settings at default values. Increasing resources available to Docker might speed things up on MacOS, but that&#039;s a topic for another blog post.</p>

<p>For my reference, here are the default values in Docker <em>Preferences &gt; Resources</em> on macOS.</p>

<div class="remarkup-table-wrap"><table class="remarkup-table">
<tr><td>CPUs</td><td>2</td></tr>
<tr><td>Memory</td><td>2 GB</td></tr>
<tr><td>Swap</td><td>1 GB</td></tr>
<tr><td>Disk image size</td><td>59.6 GB (4.5 GB used)</td></tr>
<tr></tr>
</table></div>



<h2 class="remarkup-header">Running the scripts</h2>

<p>Similar to the previous blog post, I was running two npm scripts. Installing npm dependencies (<tt class="remarkup-monospaced">npm ci</tt>) and running tests (<tt class="remarkup-monospaced">npm run selenium-test</tt>). I&#039;ve used <a href="https://gerrit.wikimedia.org/g/mediawiki/core" class="remarkup-link remarkup-link-ext" rel="noreferrer">MediaWiki Core</a> repository (<tt class="remarkup-monospaced">npm ci</tt>) and it&#039;s Selenium test suite (<tt class="remarkup-monospaced">npm run selenium-test</tt>). The suite is targeting a local MediaWiki site. The site is running in a local Docker container via <a href="https://www.mediawiki.org/wiki/MediaWiki-Docker" class="remarkup-link remarkup-link-ext" rel="noreferrer">MediaWiki-Docker</a>.</p>

<p>I was not only interested in how fast it is to run the scripts from the operating system (macOS or Linux). I also wanted to know how much time it takes to run the scripts from a Fresh container. (<a href="https://gerrit.wikimedia.org/g/fresh" class="remarkup-link remarkup-link-ext" rel="noreferrer">Fresh</a> is *&quot;a fast and ready-to-use Docker container with various developer tools pre-installed.&quot;*)</p>

<p>To make things as fair as possible, both machines were using the same wifi and were the same distance from the router. <tt class="remarkup-monospaced">npm run selenium-test</tt> was running in headless mode.</p>

<h2 class="remarkup-header">Data</h2>

<p>I&#039;ve tried to keep the environments as simple as possible. When running the commands, only the Terminal application was open. I wasn&#039;t interested in very good data. I just wanted good enough data for my use case. For that reason, I&#039;ve only run each command three times. That&#039;s just enough data to show any trends, but not so much that I&#039;ll get bored while waiting for them to finish. All results are in how much time (in minutes and seconds) each command took in different environments.</p>

<p>I made a mistake in the previous blog post on this topic by including all the data in the post. That&#039;s too much data. This time, I&#039;ll include only averages.</p>

<div class="remarkup-table-wrap"><table class="remarkup-table">
<tr><td>Environment</td><td>npm ci (m:s)</td><td>npm run selenium-test (m:s)</td></tr>
<tr><td>iMac + Ubuntu</td><td>0:12</td><td>0:15</td></tr>
<tr><td>iMac + Ubuntu + Fresh</td><td>0:14</td><td>0:19</td></tr>
<tr><td>iMac + macOS</td><td>0:20</td><td>0:22</td></tr>
<tr><td>iMac + macOS + Fresh</td><td>2:25</td><td>1:02</td></tr>
<tr><td>Air + Ubuntu</td><td>0:13</td><td>0:17</td></tr>
<tr><td>Air + Ubuntu + Fresh</td><td>0:19</td><td>0:23</td></tr>
<tr><td>Air + macOS</td><td>0:36</td><td>0:47</td></tr>
<tr><td>Air + macOS + Fresh</td><td>4:04</td><td>1:54</td></tr>
<tr></tr>
</table></div>

<p>Chart by environment.</p>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/ohl2qosimk4zjxrlkklv/PHID-FILE-fq2fw7ovsnu6gc5hrqoz/environment.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_130"><img src="https://phab.wmfusercontent.org/file/data/al4z66jcxefxf5422aqq/PHID-FILE-won5fly4jn2logktk267/preview-environment.png" width="220" height="136.03333333333" alt="environment.png (371×600 px, 11 KB)" /></a></div></p>

<p>Chart by script.</p>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/iptofb4k7sp7rhqqa5jj/PHID-FILE-hcdybbl52ilcop5lqcvj/script.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_131"><img src="https://phab.wmfusercontent.org/file/data/nshamcyg6q7i2sgvgicl/PHID-FILE-bj2a352qen6kln3njrfd/preview-script.png" width="220" height="136.03333333333" alt="script.png (371×600 px, 16 KB)" /></a></div></p>

<h2 class="remarkup-header">Conclusion</h2>

<p>As expected, running both scripts is much faster on Linux. Running the scripts is much slower on macOS+Fresh combination. The tiny laptop is running great on Linux!</p></div></content></entry><entry><title>Google Summer of Code 2021</title><link href="/phame/live/21/post/252/google_summer_of_code_2021/" /><id>https://phabricator.wikimedia.org/phame/post/view/252/</id><author><name>zeljkofilipin (Željko Filipin)</name></author><published>2021-08-31T15:07:32+00:00</published><updated>2021-12-31T11:50:30+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Today is the last day of <a href="https://www.mediawiki.org/wiki/Google_Summer_of_Code/2021" class="remarkup-link remarkup-link-ext" rel="noreferrer">Google Summer of Code 2021</a>. <a href="https://www.vidhimody.me/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Vidhi Mody</a> and <a href="https://www.sohamp.dev/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Soham Parekh</a> were mentoring <a href="https://sahilgrewalhere2001.medium.com/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Sahil Grewal</a> on updating <a href="https://phabricator.wikimedia.org/T274579" class="remarkup-link" rel="noreferrer">WebdriverIO to version 7</a> in Wikimedia repositories.</p>

<p>For me, this was the easiest internship that I was involved so far. Mostly because I was not an official mentor this time. I was just helping Vidhi and Soham.</p>

<p>To gather ideas for this post, I was reading my other posts about mentoring. Looks like even back in <a href="https://phabricator.wikimedia.org/outreach-program-for-women" class="remarkup-link" rel="noreferrer">2013</a> I&#039;ve learned the lesson that there should be two mentors per intern. We&#039;ve had situations where a mentor can&#039;t work for weeks because of health reasons. Also, the internship is over the summer and (at least in Europe) it&#039;s common for people to take a few weeks of vacation. So, two mentors is highly recommended.</p>

<p>This time I got the fun part of the internship. I didn&#039;t need to do any paperwork, like preparing for the internship and evaluating the student. I was mostly reviewing code and pair programming. I like both of those activities, so the internship was a lot of fun for me.</p>

<p>My plan was to take a break from mentoring for a while, but I have a good idea for an internship project and the next round of <a href="https://www.outreachy.org/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Outreachy</a> internship is soon...</p></div></content></entry><entry><title>The Phoenix project book: reflections and thoughts</title><link href="/phame/live/21/post/251/the_phoenix_project_book_reflections_and_thoughts/" /><id>https://phabricator.wikimedia.org/phame/post/view/251/</id><author><name>Etonkovidova (Elena)</name></author><published>2021-09-01T02:38:15+00:00</published><updated>2021-09-02T12:55:29+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><blockquote><p>The phoenix is a long-lived, immortal bird associated with Greek mythology (with analogs in many cultures) that cyclically regenerates or is otherwise born again. <br />
<a href="https://en.wikipedia.org/wiki/Phoenix_(mythology)" class="remarkup-link remarkup-link-ext" rel="noreferrer">Phoenix (mythology) - Wikipedia</a></p></blockquote>

<p>When I decided to read <a href="https://www.goodreads.com/book/show/17255186-the-phoenix-project" class="remarkup-link remarkup-link-ext" rel="noreferrer">The Phoenix Project: A Novel About IT, DevOps, and Helping Your Business Win</a> ( <em>The Phoenix Project </em>), I never thought that it&#039;d be a quite reading journey. The book makes its impact, sure, but, at the same time, it marvelously  manages to give you a whole range of completely opposite emotions: it motivates and discourages, it provides some valuable insights (and &quot;aha!&quot; moments) and, on a next page,  makes you cringe from the triviality of solutions that described as magic.</p>

<p>Three aspects of the book definitely impressed me:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">unbeatable humor</li>
<li class="remarkup-list-item">great illustration of what impact misplaced office politics and irrelevant management ambitions might have on overall motivation and effectiveness of work</li>
<li class="remarkup-list-item">insightful overview of optimizing daily work processes (Four categories of work and Three Ways etc),</li>
</ul>

<p>Let&#039;s start with the humor in the book which is really a great part of <em>The Phoenix Project </em>&#039;s impact . The description of ever-changing CIOs, for example:</p>

<blockquote><p>For the last decade, like clockwork, new CIOs would come and go every two years. They stay just long enough <br />
to understand the acronyms, learn where the bathrooms are, implement a bunch of programs and initiatives to upset the apple cart, and then they’re gone.<br />
 CIO stands for “Career Is Over.” And VPs of IT Operations don’t last much longer</p></blockquote>

<p>Or viewing developers as a threat to a would-be-otherwise-smooth work of  an impeccable devops team:</p>

<blockquote><p>The only thing more dangerous than a developer is a developer conspiring with Security. The two working together gives us means, motive, and opportunity.</p></blockquote>

<p>Or how a devops team describes pesky disruptions:</p>

<blockquote><p>They [Security] are always coming up with a million reasons why anything we do will create a security hole that alien space-hackers will exploit to pillage our entire organization and steal all  our code, intellectual property, credit card numbers, and pictures of our loved ones.</p></blockquote>

<p>The description of how releases are run is definitely sounds as a thriller:</p>

<blockquote><p>One of the developers had actually walked in a couple of minutes ago and said, “Look, it’s running on my laptop. How hard can it be?” Wes started swearing, while two of our engineers and three of William’s engineers started poring through the developer’s laptop, trying to figure out what made it different from the test environment.</p></blockquote>

<p>And this one as an unforgettable grand finale of a night when important deployment was happening:</p>

<blockquote><p>In the corner, a developer is asleep under some chairs. It’s been a night of heroics.</p></blockquote>

<p>In a sense, it&#039;s a dark humor.  As the readers we observe the neverending chaos and the helplessness of otherwise capable and smart people. People who are dragged into a doomed whirlpool of work that has random deadlines and no structured processes, when no one is assigned a clear responsibility for the product and only could have a glimpse of understanding of how the results would be achieved.</p>

<p>What causes that stressful environment? The management? The curious thing about <em>The Phoenix Project </em>&#039;s  management in  is that they obviously must have a great stamina to survive and cope with the everpresent hellish level of stress. Unsurprisingly,  two (at least) main characters in the book - Steve Masters (the CEO) and Bill Palmer (the narrator and the VP of IT) both have that. They are former Marines. Quite  often they reflect on their Marines  experience to see if it&#039;s applicable to constantly unfolding crises around them  (a spoiler: such experience was not relevant):</p>

<blockquote><p>Each year, it gets harder. We have to do more with less, to simultaneously maintain competitiveness and reduce costs. Some days, I think that it can’t be done. Maybe I spent too much time as a sergeant in the Marines. You &gt;learn that you argue your case as best as you can with your officer, but sometimes you have to say, “Yes, sir,” and then go take that hill.</p></blockquote>

<p>Bill Palmer, described as &quot;dependable, pragmatic, and willing to say what [he] really thinks&quot;,  makes this logical conclusion:</p>

<blockquote><p>I’ve figured out that the trick to a long career in IT Operations management is to get enough seniority to get good things done but to keep your head low enough to avoid the political battles that make you inherently vulnerable.</p></blockquote>

<p>How such management views get translated into daily workflows, product and operations planning, into seeking feedback and getting everyone motivated?  The following summarizes it all:</p>

<blockquote><p>They [the management] are so freaked out about hitting their deadlines, they’re only now starting to think about how to test and deploy it.</p></blockquote>

<p>One noticeable thing in the book - a QA team (and QA work) is mentioned only vaguely, like an unnecessary (and almost decorative) stage of a product development. Not recognizing the value of QA processes makes any product development unpredictable and stressful.</p>

<p>However, the most important part of <em>The Phoenix Project </em> is about finding ways to bring an order into the vicious circle of persistent crises and failures. As the phoenix who starts its new life after destruction, the  teams in  <em>The Phoenix Project </em> struggle to see what needs to be done to emerge from unpredictability and frustration with strength and clear vision.  Here comes <em>deus ex machina</em>, Erik Reid, a board member, who has almost supernatural knowledge of how engineering processes should be organized. He guides Bill Palmer, by showing him the similarities between manufacturing plant processes and software development work and deriving from that analogy several valuable concepts. These concepts are presented with catchy titles  - the Three Ways, the Four types of work, the Three Acts of Downward spiral, Seven major types of Non-value Adding items (aka &quot;waste&quot; in the manufacturing world).  Even though it is a well-known trick to keep readers&#039; attention, that gives a good structure and, hence, makes it easier to remember.</p>

<p>One of the main concepts  - the Three Ways. The following description (taken from <a href="https://levelup.gitconnected.com/book-summary-the-phoenix-project-42ebf68addbd" class="remarkup-link remarkup-link-ext" rel="noreferrer">Book Summary: The Phoenix Project</a>):</p>

<ul class="remarkup-list">
<li class="remarkup-list-item"><strong>The First Way</strong> — Continuously find and implement ways to improve delivery. This is synonymous with the - concept of Kaizen.</li>
<li class="remarkup-list-item"><strong>The Second Way</strong> — Get fast feedback and work from strong failure signals to ever-weaker failure signals to get advance warning of quality issues.</li>
<li class="remarkup-list-item"><strong>The Third Way </strong>— Use the efficiencies gained in <strong>The First Way</strong> and the safety enforced by <strong>The Second Way</strong> to introduce rapid experiments that help create qualitative gains.</li>
</ul>

<p>Although those principles are hardly new,  they would, indeed, have a tremendous impact on the productivity. Proposing &quot;short and quick cycle times to integrate feedback&quot;, &quot;reducing batch size, enabling fast feature flow&quot; are key ingredients for success.</p>

<p>And the last important aspect of any efficient system - the allocating time for knowledge transfer.  <em>The Phoenix Project </em> provides several examples of when the commitment to document procedures  (and constantly updating it) would pay off:</p>

<blockquote><p>[...] help convert individual expertise into artifacts that the rest of organization can use.</p></blockquote>

<p>Was it worth reading the book? Undoubtedly, yes. <em>The Phoenix Project </em> shows what would happen when the processes are not in place, when they are disjointed or incorrectly implemented. The great tsunami of unplanned work (stalled deployments, bugs in production, not diligent maintenance etc) would encroach, inevitably destructing any islands of good work. To avoid the dangers of unplanned work,  as one of my favorite quotes emphasizes, there should be a never ending  search for improvement:</p>

<blockquote><p>[it] is almost doesn&#039;t matter what you improve as long as you improve something. Why? Because if you are not improving, entropy guarantees that you are actually getting worse.</p></blockquote></div></content></entry><entry><title>QA Support for Deployment Train </title><link href="/phame/live/21/post/250/qa_support_for_deployment_train/" /><id>https://phabricator.wikimedia.org/phame/post/view/250/</id><author><name>Etonkovidova (Elena)</name></author><published>2021-08-01T02:55:07+00:00</published><updated>2021-08-20T12:11:30+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>The <a href="https://wikitech.wikimedia.org/wiki/Deployments" class="remarkup-link remarkup-link-ext" rel="noreferrer">Deployments page</a> sets the working framework for QA  workflow when it comes to deployment. Although the details and the level of QA work might be different from team to team depending on a specific team&#039;s workflow, specific projects and,  even, specific phases of a project, the below is an outline of what seems to be, in a sense,  typical QA activities for  a weekly deploy cadence.</p>

<h5 class="remarkup-header">Beta cluster - the start</h5>

<p>A patch&#039;s journey to production starts with beta cluster (see more details on what beta cluster is <a href="https://www.mediawiki.org/wiki/Beta_Cluster" class="remarkup-link remarkup-link-ext" rel="noreferrer">here</a>. For an example of patch lifecycle (simplified, of course), let&#039;s take a look at the following patch -  <a href="https://gerrit.wikimedia.org/r/c/mediawiki/extensions/GrowthExperiments/+/708602/" class="remarkup-link remarkup-link-ext" rel="noreferrer">GrowthExperiments patch</a> (and the corresponding phab task is <a href="https://phabricator.wikimedia.org/T287636" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_141"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T287636</span></span></a>).<br />
On the high level, the sequence of events that move any patch to be deployed to production is the following:<br />
<span class="remarkup-nav-sequence"><span class="phui-tag-view phui-tag-type-shade phui-tag-grey phui-tag-shade phui-tag-icon-view "><span class="phui-tag-core "><span class="visual-only phui-icon-view phui-font-fa fa-home" data-meta="0_0" aria-hidden="true"></span>patch is not merged</span></span><span class="remarkup-nav-sequence-arrow"> → </span><span class="phui-tag-view phui-tag-type-shade phui-tag-grey phui-tag-shade "><span class="phui-tag-core ">patch is merged</span></span><span class="remarkup-nav-sequence-arrow"> → </span><span class="phui-tag-view phui-tag-type-shade phui-tag-grey phui-tag-shade phui-tag-icon-view "><span class="phui-tag-core "><span class="visual-only phui-icon-view phui-font-fa fa-cog" data-meta="0_1" aria-hidden="true"></span>patch is deployed to production</span></span></span></p>

<p>Some details on the steps:<br />
(1) <span class="remarkup-nav-sequence"><span class="phui-tag-view phui-tag-type-shade phui-tag-grey phui-tag-shade phui-tag-icon-view "><span class="phui-tag-core "><span class="visual-only phui-icon-view phui-font-fa fa-home" data-meta="0_2" aria-hidden="true"></span>patch is not merged</span></span></span>The first screenshot shows that there is no word &quot;merged&quot;. It means that the patch cannot be tested in betalabs yet. The options to test a patch are to set up your local environment and checkout a patch or use <a href="https://patchdemo.wmflabs.org/" class="remarkup-link remarkup-link-ext" rel="noreferrer">patch demo</a>.<br />
(2) <span class="remarkup-nav-sequence"><span class="phui-tag-view phui-tag-type-shade phui-tag-grey phui-tag-shade "><span class="phui-tag-core ">patch is merged</span></span></span> Now the patch is merged - the word &quot;merged&quot; is present on a phab task section.   At this point (or some time after) the related phab task may display the production version to which the patch would be deployed. The gerrit link shows that the patch was &quot;included&quot; (merged) to &quot;master&quot;, i.e.  a fix or a feature is now on the beta cluster and can be checked there.<br />
(3) <span class="remarkup-nav-sequence"><span class="phui-tag-view phui-tag-type-shade phui-tag-grey phui-tag-shade phui-tag-icon-view "><span class="phui-tag-core "><span class="visual-only phui-icon-view phui-font-fa fa-cog" data-meta="0_3" aria-hidden="true"></span>patch is deployed to production</span></span></span> Finally,  a patch is deployed to production -  fixes or features can be checked on the production version (the tag shows the exact version). And for this specific example, it shows that the patch was &quot;cherry-picked&quot;, i.e. it was deployed during one of the Backport windows</p>

<div class="remarkup-table-wrap"><table class="remarkup-table">
<tr><th>Betalabs</th><th>Betalabs</th><th>Production</th></tr>
<tr><td>(1) <span class="remarkup-nav-sequence"><span class="phui-tag-view phui-tag-type-shade phui-tag-grey phui-tag-shade phui-tag-icon-view "><span class="phui-tag-core "><span class="visual-only phui-icon-view phui-font-fa fa-home" data-meta="0_4" aria-hidden="true"></span>patch is not merged</span></span></span>  <div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/xihzl6ntfko2l5s5cum3/PHID-FILE-7sqcqrowgn2rlpbgj2fh/Screen_Shot_2021-07-31_at_8.59.17_AM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_133"><img src="https://phab.wmfusercontent.org/file/data/um5zamnliyw3rkfe3sre/PHID-FILE-yrfb4huwgaonlzcfx4tb/preview-Screen_Shot_2021-07-31_at_8.59.17_AM.png" width="220" height="55" alt="Screen Shot 2021-07-31 at 8.59.17 AM.png (464×2 px, 105 KB)" /></a></div></td><td>(2) <span class="remarkup-nav-sequence"><span class="phui-tag-view phui-tag-type-shade phui-tag-grey phui-tag-shade "><span class="phui-tag-core ">patch is merged</span></span></span> <div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/uqk4rs2rkxpw6t3sckum/PHID-FILE-cwed3lexanna34r234yn/Screen_Shot_2021-07-31_at_1.53.58_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_134"><img src="https://phab.wmfusercontent.org/file/data/hc3hnzvavllnh7jdsgvx/PHID-FILE-2sagpmgyhuzvcfuxgutp/preview-Screen_Shot_2021-07-31_at_1.53.58_PM.png" width="220" height="55" alt="Screen Shot 2021-07-31 at 1.53.58 PM.png (426×2 px, 94 KB)" /></a></div><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/fhgty5vyllvmev4qn7oi/PHID-FILE-csf7qychagqymiyeebib/Screen_Shot_2021-07-31_at_9.00.07_AM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_135"><img src="https://phab.wmfusercontent.org/file/data/wd5cc75ouxnixqxcdam4/PHID-FILE-tginyl6ncptlgeguhi3j/preview-Screen_Shot_2021-07-31_at_9.00.07_AM.png" width="220" height="81.61523309258" alt="Screen Shot 2021-07-31 at 9.00.07 AM.png (1×3 px, 414 KB)" /></a></div> <div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/tmwyirhcekidag3egxfs/PHID-FILE-c5hvf3tdnv6jw6gfrer3/Screen_Shot_2021-07-31_at_2.28.54_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_136"><img src="https://phab.wmfusercontent.org/file/data/56effq3kdwerrqmn4i7s/PHID-FILE-t5nrsxshzjtgsdjlcnav/preview-Screen_Shot_2021-07-31_at_2.28.54_PM.png" width="220" height="59.111424541608" alt="Screen Shot 2021-07-31 at 2.28.54 PM.png (762×2 px, 270 KB)" /></a></div></td><td>(3) <span class="remarkup-nav-sequence"><span class="phui-tag-view phui-tag-type-shade phui-tag-grey phui-tag-shade phui-tag-icon-view "><span class="phui-tag-core "><span class="visual-only phui-icon-view phui-font-fa fa-cog" data-meta="0_5" aria-hidden="true"></span>patch is deployed to production</span></span></span> <div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/4566shcdzz7ekwoeiwel/PHID-FILE-dmgzwfrzvcnm5jwo3n27/Screen_Shot_2021-07-31_at_8.59.41_AM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_137"><img src="https://phab.wmfusercontent.org/file/data/pvpsxi3hh35kvxleh3he/PHID-FILE-y57xj6luwzuyam2ikuva/preview-Screen_Shot_2021-07-31_at_8.59.41_AM.png" width="220" height="75.56142668428" alt="Screen Shot 2021-07-31 at 8.59.41 AM.png (1×3 px, 465 KB)" /></a></div></td></tr>
<tr></tr>
</table></div>

<p>There might be times when it&#039;s useful to see all patches that would be (or were) deployed. Adding deployment and project tag(s) to <a href="https://phabricator.wikimedia.org/maniphest/query/advanced/" class="remarkup-link" rel="noreferrer">Phabricator Advanced Search</a>  form would display all phab tasks that have patches associated with those tags.<br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/vmcpe5mx2vxbklf4heao/PHID-FILE-l4egbn3g4xfe6qngqfdw/Screen_Shot_2021-07-31_at_3.19.58_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_138"><img src="https://phab.wmfusercontent.org/file/data/vmcpe5mx2vxbklf4heao/PHID-FILE-l4egbn3g4xfe6qngqfdw/Screen_Shot_2021-07-31_at_3.19.58_PM.png" width="400" alt="Screen Shot 2021-07-31 at 3.19.58 PM.png (611×1 px, 140 KB)" /></a></div><br />
Another option is to filter gerrit for a production version and an extension, e.g. <a href="https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/GrowthExperiments/+log/refs/heads/wmf/1.37.0-wmf.16/?s=b256b9b9acd0fb879fbd7d3cdd655a48df9a3597" class="remarkup-link remarkup-link-ext" rel="noreferrer">GrowthExperiment patches for wmf.16</a>. <br />
One more note on testing in betalabs  - there is a cutoff time before production deployment. In many cases it&#039;s worth to check features and bug fixes after the cutoff time to ensure that the deployment to production won&#039;t bring surprises.</p>

<h5 class="remarkup-header">Deployment cadence</h5>

<p>The weekly deployment cadence, i.e. the weekly deployment schedule (see <a href="https://wikitech.wikimedia.org/wiki/Deployments" class="remarkup-link remarkup-link-ext" rel="noreferrer">Deployments</a>),  presents detailed information on what and when would be deployed. The schedule lists the times for the deployment train events and backport windows: <br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/dq6skqt47itkfoc6ideq/PHID-FILE-buvxh7v273mpwh2tctcf/Screen_Shot_2021-07-31_at_2.58.39_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_139"><img src="https://phab.wmfusercontent.org/file/data/dq6skqt47itkfoc6ideq/PHID-FILE-buvxh7v273mpwh2tctcf/Screen_Shot_2021-07-31_at_2.58.39_PM.png" width="500" alt="Screen Shot 2021-07-31 at 2.58.39 PM.png (1×2 px, 342 KB)" /></a></div><br />
The first of the two links that are marked  &quot;Imported links&quot; on the screenshot above points to the list of all patches (grouped by extensions) included in <a href="https://www.mediawiki.org/wiki/MediaWiki_1.37/wmf.17" class="remarkup-link remarkup-link-ext" rel="noreferrer">MediaWiki 1.37/wmf.17</a>. The second  link points to the phab task <a href="https://phabricator.wikimedia.org/T281158" class="remarkup-link" rel="noreferrer">Blockers: task T281158</a> where the issues blocking the deployment train would be reported. Another helpful page to see the deployments updates  is <a href="https://versions.toolforge.org" class="remarkup-link remarkup-link-ext" rel="noreferrer">Wikimedia MediaWiki versions</a>. The screenshot below shows that right now all groups have <tt class="remarkup-monospaced">wmf.16</tt> version: <br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/rtwpax6qyg5lbuy5swyv/PHID-FILE-tmyr44nyz2p44danc4w7/Screen_Shot_2021-07-31_at_4.29.27_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_140"><img src="https://phab.wmfusercontent.org/file/data/rtwpax6qyg5lbuy5swyv/PHID-FILE-tmyr44nyz2p44danc4w7/Screen_Shot_2021-07-31_at_4.29.27_PM.png" width="450" alt="Screen Shot 2021-07-31 at 4.29.27 PM.png (1×3 px, 420 KB)" /></a></div><br />
Based on the above, my own QA deployment schedule would look like this:</p>

<div class="remarkup-table-wrap"><table class="remarkup-table">
<tr><td><span class="remarkup-highlight"><strong>Monday</strong></span> - <strong>Checking betalabs </strong></td><td><span class="remarkup-highlight"><strong>Tuesday</strong></span> - <strong>group 0</strong> Checking <strong>testwiki </strong></td><td><span class="remarkup-highlight"><strong>Wednesday</strong></span> - <strong>group 1</strong> Checking specific wikis - <strong>Commons</strong>, <strong>Hebrew</strong>, <strong>Catalan</strong></td><td><span class="remarkup-highlight"><strong>Thursday</strong></span> -  <strong>group 2</strong> Checking what needs to be checked</td></tr>
<tr><td></td><td>Monitor logstash (<em>see the note below</em>)</td><td>Monitor logstash (<em>see the note below</em>)</td><td>Monitor logstash (<em>see the note below</em>)</td></tr>
<tr></tr>
</table></div>



<blockquote><p>Note: <strong>Monitor logstash</strong> Growth team has a workflow - <a href="https://www.mediawiki.org/wiki/Growth/Team/Chores" class="remarkup-link remarkup-link-ext" rel="noreferrer">Growth Team chores</a>.  If one of the deployment days is my chore day, then on that day I&#039;ll do more thorough monitoring of logstash (and other activities).</p></blockquote>

<p><strong>Monday</strong> - Checking <strong>betalabs </strong></p>

<ul class="remarkup-list">
<li class="remarkup-list-item">check after a cutoff time (if needed).</li>
<li class="remarkup-list-item">watch for regression and review new features/fixes that  will be deployed to <a href="https://test.wikipedia.org/wiki/Main_Page" class="remarkup-link remarkup-link-ext" rel="noreferrer">testwiki</a></li>
<li class="remarkup-list-item">check that all  features/fixes that are planned for deployment are included in the train (the phabricator tag is in place)</li>
</ul>

<p><strong>Tuesday</strong> - <strong>group 0</strong>. Checking <strong>testwiki </strong> <br />
Why is it important to test testwiki?</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">the obvious: it&#039;s the first point for production deployment; good to check for feature deployments and for any regression issues</li>
<li class="remarkup-list-item">more user rights can be assigned to my test users than on usual wikis</li>
<li class="remarkup-list-item">I can create/modify content on testwiki  without impact on actual users.</li>
<li class="remarkup-list-item">sometimes features get deployed to testwiki a week or more before being deployed to actual wikis to give more time for production-like testing or getting feedback from ambassadors|</li>
</ul>

<p><strong>Wednesday</strong> - <strong>group 1</strong>. Check specific wikis - <strong>Commons</strong>, <strong>Hebrew</strong>, <strong>Catalan</strong>  <br />
 The testing on <strong>group 1</strong> wikis is limited.  I check:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item"><strong>Commons</strong> - I work with Structured Data team and checking in production is a vital part of their team workflow.</li>
<li class="remarkup-list-item"><strong> Catalan</strong>  wikipedia - because it has Flow features.</li>
<li class="remarkup-list-item"><strong>Hebrew</strong> wikipedia  - for two reasons: 1) it is the first of RTL (right-to-left language) wikipedias to be deployed and 2) it has Growth Experiments  features deployed on it.</li>
</ul>

<p><strong>Thursday - group 2</strong>.  All remaining wikipedias are deployed. Check whatever needs to be checked.</p>

<p>Each team  (and QA, of course) should evaluate the risks of deploying features and implement specific monitoring measures. The issues found in production fall into the category of &quot;unplanned  work&quot;, as it was dramatically defined in <a href="https://www.goodreads.com/book/show/17255186-the-phoenix-project" class="remarkup-link remarkup-link-ext" rel="noreferrer">The Phoenix Project: A Novel About IT, DevOps, and Helping Your Business Win</a>  (<em>by  Gene Kim etc)</em> :</p>

<blockquote><p>Like matter and antimatter, in the presence of unplanned work, all planned work ignites with incandescent fury, incinerating everything around it. [...]<br />
Unlike the other categories of work, unplanned work is recovery work, which almost always takes you away from <br />
your goals. That’s why it’s so important to know where your unplanned work is coming from.</p></blockquote>

<p>Having good QA processes on <strong>planned work</strong> (feature testing, regression testing, and testing in production), the scorching effects of <strong>unplanned work</strong>, i.e. finding bugs late in production, will be kept to a minimum.</p>

<p>Happy testing!</p></div></content></entry><entry><title>Page object pattern</title><link href="/phame/live/21/post/246/page_object_pattern/" /><id>https://phabricator.wikimedia.org/phame/post/view/246/</id><author><name>zeljkofilipin (Željko Filipin)</name></author><published>2021-06-30T15:42:01+00:00</published><updated>2021-06-30T20:17:12+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>There are two main purposes of the page object pattern.</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">Move parts of the application that change a lot (user interface) to a central location. When the user interface changes, the test suite only needs to be updated in one place.</li>
<li class="remarkup-list-item">Make tests easier to read and understand by moving complexity to page objects.</li>
</ul>

<p>Let&#039;s describe the two purposes with code samples from MediaWiki Core (as of June 2021).</p>

<h3 class="remarkup-header">With page object pattern</h3>

<p>The code is split into two files. <tt class="remarkup-monospaced">user.js</tt> contains the test. <tt class="remarkup-monospaced">createaccount.page.js </tt>contains the page object. Code is available at <a href="https://gerrit.wikimedia.org/r/c/mediawiki/core/+/702327/" class="remarkup-link remarkup-link-ext" rel="noreferrer">702327</a>.</p>

<p>Please notice how readable <tt class="remarkup-monospaced">user.js</tt> is. You can immediately see that the point of <tt class="remarkup-monospaced">User should be able to create account</tt> is to create an user account with <tt class="remarkup-monospaced">username</tt> and <tt class="remarkup-monospaced">password</tt> as arguments.</p>

<p><a href="https://gerrit.wikimedia.org/g/mediawiki/core/%2B/refs/heads/master/tests/selenium/specs/user.js" class="remarkup-link remarkup-link-ext" rel="noreferrer">tests/selenium/specs/user.js</a></p>

<div class="remarkup-code-block" data-code-lang="js" data-sigil="remarkup-code-block"><pre class="remarkup-code"><span></span><span class="s1">&#39;use strict&#39;</span><span class="p">;</span>

<span class="kr">const</span> <span class="nx">assert</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span> <span class="s1">&#39;assert&#39;</span> <span class="p">);</span>
<span class="kr">const</span> <span class="nx">CreateAccountPage</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span> <span class="s1">&#39;../pageobjects/createaccount.page&#39;</span> <span class="p">);</span>
<span class="kr">const</span> <span class="nx">Util</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span> <span class="s1">&#39;wdio-mediawiki/Util&#39;</span> <span class="p">);</span>

<span class="nx">describe</span><span class="p">(</span> <span class="s1">&#39;User&#39;</span><span class="p">,</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
	<span class="nx">it</span><span class="p">(</span> <span class="s1">&#39;should be able to create account&#39;</span><span class="p">,</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
		<span class="kr">const</span> <span class="nx">username</span> <span class="o">=</span> <span class="nx">Util</span><span class="p">.</span><span class="nx">getTestString</span><span class="p">(</span> <span class="s1">&#39;User-&#39;</span> <span class="p">);</span>
		<span class="kr">const</span> <span class="nx">password</span> <span class="o">=</span> <span class="nx">Util</span><span class="p">.</span><span class="nx">getTestString</span><span class="p">();</span>

		<span class="nx">CreateAccountPage</span><span class="p">.</span><span class="nx">createAccount</span><span class="p">(</span> <span class="nx">username</span><span class="p">,</span> <span class="nx">password</span> <span class="p">);</span>

		<span class="nx">assert</span><span class="p">.</span><span class="nx">strictEqual</span><span class="p">(</span> <span class="nx">CreateAccountPage</span><span class="p">.</span><span class="nx">heading</span><span class="p">.</span><span class="nx">getText</span><span class="p">(),</span> <span class="sb">`Welcome, </span><span class="si">${</span><span class="nx">username</span><span class="si">}</span><span class="sb">!`</span> <span class="p">);</span>
	<span class="p">}</span> <span class="p">);</span>
<span class="p">}</span> <span class="p">);</span></pre></div>

<p>Please notice that <tt class="remarkup-monospaced">createaccount.page.js</tt> has two major sections. In the first section are elements on the page (<tt class="remarkup-monospaced">username()</tt>...). The second section contains actions (<tt class="remarkup-monospaced">createAccount()</tt>...).</p>

<p><a href="https://gerrit.wikimedia.org/g/mediawiki/core/%2B/refs/heads/master/tests/selenium/pageobjects/createaccount.page.js" class="remarkup-link remarkup-link-ext" rel="noreferrer">tests/selenium/pageobjects/createaccount.page.js</a></p>

<div class="remarkup-code-block" data-code-lang="js" data-sigil="remarkup-code-block"><pre class="remarkup-code"><span></span><span class="s1">&#39;use strict&#39;</span><span class="p">;</span>

<span class="kr">const</span> <span class="nx">Page</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span> <span class="s1">&#39;wdio-mediawiki/Page&#39;</span> <span class="p">);</span>

<span class="kr">class</span> <span class="nx">CreateAccountPage</span> <span class="kr">extends</span> <span class="nx">Page</span> <span class="p">{</span>
	<span class="nx">get</span> <span class="nx">username</span><span class="p">()</span> <span class="p">{</span> <span class="k">return</span> <span class="nx">$</span><span class="p">(</span> <span class="s1">&#39;#wpName2&#39;</span> <span class="p">);</span> <span class="p">}</span>
	<span class="nx">get</span> <span class="nx">password</span><span class="p">()</span> <span class="p">{</span> <span class="k">return</span> <span class="nx">$</span><span class="p">(</span> <span class="s1">&#39;#wpPassword2&#39;</span> <span class="p">);</span> <span class="p">}</span>
	<span class="nx">get</span> <span class="nx">confirmPassword</span><span class="p">()</span> <span class="p">{</span> <span class="k">return</span> <span class="nx">$</span><span class="p">(</span> <span class="s1">&#39;#wpRetype&#39;</span> <span class="p">);</span> <span class="p">}</span>
	<span class="nx">get</span> <span class="nx">create</span><span class="p">()</span> <span class="p">{</span> <span class="k">return</span> <span class="nx">$</span><span class="p">(</span> <span class="s1">&#39;#wpCreateaccount&#39;</span> <span class="p">);</span> <span class="p">}</span>
	<span class="nx">get</span> <span class="nx">heading</span><span class="p">()</span> <span class="p">{</span> <span class="k">return</span> <span class="nx">$</span><span class="p">(</span> <span class="s1">&#39;#firstHeading&#39;</span> <span class="p">);</span> <span class="p">}</span>

	<span class="nx">open</span><span class="p">()</span> <span class="p">{</span>
		<span class="kr">super</span><span class="p">.</span><span class="nx">openTitle</span><span class="p">(</span> <span class="s1">&#39;Special:CreateAccount&#39;</span> <span class="p">);</span>
	<span class="p">}</span>

	<span class="nx">createAccount</span><span class="p">(</span> <span class="nx">username</span><span class="p">,</span> <span class="nx">password</span> <span class="p">)</span> <span class="p">{</span>
		<span class="k">this</span><span class="p">.</span><span class="nx">open</span><span class="p">();</span>
		<span class="k">this</span><span class="p">.</span><span class="nx">username</span><span class="p">.</span><span class="nx">setValue</span><span class="p">(</span> <span class="nx">username</span> <span class="p">);</span>
		<span class="k">this</span><span class="p">.</span><span class="nx">password</span><span class="p">.</span><span class="nx">setValue</span><span class="p">(</span> <span class="nx">password</span> <span class="p">);</span>
		<span class="k">this</span><span class="p">.</span><span class="nx">confirmPassword</span><span class="p">.</span><span class="nx">setValue</span><span class="p">(</span> <span class="nx">password</span> <span class="p">);</span>
		<span class="k">this</span><span class="p">.</span><span class="nx">create</span><span class="p">.</span><span class="nx">click</span><span class="p">();</span>
	<span class="p">}</span>
<span class="p">}</span>

<span class="nx">module</span><span class="p">.</span><span class="nx">exports</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">CreateAccountPage</span><span class="p">();</span></pre></div>



<h3 class="remarkup-header">Without page object pattern</h3>

<p>Let&#039;s compare that to a solution without page object pattern. Code is available at <a href="https://gerrit.wikimedia.org/r/c/mediawiki/core/+/702341/" class="remarkup-link remarkup-link-ext" rel="noreferrer">702341</a>.</p>

<p><a href="https://gerrit.wikimedia.org/g/mediawiki/core/%2B/refs/heads/master/tests/selenium/specs/user.js" class="remarkup-link remarkup-link-ext" rel="noreferrer">tests/selenium/specs/user.js</a></p>

<div class="remarkup-code-block" data-code-lang="js" data-sigil="remarkup-code-block"><pre class="remarkup-code"><span></span><span class="s1">&#39;use strict&#39;</span><span class="p">;</span>

<span class="kr">const</span> <span class="nx">assert</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span> <span class="s1">&#39;assert&#39;</span> <span class="p">);</span>
<span class="kr">const</span> <span class="nx">Util</span> <span class="o">=</span> <span class="nx">require</span><span class="p">(</span> <span class="s1">&#39;wdio-mediawiki/Util&#39;</span> <span class="p">);</span>

<span class="nx">describe</span><span class="p">(</span> <span class="s1">&#39;User&#39;</span><span class="p">,</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
	<span class="nx">it</span><span class="p">(</span> <span class="s1">&#39;should be able to create account&#39;</span><span class="p">,</span> <span class="kd">function</span> <span class="p">()</span> <span class="p">{</span>
		<span class="kr">const</span> <span class="nx">username</span> <span class="o">=</span> <span class="nx">Util</span><span class="p">.</span><span class="nx">getTestString</span><span class="p">(</span> <span class="s1">&#39;User-&#39;</span> <span class="p">);</span>
		<span class="kr">const</span> <span class="nx">password</span> <span class="o">=</span> <span class="nx">Util</span><span class="p">.</span><span class="nx">getTestString</span><span class="p">();</span>

		<span class="nx">browser</span><span class="p">.</span><span class="nx">url</span><span class="p">(</span> <span class="s1">&#39;/wiki/Special:CreateAccount&#39;</span> <span class="p">);</span>
		<span class="nx">$</span><span class="p">(</span> <span class="s1">&#39;#wpName2&#39;</span> <span class="p">).</span><span class="nx">setValue</span><span class="p">(</span> <span class="nx">username</span> <span class="p">);</span>
		<span class="nx">$</span><span class="p">(</span> <span class="s1">&#39;#wpPassword2&#39;</span> <span class="p">).</span><span class="nx">setValue</span><span class="p">(</span> <span class="nx">password</span> <span class="p">);</span>
		<span class="nx">$</span><span class="p">(</span> <span class="s1">&#39;#wpRetype&#39;</span> <span class="p">).</span><span class="nx">setValue</span><span class="p">(</span> <span class="nx">password</span> <span class="p">);</span>
		<span class="nx">$</span><span class="p">(</span> <span class="s1">&#39;#wpCreateaccount&#39;</span> <span class="p">).</span><span class="nx">click</span><span class="p">();</span>

		<span class="nx">assert</span><span class="p">.</span><span class="nx">strictEqual</span><span class="p">(</span> <span class="nx">$</span><span class="p">(</span> <span class="s1">&#39;#firstHeading&#39;</span> <span class="p">).</span><span class="nx">getText</span><span class="p">(),</span> <span class="sb">`Welcome, </span><span class="si">${</span><span class="nx">username</span><span class="si">}</span><span class="sb">!`</span> <span class="p">);</span>
	<span class="p">}</span> <span class="p">);</span>
<span class="p">}</span> <span class="p">);</span></pre></div>



<h3 class="remarkup-header">Conclusion</h3>

<p>With page object pattern, the framework is more complex, there are more files (two instead of one) and there is more overall code, but the tests are more readable and more maintainable.</p>

<p>Without page object pattern, the framework is simpler, there are less files (one instead of two) and there is less overall code, but the tests are less readable and less maintainable.</p>

<p>To keep this blog post short, I&#039;ve selected a simple example. If the test suite creates accounts a lot, without page object pattern, code for creating account would have to be copy/pasted, leading to duplication and harder maintenance.</p>

<p>With the page object pattern, creating an account is just a call to <tt class="remarkup-monospaced">CreateAccountPage.createAccount()</tt> function. If any of the elements for creating the account changes, only <tt class="remarkup-monospaced">CreateAccountPage</tt> needs to be updated. If the logic of creating and account changes (for example, not requiring password re-entry) only <tt class="remarkup-monospaced">CreateAccountPage.createAccount()</tt> needs to be updated.</p>

<h3 class="remarkup-header">More information</h3>

<ul class="remarkup-list">
<li class="remarkup-list-item"><a href="https://martinfowler.com/bliki/PageObject.html" class="remarkup-link remarkup-link-ext" rel="noreferrer">PageObject</a> by Martin Fowler (2013)</li>
<li class="remarkup-list-item"><a href="https://github.com/SeleniumHQ/selenium/wiki/PageObjects" class="remarkup-link remarkup-link-ext" rel="noreferrer">PageObjects</a> by Simon Stewart (Selenium, <a href="https://github.com/SeleniumHQ/selenium/wiki/PageObjects/_history" class="remarkup-link remarkup-link-ext" rel="noreferrer">2015</a>)</li>
<li class="remarkup-list-item"><a href="https://www.selenium.dev/documentation/en/guidelines_and_recommendations/page_object_models/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Page object models</a> by Diego Molina (Selenium, <a href="https://github.com/SeleniumHQ/seleniumhq.github.io/commits/dev/docs_source_files/content/guidelines_and_recommendations/page_object_models.en.md" class="remarkup-link remarkup-link-ext" rel="noreferrer">2019</a>)</li>
<li class="remarkup-list-item"><a href="https://webdriver.io/docs/pageobjects/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Page Object Pattern</a> by Christian Bromann (WebdriverIO, <a href="https://github.com/webdriverio/webdriverio/commits/main/website/docs/PageObjects.md" class="remarkup-link remarkup-link-ext" rel="noreferrer">2021</a>)</li>
<li class="remarkup-list-item"><a href="https://www.mediawiki.org/wiki/Selenium/Explanation/Stack" class="remarkup-link remarkup-link-ext" rel="noreferrer">Selenium/Explanation/Stack</a></li>
<li class="remarkup-list-item"><a href="https://www.mediawiki.org/wiki/Selenium/Reference/Stack" class="remarkup-link remarkup-link-ext" rel="noreferrer">Selenium/Reference/Stack</a></li>
</ul></div></content></entry><entry><title>Testing search in MediaSearch - Part II</title><link href="/phame/live/21/post/245/testing_search_in_mediasearch_-_part_ii/" /><id>https://phabricator.wikimedia.org/phame/post/view/245/</id><author><name>Etonkovidova (Elena)</name></author><published>2021-07-01T02:54:27+00:00</published><updated>2021-07-28T06:28:53+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><blockquote><p>“But what am I going to see?<br />
I don&#039;t know. In a certain sense, it depends on you.”<br />
― Stanislaw Lem, Solaris</p></blockquote>

<p>In <a href="https://phabricator.wikimedia.org/phame/post/view/226/testing_search_in_mediasearch_-_part_1/" class="remarkup-link" rel="noreferrer">Testing search in MediaSearch - Part 1</a> the top down analysis was used for identifying what needs to be tested in  <a href="https://commons.wikimedia.org/w/index.php?search=&amp;title=Special:MediaSearch&amp;go=Go&amp;type=image" class="remarkup-link remarkup-link-ext" rel="noreferrer">MediaSearch</a>. The comparison analysis has been done to prove that MediaSearch, at a minimum, performs as well as Special:Search.  All Special:Search functionality should be present in MediaSearch, while the search still works reliably and the users&#039; workflows should not be disrupted. Testing the UI served the same purpose: reliable search, search features are easy to use, and the users have a better experience than with Special:Search.</p>

<p>But the most important question remains: how well the new search answers users&#039; expectations? From the test outline diagram there are other aspects of search that need to be explored to answer that important question -  <strong>Relevance</strong>, <strong>full text search vs phrase match search</strong>, and <strong>Searching in different languages</strong> .<br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/k3b2cgsxvh3wy55fpr4m/PHID-FILE-xygqrj6h56m4p6x6hnxq/Screen_Shot_2021-06-30_at_4.24.37_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_142"><img src="https://phab.wmfusercontent.org/file/data/k3b2cgsxvh3wy55fpr4m/PHID-FILE-xygqrj6h56m4p6x6hnxq/Screen_Shot_2021-06-30_at_4.24.37_PM.png" width="600" alt="Screen Shot 2021-06-30 at 4.24.37 PM.png (970×1 px, 292 KB)" /></a></div><br />
Let&#039;s start with <strong>Relevance</strong>.  Assessing search quality  is a quite challenging task (e.g. see <a href="https://meta.wikimedia.org/wiki/Research:Measuring_User_Search_Satisfaction" class="remarkup-link remarkup-link-ext" rel="noreferrer">Research:Measuring User Search Satisfaction (1)</a>). The search relevance is creatively described that it&#039;s  &quot;like beauty, is in the eye of the beholder.&quot; <a href="https://www.compose.com/articles/how-scoring-works-in-elasticsearch/" class="remarkup-link remarkup-link-ext" rel="noreferrer">(2)</a>:</p>

<blockquote><p>[...] relevance is subjective, there is no way to return the perfect result set. There are, however, various approaches and tools that can be used to tune the result set for the most optimal results for your users.</p>

<p>&quot;How scoring works in Elasticsearch&quot; (2)</p></blockquote>

<p>&quot;Run some search queries and see if the results make sense&quot;  - this commonsense approach, probably, would work.  I started with a search term that cannot fail - <strong>cat</strong></p>

<div class="remarkup-table-wrap"><table class="remarkup-table">
<tr><th>Search term</th><th>Special:MediaSearch</th><th>Special:Search</th><th>MediaSearch full text search ES score (first result)</th></tr>
<tr><td><strong>cat</strong></td><td><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/sh5a7yumabesepxc3yoo/PHID-FILE-x3uspluaz6qwiqhcojir/Screen_Shot_2021-06-29_at_7.58.23_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_143"><img src="https://phab.wmfusercontent.org/file/data/mmecd52yqioyonkdvgvh/PHID-FILE-oowydwgylo277rezmfkt/preview-Screen_Shot_2021-06-29_at_7.58.23_PM.png" width="220" height="125.71428571429" alt="Screen Shot 2021-06-29 at 7.58.23 PM.png (1×2 px, 2 MB)" /></a></div></td><td><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/iky2awog7fo6t4nxcywx/PHID-FILE-gygwyjicwm64jegspky2/Screen_Shot_2021-06-29_at_8.27.13_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_144"><img src="https://phab.wmfusercontent.org/file/data/lda37bca4wswlpvaqp6g/PHID-FILE-w6swtfn3x4mhtuxnsqav/preview-Screen_Shot_2021-06-29_at_8.27.13_PM.png" width="220" height="179.63302752294" alt="Screen Shot 2021-06-29 at 8.27.13 PM.png (1×1 px, 551 KB)" /></a></div></td><td>98.84846 ( Link to scores: <a href="https://commons.wikimedia.org/w/index.php?sort=relevance&amp;search=cat&amp;title=Special:Search&amp;profile=advanced&amp;fulltext=1&amp;advancedSearch-current=%7B%7D&amp;ns6=1&amp;mediasearch=1&amp;cirrusExplain=pretty&amp;cirrusDumpResult" class="remarkup-link remarkup-link-ext" rel="noreferrer">cat</a> )</td></tr>
<tr></tr>
</table></div>

<p>Only pictures of cats are returned by searches with Special:Search and with MediaSearch and <strong>Special:Search</strong> results match <strong>MediaSearch</strong> results.  ES score (ElasticSearch score) for the first picture is high - the test is a success.</p>

<p>However, the next simple search - search term <strong>king</strong> -  is a little more confusing:</p>

<div class="remarkup-table-wrap"><table class="remarkup-table">
<tr><th>Search term</th><th>Special:MediaSearch</th><th>Special:Search</th><th>MediaSearch full text search ES  (first result)</th></tr>
<tr><td><strong>king</strong></td><td><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/a2yzdxc5iffxbulhyfuc/PHID-FILE-jn3apvzhvbzidkecsvbp/Screen_Shot_2021-06-29_at_6.04.06_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_145"><img src="https://phab.wmfusercontent.org/file/data/qudiya2h6gd25o5npjbf/PHID-FILE-7sparptn2haozkgm52tw/preview-Screen_Shot_2021-06-29_at_6.04.06_PM.png" width="220" height="129.14910226386" alt="Screen Shot 2021-06-29 at 6.04.06 PM.png (1×2 px, 2 MB)" /></a></div></td><td><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/il2haovo5fkpyiez2ise/PHID-FILE-7ix3skuv7iuh7d46lqel/Screen_Shot_2021-06-29_at_8.39.41_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_146"><img src="https://phab.wmfusercontent.org/file/data/ptr3qgt7chqg25mk7sa4/PHID-FILE-t4yjll3lf4dngatt5ty2/preview-Screen_Shot_2021-06-29_at_8.39.41_PM.png" width="219.1801242236" height="220" alt="Screen Shot 2021-06-29 at 8.39.41 PM.png (1×1 px, 700 KB)" /></a></div></td><td>82.770256 (Link to scores: <a href="https://commons.wikimedia.org/w/index.php?sort=relevance&amp;search=king&amp;title=Special:Search&amp;profile=advanced&amp;fulltext=1&amp;advancedSearch-current=%7B%7D&amp;ns6=1&amp;mediasearch=1&amp;cirrusExplain=pretty&amp;cirrusDumpResult" class="remarkup-link remarkup-link-ext" rel="noreferrer">king</a>)</td></tr>
<tr></tr>
</table></div>

<p>Again, there are no differences in the search results between <strong>Search</strong> and <strong>MediaSearch</strong>, which is great.  But what does the first picture in the result - <a href="https://commons.wikimedia.org/wiki/File:Polistes_May_2013-2.jpg" class="remarkup-link remarkup-link-ext" rel="noreferrer">File:Polistes May 2013-2.jpg</a>- have to do with the search term <strong>&quot;king&quot;</strong>?  If we look closer, the surprising results are not that surprising. It turned out that the relevance scoring relies on the structured data and the structured data for <a href="https://commons.wikimedia.org/wiki/File:Polistes_May_2013-2.jpg" class="remarkup-link remarkup-link-ext" rel="noreferrer">File:Polistes May 2013-2.jpg</a> has the statement <strong>&quot;monarch&quot;</strong> which is a wikidata item - <a href="https://www.wikidata.org/wiki/Q116" class="remarkup-link remarkup-link-ext" rel="noreferrer">Q116</a> that has the &quot;king&quot; label: <br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/xitf324uqm6mrh2aljga/PHID-FILE-ii2kea5kzt3zjhlkrbts/Screen_Shot_2021-06-29_at_8.55.42_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_147"><img src="https://phab.wmfusercontent.org/file/data/xitf324uqm6mrh2aljga/PHID-FILE-ii2kea5kzt3zjhlkrbts/Screen_Shot_2021-06-29_at_8.55.42_PM.png" width="600" alt="Screen Shot 2021-06-29 at 8.55.42 PM.png (978×2 px, 259 KB)" /></a></div></p>

<p>Another unexpected item in our search results is the picture of potatoes. The ES score is 58.06765, and it&#039;s rather difficult to see the relevance to the search term <strong>king</strong>. The file name for this picture of seemingly plain potatoes explains why it was included in the results  -  <a href="https://commons.wikimedia.org/wiki/File:King_Edward.jpg" class="remarkup-link remarkup-link-ext" rel="noreferrer">File:King Edward.jpg</a>. Since the term &quot;king&quot; is in the file name, naturally, the picture will be returned when you search for &quot;king&quot;. The structured data, files names, captions, and descriptions are what the search is based on.</p>

<p>Next to test  - <strong>full text search</strong> and  <strong>phrase matching </strong> search.  When we search  for  <strong>Newton&#039;s cradle</strong>, the results are delightful: only results that explicitly portray <strong>Newton&#039;s cradle</strong> are returned.  Not relevant results from separates searches  <strong>Newton</strong> and   <strong>cradle</strong> are not present.</p>

<div class="remarkup-table-wrap"><table class="remarkup-table">
<tr><th>search term - Newton</th><th>search term - cradle</th><th>search terms - Newton&#039;s cradle</th></tr>
<tr><td><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/j3gzwtzzznucgclo5wgs/PHID-FILE-7miepwe6pxmo237xdou7/Screen_Shot_2021-06-30_at_4.37.47_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_148"><img src="https://phab.wmfusercontent.org/file/data/2l7bvbynghotwtyxjuqn/PHID-FILE-vx4haiht5blhx2dlarta/preview-Screen_Shot_2021-06-30_at_4.37.47_PM.png" width="220" height="141.24105011933" alt="Screen Shot 2021-06-30 at 4.37.47 PM.png (1×2 px, 3 MB)" /></a></div></td><td><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/7y5wjt5e7awn7oqgyj73/PHID-FILE-nhhkt752ew2g35fovuun/Screen_Shot_2021-06-30_at_4.34.07_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_149"><img src="https://phab.wmfusercontent.org/file/data/is2imd5d3im6zrdwmsi2/PHID-FILE-555ubcb4phuldzg4poyt/preview-Screen_Shot_2021-06-30_at_4.34.07_PM.png" width="220" height="126.03803486529" alt="Screen Shot 2021-06-30 at 4.34.07 PM.png (1×2 px, 2 MB)" /></a></div></td><td><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/xfwwynw46ohpjyrv3a4i/PHID-FILE-aunclfapd34rvizut5t4/animation6_gif.gif" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_150"><img src="https://phab.wmfusercontent.org/file/data/xfwwynw46ohpjyrv3a4i/PHID-FILE-aunclfapd34rvizut5t4/animation6_gif.gif" width="300" alt="animation6_gif.gif (721×1 px, 2 MB)" /></a></div></td></tr>
<tr></tr>
</table></div>

<p>What if I add the quotation marks and search for  <strong>&quot;Newton&#039;s cradle&quot;</strong>?  Will it limit the search even more (it should)?  Yes, searching for <strong>&quot;Newton&#039;s cradle&quot;</strong> will bring only 50 results vs 56 results for <strong>Newton&#039;s cradle</strong>.  And those 6 extra results are scored lower than the top results. <br />
The next test is to check how phrase matching search will work for completely unrelated search terms  - e.g. <strong>pika ballet</strong>. Would it find results for  <strong>pika</strong> and <strong>ballet</strong> and return randomly (and ES scores will be low?). Nope, the search is smart enough to return nothing:<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/gmodat3a4vjualags2sg/PHID-FILE-etb5kuqecgdcgckhlnau/Screen_Shot_2021-06-30_at_4.55.58_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_151"><img src="https://phab.wmfusercontent.org/file/data/sl72ej4bszgatwmsfisc/PHID-FILE-zzw6owtbous72cmbbvl5/preview-Screen_Shot_2021-06-30_at_4.55.58_PM.png" width="220" height="138.84084636615" alt="Screen Shot 2021-06-30 at 4.55.58 PM.png (1×2 px, 188 KB)" /></a></div></p>

<p><strong>Searching in different languages</strong>  is the last challenging item to test. How well the search performs for different languages?  What should be the expected results? If I search for <strong>кот</strong> (<em>Russian</em>: cat), do I expect to see only the images that have <strong>кот</strong> in their structured data or description? Or the results should be the same as searching for <strong>cat</strong> since, thanks to wikidata, the labels for <a href="https://www.wikidata.org/wiki/Q1022892" class="remarkup-link remarkup-link-ext" rel="noreferrer">Cat (Q1022892)</a> includes many languages.  The search results for  <strong>кот</strong>  are very, very similar to the search results for <strong>cat</strong>: <br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/4n5gskx74nhetgixliw2/PHID-FILE-uabvjql66puhuz5xu5if/Screen_Shot_2021-06-30_at_5.08.28_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_152"><img src="https://phab.wmfusercontent.org/file/data/4zelutr7kcsxkzg7qpi3/PHID-FILE-ltpbfie2lfyn47jhohw5/preview-Screen_Shot_2021-06-30_at_5.08.28_PM.png" width="220" height="109.28622927181" alt="Screen Shot 2021-06-30 at 5.08.28 PM.png (1×2 px, 3 MB)" /></a></div><br />
So far, so good. Testing for <strong>chat</strong> (<em>French</em>: cat) returns cat images and images that relevant to &quot;chat&quot; (as a conversation), which is expected (and, maybe, even desired) behavior. So,  when <a href="https://phabricator.wikimedia.org/T282583" class="remarkup-link" rel="noreferrer">T282583 Searching in non-English languages doesn&#039;t return expected results</a> phab task was filed, it caught me by surprise. The description of the phab task is short:</p>

<blockquote><p>For example</p>

<p><a href="https://commons.wikimedia.org/w/index.php?&gt;search=chien&amp;title=Special:MediaSearch&amp;go=Go&amp;type=image&amp;uselang=fr" class="remarkup-link remarkup-link-ext" rel="noreferrer">https://commons.wikimedia.org/w/index.php?&gt;search=chien&amp;title=Special:MediaSearch&amp;go=Go&amp;type=image&amp;uselang=fr</a></p>

<p>contains a lot of images with &#039;chien&#039; in the title before we get any images of dogs, despite the <tt class="remarkup-monospaced">uselang=fr</tt> param. &gt;statement matches are rated more highly than title matches, so that&#039;s unexpected</p></blockquote>

<p>While testing searching in different languages, I viewed the results of suboptimal relevance as acceptable.  But logically, when a user  sets  the UI language in User preferences or via <tt class="remarkup-monospaced">uselang=</tt>, the search should give preferential ranking for results that relate to that language!  So, searching  for <strong>chien</strong> (<em>French:</em> dog) with <tt class="remarkup-monospaced">uselang=fr</tt> should return more pictures with dogs in top results than for the the same search that performed with <tt class="remarkup-monospaced">uselang=en</tt>. The issue was promptly fixed and the table below  shows the improvement.</p>

<div class="remarkup-table-wrap"><table class="remarkup-table">
<tr><th>Before the fix - <tt class="remarkup-monospaced">commons wmf.7</tt></th><th>After the fix - <tt class="remarkup-monospaced">commons wmf.9</tt></th></tr>
<tr><th>search term &quot;chien&quot;</th><th>search term &quot;chien&quot;</th></tr>
<tr><td>French UI: <a href="https://commons.wikimedia.org/w/index.php?search=chien&amp;title=Special:MediaSearch&amp;go=Go&amp;type=image&amp;uselang=fr" class="remarkup-link remarkup-link-ext" rel="noreferrer">https://commons.wikimedia.org/w/index.php?search=chien&amp;title=Special:MediaSearch&amp;go=Go&amp;type=image&amp;uselang=fr</a> <div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/as2g5pbbpwi4uxuqt5s3/PHID-FILE-v2o4xe65brbbeh5vfkav/Screen_Shot_2021-05-27_at_11.48.04_AM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_153"><img src="https://phab.wmfusercontent.org/file/data/mrfyd65w7o4qhvh5voy7/PHID-FILE-f2mexbscodptmfxm5ytm/preview-Screen_Shot_2021-05-27_at_11.48.04_AM.png" width="220" height="131.8795620438" alt="Screen Shot 2021-05-27 at 11.48.04 AM.png (1×2 px, 3 MB)" /></a></div></td><td>The second image has dogs, that is a good improvement. <div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/g7uy6aqqxajnzjoghmdc/PHID-FILE-pzg4njrneqeungtrs473/Screen_Shot_2021-06-09_at_4.30.00_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_154"><img src="https://phab.wmfusercontent.org/file/data/g7uy6aqqxajnzjoghmdc/PHID-FILE-pzg4njrneqeungtrs473/Screen_Shot_2021-06-09_at_4.30.00_PM.png" width="300" alt="Screen Shot 2021-06-09 at 4.30.00 PM.png (1×2 px, 3 MB)" /></a></div></td></tr>
<tr></tr>
</table></div>

<p>Testing search made me realize many aspects of how search results might be evaluated by our users and, based on testing results, to see whether MediaSearch needs to be improved.  And it&#039;s incredibly rewarding to see improved search experience since having efficient and reliable search functionality adds a lot to user experience.</p>

<p><em>Special thanks to <a href="https://phabricator.wikimedia.org/p/matthiasmullie/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_155"><span class="phui-tag-core phui-tag-color-person">@matthiasmullie</span></a>  and <a href="https://phabricator.wikimedia.org/p/Cparle/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_156"><span class="phui-tag-core phui-tag-color-person">@Cparle</span></a> for guidance, insights, and specific tips on testing search functionality in MediaSearch. </em></p>

<ol class="remarkup-list">
<li class="remarkup-list-item"><em>Research:Measuring User Search Satisfaction</em> <a href="https://meta.wikimedia.org/wiki/Research:Measuring_User_Search_Satisfaction" class="remarkup-link remarkup-link-ext" rel="noreferrer">https://meta.wikimedia.org/wiki/Research:Measuring_User_Search_Satisfaction</a> retrieved on June 28/2021.</li>
<li class="remarkup-list-item"><em>&quot;How scoring works in Elasticsearch&quot;</em> <a href="https://www.compose.com/articles/how-scoring-works-in-elasticsearch/" class="remarkup-link remarkup-link-ext" rel="noreferrer">https://www.compose.com/articles/how-scoring-works-in-elasticsearch/</a> retrieved on June 28/2021.</li>
</ol></div></content></entry><entry><title>Most Interesting Bugs</title><link href="/phame/live/21/post/242/most_interesting_bugs/" /><id>https://phabricator.wikimedia.org/phame/post/view/242/</id><author><name>Etonkovidova (Elena)</name></author><published>2021-05-27T16:20:14+00:00</published><updated>2021-06-29T22:38:51+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>What makes a bug interesting? Any bug, by definition, has an element of a surprise (otherwise, it wouldn&#039;t be a bug). But not all bugs are equal in their ability to be surprising.  Some bugs do stand out, presenting two essential elements of a surprise - unexpectedness  and/or  unusual manifestation.  Based on my own classification criteria, I define a bug to be the most interesting if it is either (or both) <br />
(1)  <strong>difficult to find</strong><br />
(2)  <strong> has a quite unexpected (mostly disruptive) impact </strong></p>

<p>Let&#039;s take a look at some examples in those nominations. The first example of a bug  that is <strong>&quot;Difficult to find&quot;</strong> - <a href="https://phabricator.wikimedia.org/T272103" class="phui-tag-view phui-tag-type-shade phui-tag-blue phui-tag-shade phui-tag-icon-view " data-sigil="hovercard" data-meta="0_165"><span class="phui-tag-core "><span class="visual-only phui-icon-view phui-font-fa fa-anchor" data-meta="0_164" aria-hidden="true"></span>https://phabricator.wikimedia.org/T272103</span></a>. The issue&#039;s has a long title &quot;[regression - wmf.26] frwiki Homepage SE module has &#039;cirrussearch-query-too-long&#039; for default filters&quot;.  Even from the title two things look interesting - first, the issue is marked as a regression bug (indicating that previous testing did not find the issue) and second, it&#039;s very specific - mentions French wikipedia and a specific Cirrus error message.  <br />
To describe the issue briefly - a  user visits <a href="https://test.wikipedia.org/wiki/Special:Homepage" class="remarkup-link remarkup-link-ext" rel="noreferrer">Special:Homepage</a> (to see the page you need to log in and to enable Homepage in User preferences), and with the default filters selection, the error would be displayed.<br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/psfpaapmuez4yw52slkd/PHID-FILE-xe2vlncgvjferse6eweh/SE_module_initial_state2.gif" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_157"><img src="https://phab.wmfusercontent.org/file/data/psfpaapmuez4yw52slkd/PHID-FILE-xe2vlncgvjferse6eweh/SE_module_initial_state2.gif" width="400" alt="SE_module_initial_state2.gif (917×683 px, 349 KB)" /></a></div><br />
The surprising elements of the issue are</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">the issue happens <strong>only on French wiki </strong> - which makes it classified as  &quot;Difficult to find&quot;</li>
<li class="remarkup-list-item">the issue happens for default selection (no user input) - therefore, the impact on user experience is big</li>
<li class="remarkup-list-item">users are given false feedback that tasks are there (the tasks count is present) - again, the impact on user experience is big since users would see misleading info.</li>
</ul>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/5venjglih7twb7q6z6hg/PHID-FILE-7zymx26nszcr4zaa3kw5/Screen_Shot_2021-05-26_at_12.44.27_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_158"><img src="https://phab.wmfusercontent.org/file/data/cldpqmcdg5nhsy5pz4tn/PHID-FILE-ijbsucdox24t3bjat4oa/preview-Screen_Shot_2021-05-26_at_12.44.27_PM.png" width="165.84144645341" height="220" alt="Screen Shot 2021-05-26 at 12.44.27 PM.png (1×1 px, 531 KB)" /></a></div></p>

<p>On the positive side, the error message is super specific,  and points to the exact root cause of the issue:</p>

<div class="remarkup-code-block" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code">Fetching task suggestions failed: cirrussearch-query-too-long cirrussearch-query-too-long

&quot;Search request is longer than the maximum allowed length. (2122 &gt; 2048)&quot;</pre></div>

<p>Although the issue possibly could be predicted, the chances that it would happen were low.  And to answer the question &quot;why it was difficult to find?&quot; - the testing environment (the beta cluster) did not show the issue. Only when the Suggested edits module was deployed to seven wikis and post-deployment testing was done, the issue was found.</p>

<p>In the same nomination -<strong> &quot;Difficult to find&quot;</strong> -  could be the issue for articles with the template <tt class="remarkup-monospaced">{{Italic title}}</tt> (<a href="https://phabricator.wikimedia.org/T216044" class="phui-tag-view phui-tag-type-shade phui-tag-blue phui-tag-shade phui-tag-icon-view " data-sigil="hovercard" data-meta="0_167"><span class="phui-tag-core "><span class="visual-only phui-icon-view phui-font-fa fa-anchor" data-meta="0_166" aria-hidden="true"></span>https://phabricator.wikimedia.org/T216044</span></a>) that would break ContentTranslation workflows or <a href="https://phabricator.wikimedia.org/T274619" class="phui-tag-view phui-tag-type-shade phui-tag-blue phui-tag-shade phui-tag-icon-view " data-sigil="hovercard" data-meta="0_169"><span class="phui-tag-core "><span class="visual-only phui-icon-view phui-font-fa fa-anchor" data-meta="0_168" aria-hidden="true"></span>https://phabricator.wikimedia.org/T274619</span></a> when enabling Homepage will remove &quot;More&quot; menu from User page, i.e.</p>

<div class="remarkup-table-wrap"><table class="remarkup-table">
<tr><th>User page with enabled Homepage</th><th>User page - Homepage disabled</th></tr>
<tr><td><strong>More</strong> is not present <div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/sshwyfaiqim75bpmjvkz/PHID-FILE-pnplous5e5e2rti77gxj/Screen_Shot_2021-02-12_at_1.10.18_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_159"><img src="https://phab.wmfusercontent.org/file/data/t33ab44xmdd6a4bejrwq/PHID-FILE-lalcbd44wxlyvcyo5jmt/preview-Screen_Shot_2021-02-12_at_1.10.18_PM.png" width="220" height="81.542803386642" alt="Screen Shot 2021-02-12 at 1.10.18 PM.png (394×1 px, 51 KB)" /></a></div></td><td><strong>More</strong> is present <div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/kw7qkwjon3nv2lyeyetl/PHID-FILE-mcwl2xhvzpi3drdi73ez/Screen_Shot_2021-02-12_at_1.12.26_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_160"><img src="https://phab.wmfusercontent.org/file/data/23h4yenki3qizzktdzmp/PHID-FILE-jd5dicmaxmxmykc6tkj5/preview-Screen_Shot_2021-02-12_at_1.12.26_PM.png" width="220" height="82.009389671362" alt="Screen Shot 2021-02-12 at 1.12.26 PM.png (397×1 px, 49 KB)" /></a></div></td></tr>
<tr></tr>
</table></div>

<p>In fact, there is a not-so-small subgroup of &quot;<strong>Difficult to find&quot;</strong> bugs that could be titled &quot;Regrettable regression bugs&quot;. The subgroup includes bugs that unxpectedly appear in places that should not be affected by new changes, or the bugs that could be found only in production.</p>

<p>The <strong>&quot;Unexpected impact&quot;</strong> group has issues, arguably, the most entertaining ones. The first example would be an issue ironically involving bug images (a pure coincidence!). The animated gif below shows that selecting a bug image (Special:MediaSearch with filters shows that there is only one of image returned) and clicking on it makes the image multiply:<br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/3ue5xgqmyst7eerqdplw/PHID-FILE-lndta5dqmkic37y62tyk/Screen_Shot_2021-01-25_at_3.33.56_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_161"><img src="https://phab.wmfusercontent.org/file/data/ct3rlkoxolgn6h6sv255/PHID-FILE-pouogbza7dlwd2lhyz52/preview-Screen_Shot_2021-01-25_at_3.33.56_PM.png" width="220" height="93.012658227848" alt="Screen Shot 2021-01-25 at 3.33.56 PM.png (501×1 px, 318 KB)" /></a></div><br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/azln253dtv5njnuqjo3v/PHID-FILE-pda5z4beuxlhwnjpdszc/hamar_daban_kafer2.gif" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_162"><img src="https://phab.wmfusercontent.org/file/data/azln253dtv5njnuqjo3v/PHID-FILE-pda5z4beuxlhwnjpdszc/hamar_daban_kafer2.gif" width="400" alt="hamar_daban_kafer2.gif (737×1 px, 3 MB)" /></a></div></p>

<p>Another example of a bug with <strong>&quot;Unexpected impact&quot;</strong>- <a href="https://phabricator.wikimedia.org/T280616" class="phui-tag-view phui-tag-type-shade phui-tag-blue phui-tag-shade phui-tag-icon-view " data-sigil="hovercard" data-meta="0_171"><span class="phui-tag-core "><span class="visual-only phui-icon-view phui-font-fa fa-anchor" data-meta="0_170" aria-hidden="true"></span>https://phabricator.wikimedia.org/T280616</span></a>.  On an article with suggested Add links, a user clicks on &#039;Edit source&#039;. The page starts reloading and keeps going with reloading, making a page disabled for any further interactions (click on the animated gif to see the action)<br />
 <div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/uvvu6zpocj5anag352ex/PHID-FILE-z3i2qa5ppkjlhxxsxqll/infinite_loop.gif" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_163"><img src="https://phab.wmfusercontent.org/file/data/flcgpqpidq2woe7t26xr/PHID-FILE-mq6ns7q7wjwn7vxqhvto/preview-infinite_loop.gif" width="220" height="121.93439865433" alt="infinite_loop.gif (659×1 px, 481 KB)" /></a></div></p>

<p>The list of examples  of bugs in <strong>&quot;Difficult to find&quot;</strong> and <strong>&quot;Unexpected impact&quot;</strong> nominations doesn&#039;t gets new items too often. But each issue on the list gives a sort of a lesson in exploratory testing, and, in fact, making the testing more efficient.</p></div></content></entry><entry><title>macOS vs Ubuntu Linux</title><link href="/phame/live/21/post/241/macos_vs_ubuntu_linux/" /><id>https://phabricator.wikimedia.org/phame/post/view/241/</id><author><name>zeljkofilipin (Željko Filipin)</name></author><published>2021-05-18T13:36:52+00:00</published><updated>2021-05-29T16:34:57+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><h2 class="remarkup-header">Idea</h2>

<p>I do most of my work on a 27-inch iMac from 2012. It&#039;s a good desktop machine.</p>

<p>When traveling, I use a 11-inch MacBook Air from 2014. It&#039;s a very small and convenient laptop. It&#039;s powerful enough, but barely. I have to be very careful with resources when I&#039;m working on it.</p>

<p>For a while now I was thinking about dual booting the laptop with a Linux, to see how it would behave. I&#039;ve finally dual booted it with Ubuntu this week. As soon as the machine was mostly functional under Ubuntu, I&#039;ve decided to test it.</p>

<h2 class="remarkup-header">Machines</h2>

<p>For reference, here&#039;s the table with the two machines, with some relevant data. For readability, I&#039;ve omitted the data that&#039;s the same as in the above row.</p>

<div class="remarkup-table-wrap"><table class="remarkup-table">
<tr><td>Machine</td><td>Processor</td><td>RAM (GB)</td><td>OS</td><td>Docker</td><td>Docker Compose</td><td>Fresh</td><td>Node.js</td><td>npm</td><td>MediaWiki</td></tr>
<tr><td>iMac <a href="https://support.apple.com/en-us/HT201634" class="remarkup-link remarkup-link-ext" rel="noreferrer">13,2</a> (27-inch, 2012)</td><td>3,2 GHz Quad-Core Intel Core i5</td><td>16</td><td>macOS 10.15.7</td><td>20.10.6</td><td>1.29.1</td><td>21.04.1</td><td>10.24.1</td><td>6.14.12</td><td>1.37.0-alpha</td></tr>
<tr><td>MacBook Air <a href="https://support.apple.com/en-us/HT201862" class="remarkup-link remarkup-link-ext" rel="noreferrer">6,1</a> (11-inch, 2014)</td><td>1,4 GHz Dual-Core Intel Core i5</td><td>4</td><td>macOS 11.3.1</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr><td></td><td></td><td></td><td>Ubuntu 21.04</td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
<tr></tr>
</table></div>



<h2 class="remarkup-header">Tests</h2>

<p>Two things that I do the most are installing npm dependencies (<tt class="remarkup-monospaced">npm ci</tt>) and running tests (<tt class="remarkup-monospaced">npm run selenium-test</tt>). For this blog post, I&#039;ll use <a href="https://gerrit.wikimedia.org/g/mediawiki/core" class="remarkup-link remarkup-link-ext" rel="noreferrer">MediaWiki Core</a> repository and it&#039;s Selenium test suite. The suite is targeting a local MediaWiki. It&#039;s running in a local Docker container via <a href="https://www.mediawiki.org/wiki/MediaWiki-Docker" class="remarkup-link remarkup-link-ext" rel="noreferrer">MediaWiki-Docker</a>.</p>

<p>Both tests have two variants. One variant will run the command from the operating system (without a container). The other variant will run the commands from a Fresh container. <a href="https://gerrit.wikimedia.org/g/fresh" class="remarkup-link remarkup-link-ext" rel="noreferrer">Fresh</a> is *&quot;a fast and ready-to-use Docker container with various developer tools pre-installed.&quot;*</p>

<h2 class="remarkup-header">RAM</h2>

<p>Since a blog post without an image is no fun, I took a couple of screenshots.</p>

<p>Air + Ubuntu + Fresh + <tt class="remarkup-monospaced">npm run selenium-test</tt></p>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/tdg3tj7suzwqlzir7njx/PHID-FILE-def2hmyi4odaurideeze/ubuntu.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_172"><img src="https://phab.wmfusercontent.org/file/data/jyk4rku5pbj7s4hbbwym/PHID-FILE-aelaewosn3ido6ozet4y/preview-ubuntu.png" width="220" height="123.68960468521" alt="ubuntu.png (768×1 px, 290 KB)" /></a></div></p>

<p>Air + macOS + Fresh + <tt class="remarkup-monospaced">npm run selenium-test</tt></p>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/neehfsaiavevxzdljcuz/PHID-FILE-5gl5wlosrcl7vcdrjzjd/macos.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_173"><img src="https://phab.wmfusercontent.org/file/data/53wakeltfyubsky6pvyt/PHID-FILE-wzh57bonjd3kq3sd4hp3/preview-macos.png" width="220" height="123.68960468521" alt="macos.png (768×1 px, 444 KB)" /></a></div></p>

<p>The screenshots show that on Ubuntu the machine was using 1.5 GB RAM, while on macOS it was using 3.2 GB RAM. The difference is in the Linux virtual machine that Docker runs in the background on macOS.</p>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/3vmi2fkynftzh4kluozl/PHID-FILE-6pkin3jjft4327jrb2of/ram.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_174"><img src="https://phab.wmfusercontent.org/file/data/7ayb734yn232gngf2kza/PHID-FILE-huha3vr4ljme7uhulfv4/preview-ram.png" width="220" height="136.03333333333" alt="ram.png (371×600 px, 7 KB)" /></a></div></p>

<h2 class="remarkup-header">Speed</h2>

<p>I&#039;ve tried to keep the environments as simple as possible. When running the commands, only the Terminal application was open. I was primarily interested in how much RAM will be used when running the tests in the Fresh container, since the laptop has only 4 GB. I&#039;ve also measured how fast each command runs.</p>

<p>I wasn&#039;t interested in very good data. I just wanted good enough data for my use case. For that reason, I&#039;ve only run each command three times. That&#039;s just enough data to show any trends, but not so much that I&#039;ll get bored while waiting for them to finish. All results are in how much time (in minutes) each command took in different environments.</p>

<h3 class="remarkup-header">iMac + macOS</h3>

<div class="remarkup-table-wrap"><table class="remarkup-table">
<tr><td>Run</td><td><tt class="remarkup-monospaced">npm ci</tt> (m)</td><td><tt class="remarkup-monospaced">npm run selenium-test</tt> (m)</td></tr>
<tr><td>1</td><td>0:23</td><td>1:15</td></tr>
<tr><td>2</td><td>0:24</td><td>0:56</td></tr>
<tr><td>3</td><td>0:23</td><td>1:01</td></tr>
<tr><td>Average</td><td>0:23</td><td>1:04</td></tr>
<tr></tr>
</table></div>



<h3 class="remarkup-header">iMac + macOS + Fresh</h3>

<div class="remarkup-table-wrap"><table class="remarkup-table">
<tr><td>Run</td><td><tt class="remarkup-monospaced">npm ci</tt> (m)</td><td><tt class="remarkup-monospaced">npm run selenium-test</tt> (m)</td></tr>
<tr><td>1</td><td>3:19</td><td>2:24</td></tr>
<tr><td>2</td><td>3:17</td><td>1:52</td></tr>
<tr><td>3</td><td>3:27</td><td>1:53</td></tr>
<tr><td>Average</td><td>3:21</td><td>2:03</td></tr>
<tr></tr>
</table></div>



<h3 class="remarkup-header">Air + macOS</h3>

<div class="remarkup-table-wrap"><table class="remarkup-table">
<tr><td>Run</td><td><tt class="remarkup-monospaced">npm ci</tt> (m)</td><td><tt class="remarkup-monospaced">npm run selenium-test</tt> (m)</td></tr>
<tr><td>1</td><td>0:42</td><td>1:47</td></tr>
<tr><td>2</td><td>0:45</td><td>1:49</td></tr>
<tr><td>3</td><td>0:44</td><td>1:48</td></tr>
<tr><td>Average</td><td>0:43</td><td>1:48</td></tr>
<tr></tr>
</table></div>



<h3 class="remarkup-header">Air + macOS + Fresh</h3>

<div class="remarkup-table-wrap"><table class="remarkup-table">
<tr><td>Run</td><td><tt class="remarkup-monospaced">npm ci</tt> (m)</td><td><tt class="remarkup-monospaced">npm run selenium-test</tt> (m)</td></tr>
<tr><td>1</td><td>6:14</td><td>3:42</td></tr>
<tr><td>2</td><td>5:51</td><td>3:30</td></tr>
<tr><td>3</td><td>5:46</td><td>3:28</td></tr>
<tr><td>Average</td><td>5:57</td><td>3:33</td></tr>
<tr></tr>
</table></div>



<h3 class="remarkup-header">Air + Ubuntu</h3>

<div class="remarkup-table-wrap"><table class="remarkup-table">
<tr><td>Run</td><td><tt class="remarkup-monospaced">npm ci</tt> (m)</td><td><tt class="remarkup-monospaced">npm run selenium-test</tt> (m)</td></tr>
<tr><td>1</td><td>0:17</td><td>0:34</td></tr>
<tr><td>2</td><td>0:15</td><td>0:34</td></tr>
<tr><td>3</td><td>0:15</td><td>0:34</td></tr>
<tr><td>Average</td><td>0:15</td><td>0:34</td></tr>
<tr></tr>
</table></div>



<h3 class="remarkup-header">Air + Ubuntu + Fresh</h3>

<div class="remarkup-table-wrap"><table class="remarkup-table">
<tr><td>Run</td><td><tt class="remarkup-monospaced">npm ci</tt> (m)</td><td><tt class="remarkup-monospaced">npm run selenium-test</tt> (m)</td></tr>
<tr><td>1</td><td>0:24</td><td>0:54</td></tr>
<tr><td>2</td><td>0:24</td><td>0:53</td></tr>
<tr><td>3</td><td>0:24</td><td>0:53</td></tr>
<tr><td>Average</td><td>0:24</td><td>0:53</td></tr>
<tr></tr>
</table></div>



<h2 class="remarkup-header">Conclusion</h2>

<p>I was expecting to see less RAM used while running the commands on Ubuntu. No surprise there. How much time it takes to run the commands was a big surprise. It is so much faster on Ubuntu, it&#039;s amazing.</p>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/jjjhompua4pimlvqhydv/PHID-FILE-waj2w4ukofvmuyrir5e5/speed.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_175"><img src="https://phab.wmfusercontent.org/file/data/qab4q5zvpd5yifrcywik/PHID-FILE-cb3cyetqymdvjmibku23/preview-speed.png" width="220" height="136.03333333333" alt="speed.png (371×600 px, 15 KB)" /></a></div></p>

<p><tt class="remarkup-monospaced">npm ci</tt> takes about half a minute to run on powerful desktop machine running macOS, <em>outside</em> of the Fresh container. It takes more than three minutes to run the same command <em>inside</em> the container.</p>

<p>It takes about quarter of a minute to run the command <em>outside</em> the Fresh container on a non-powerful laptop running Ubuntu. Running <em>inside</em> the Fresh container takes about half a minute. That&#039;s the same amount of time the desktop took to run the command <em>outside</em> the container!</p>

<p><tt class="remarkup-monospaced">npm run selenium-test</tt> tells the same story. Running it <em>outside</em> the container on desktop machine running macOS took about a minute. Running it <em>inside</em> the container took about two minutes.</p>

<p>On the laptop running Ubuntu, it took about half a minute <em>outside</em> and about a minute <em>inside</em> the container.</p>

<p>The speed improvement is so obvious, I&#039;m seriously considering dual booting the desktop too.</p></div></content></entry><entry><title>Improvements to Email QA </title><link href="/phame/live/21/post/239/improvements_to_email_qa/" /><id>https://phabricator.wikimedia.org/phame/post/view/239/</id><author><name>jbolorinos-ctr (John)</name></author><published>2021-05-07T16:50:30+00:00</published><updated>2021-06-04T14:56:09+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p><strong>INTRO</strong><br />
When running QA on emails, the most important things to check are the dynamic content populating correctly for different user types, and ensuring there are no layout issues. Especially in an increasingly mobile world, it&#039;s important to review how an email will be displayed on a large variety of devices at once.</p>

<p><strong>OLD PROCESS</strong><br />
In the beginning of our email QA days, the process was simple and very manual, and only allowed for checking how emails were displayed on a few devices. The email marketing platform we use is called Acoustic, which allows us to populate emails with dynamic content and create a storyline of emails to be sent (for example: users that donate on the first email, will not receive any further emails). Inside each email template, we would select send out test email, and select a given test user to send it to. This was a cumbersome process that left a lot of space open for human error, and only resulted in us checking content manually on our own clients.</p>

<p><strong>NEW PROCESS</strong><br />
Recent improvements to email QA software provide testers with a quicker way of reviewing email layout and dynamic content on a wider variety of devices. This is particularly useful when performing QA for email on mobile devices, where screen sizes vary much more than on desktop devices. A new tool we added to our email testing suite, called Email on Acid, allows us to do this in just one click in Acoustic. The Email on Acid tool provides an email, which can then be input in Acoustic, and after just a few minutes, it will display how the email looks on Desktop, Mobile and even Web clients. This is a powerful tool that helps catch even the most edge case errors that may appear on less common devices, which is especially important here at Wikimedia given the our platform is used by so many users around the world.<br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/hkeazldogahzjrlajl5q/PHID-FILE-vw4zxof2jsdtdnw7wb6c/image.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_176"><img src="https://phab.wmfusercontent.org/file/data/6q6wcgypzl2ionshchsu/PHID-FILE-356brmq4j6nx3o26s47m/preview-image.png" width="220" height="115.26557377049" alt="image.png (799×1 px, 1 MB)" /></a></div></p>

<p><strong>CONCLUSION</strong><br />
In an increasingly mobile world, it is becoming even more important to have an email QA system that allows for checking how emails are displayed on a wide variety of devices quickly. Email QA has always been a more niche area of QA with fewer specialized tools, but that is changing now and tools such as Email on Acid are a great step in that direction! I havent been able to find any open source alternatives yet but if anyone has any suggestions please add them to the comments!</p></div></content></entry><entry><title>Debug Selenium Tests: logLevel</title><link href="/phame/live/21/post/238/debug_selenium_tests_loglevel/" /><id>https://phabricator.wikimedia.org/phame/post/view/238/</id><author><name>zeljkofilipin (Željko Filipin)</name></author><published>2021-04-30T16:29:37+00:00</published><updated>2021-05-12T19:58:55+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><h2 class="remarkup-header">Environments</h2>

<p>This tip works if you&#039;re targeting:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">a local MediaWiki<ul class="remarkup-list">
<li class="remarkup-list-item"><a href="https://www.mediawiki.org/wiki/Selenium/Getting_Started/Run_tests_targeting_MediaWiki-Docker" class="remarkup-link remarkup-link-ext" rel="noreferrer">MediaWiki-Docker</a></li>
<li class="remarkup-list-item"><a href="https://www.mediawiki.org/wiki/Selenium/How-to/Run_tests_targeting_MediaWiki-Docker-Dev" class="remarkup-link remarkup-link-ext" rel="noreferrer">MediaWiki-Docker-Dev</a></li>
<li class="remarkup-list-item"><a href="https://www.mediawiki.org/wiki/Selenium/How-to/Run_tests_targeting_MediaWiki-Vagrant" class="remarkup-link remarkup-link-ext" rel="noreferrer">MediaWiki-Vagrant</a></li>
<li class="remarkup-list-item"><a href="https://www.mediawiki.org/wiki/Selenium/How-to/Run_tests_targeting_Quibble" class="remarkup-link remarkup-link-ext" rel="noreferrer">Quibble</a></li>
</ul></li>
<li class="remarkup-list-item">a remote wiki<ul class="remarkup-list">
<li class="remarkup-list-item"><a href="https://www.mediawiki.org/wiki/Selenium/Getting_Started/Run_tests_targeting_Beta_cluster" class="remarkup-link remarkup-link-ext" rel="noreferrer">Beta cluster</a></li>
</ul></li>
<li class="remarkup-list-item">continuous integration<ul class="remarkup-list">
<li class="remarkup-list-item"><a href="https://www.mediawiki.org/wiki/Selenium/How-to/Run_tests_using_Quibble_Jenkins_job" class="remarkup-link remarkup-link-ext" rel="noreferrer">Quibble</a></li>
<li class="remarkup-list-item"><a href="https://www.mediawiki.org/wiki/Selenium/How-to/Run_tests_using_selenium-daily_Jenkins_job" class="remarkup-link remarkup-link-ext" rel="noreferrer">selenium-daily</a></li>
</ul></li>
</ul>

<h2 class="remarkup-header">logLevel</h2>

<p>Change <tt class="remarkup-monospaced">logLevel</tt> in <tt class="remarkup-monospaced">tests/selenium/wdio.conf.js</tt> from the default <tt class="remarkup-monospaced">error</tt> to <tt class="remarkup-monospaced">info</tt>.</p>

<div class="remarkup-code-block" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code">tests/selenium/wdio.conf.js</pre></div>



<div class="remarkup-code-block" data-code-lang="js" data-sigil="remarkup-code-block"><pre class="remarkup-code"><span></span><span class="nx">exports</span><span class="p">.</span><span class="nx">config</span> <span class="o">=</span> <span class="p">{</span>
	<span class="c1">// Level of logging verbosity: trace | debug | info | warn | error | silent</span>
	<span class="nx">logLevel</span><span class="o">:</span> <span class="s1">&#39;info&#39;</span>
<span class="p">};</span></pre></div>



<h2 class="remarkup-header">Run Selenium tests</h2>

<div class="remarkup-code-block" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code">npm run selenium-test</pre></div>

<p>Output will contain a lot of useful debugging information.</p>

<div class="remarkup-code-block" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code">[0-5] 2021-04-01T15:03:41.952Z INFO devtools: COMMAND deleteAllCookies()
[0-5] 2021-04-01T15:03:41.965Z INFO devtools: RESULT null

[0-5] 2021-04-01T15:03:42.841Z INFO devtools: COMMAND navigateTo(&quot;http://localhost:8080/w/index.php?title=Special%3AUserLogin&quot;)
[0-5] 2021-04-01T15:03:43.554Z INFO devtools: RESULT null

[0-5] 2021-04-01T15:03:43.566Z INFO devtools: COMMAND findElement(&quot;css selector&quot;, &quot;#wpName1&quot;)
[0-5] 2021-04-01T15:03:43.571Z INFO devtools: RESULT { &#039;element-6066-11e4-a52e-4f735466cecf&#039;: &#039;ELEMENT-6&#039; }

[0-5] 2021-04-01T15:03:43.577Z INFO devtools: COMMAND elementClear(&quot;ELEMENT-6&quot;)
[0-5] 2021-04-01T15:03:43.584Z INFO devtools: RESULT null

[0-5] 2021-04-01T15:03:43.612Z INFO devtools: COMMAND elementSendKeys(&quot;ELEMENT-6&quot;, &quot;User-0.7731870706237638-Iñtërnâtiônàlizætiøn&quot;)
[0-5] 2021-04-01T15:03:43.730Z INFO devtools: RESULT null

...

[0-5] 2021-04-01T15:03:45.928Z INFO devtools: COMMAND takeScreenshot()
[0-5] 2021-04-01T15:03:46.224Z INFO devtools: RESULT iVBORw0KGgoAAAANSUhEUgAABLAAAAOECAYAAACxbcj6AAABKWlDQ1BTa2lhA...
[0-5] 
        Screenshot location: /Users/z/Documents/gerrit/mediawiki/core/tests/selenium/log/User-should-be-able-to-log-in-%40daily.png</pre></div>



<h2 class="remarkup-header">More information</h2>

<ul class="remarkup-list">
<li class="remarkup-list-item">MediaWiki documentation on running <a href="https://www.mediawiki.org/wiki/Selenium" class="remarkup-link remarkup-link-ext" rel="noreferrer">Selenium</a> tests.</li>
<li class="remarkup-list-item">WebdriverIO <a href="https://webdriver.io/docs/options/#loglevel" class="remarkup-link remarkup-link-ext" rel="noreferrer">loglevel</a> documentation.</li>
<li class="remarkup-list-item">The code from this post is available as Gerrit patch <a href="https://gerrit.wikimedia.org/r/c/mediawiki/core/+/676397/" class="remarkup-link remarkup-link-ext" rel="noreferrer">676397</a>.</li>
</ul></div></content></entry><entry><title>Breakpoint at BrowserStack conferences (2020-2021) - Part 2 Focus on Exploratory testing</title><link href="/phame/live/21/post/237/breakpoint_at_browserstack_conferences_2020-2021_-_part_2_focus_on_exploratory_testing/" /><id>https://phabricator.wikimedia.org/phame/post/view/237/</id><author><name>Etonkovidova (Elena)</name></author><published>2021-04-30T18:08:33+00:00</published><updated>2021-06-14T16:13:21+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Since I was impressed with the depth of presentations at Breakpoint conference (at Browserstack) in July 2021 - see my post <a href="https://phabricator.wikimedia.org/phame/post/view/234/breakpoint_at_browserstack_conferences_2020-2021_-_reflections_and_thoughts/" class="remarkup-link" rel="noreferrer">Breakpoint at BrowserStack conferences (2020-2021) - reflections and thoughts: Part 1 - Focus on Automation</a>, it was really exciting to see that the next conference (March 2021) would be focusing on the intriguing topic of exploratory testing.  The the presentations titles (<a href="https://hopin.com/events/breakpoint" class="remarkup-link remarkup-link-ext" rel="noreferrer">here is the list of all presentations</a>) looked  equally exciting, for example</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">&quot;Manual testing is not dead...just the definition&quot;</li>
<li class="remarkup-list-item">&quot;Whole team holistic quality&quot;</li>
<li class="remarkup-list-item">&quot;Contemporary Exploratory Testing&quot;</li>
<li class="remarkup-list-item">&quot;Building a testing culture&quot;</li>
</ul>

<p>One of the first presentation at the conference -<strong> Building a testing culture at Pinterest </strong> by Jennifer Uviña - provided details of  their success story (and some mistakes that were made) improving the impact of QA team on delivering quality products.  Jennifer described the whole experience as a process of going through three stages -  <span class="remarkup-nav-sequence"><span class="phui-tag-view phui-tag-type-shade phui-tag-grey phui-tag-shade "><span class="phui-tag-core ">Struggling-</span></span><span class="remarkup-nav-sequence-arrow"> → </span><span class="phui-tag-view phui-tag-type-shade phui-tag-grey phui-tag-shade "><span class="phui-tag-core ">Established-</span></span><span class="remarkup-nav-sequence-arrow"> → </span><span class="phui-tag-view phui-tag-type-shade phui-tag-grey phui-tag-shade phui-tag-icon-view "><span class="phui-tag-core "><span class="visual-only phui-icon-view phui-font-fa fa-line-chart" data-meta="0_0" aria-hidden="true"></span>Strong</span></span></span>.  At the Struggling stage <strong>Checklist for change</strong> was proposed and, as it turned out, it was extremely helpful. Their checklist had only three points:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">Why do we need a change?</li>
<li class="remarkup-list-item">How our team would measure the success ( what impact on the product quality)?</li>
<li class="remarkup-list-item">Distribute knowledge</li>
</ul>

<p>Their QA team discovered some specific ways to evolve from the Struggling stage to the Strong stage and Jennifer reviewed what exactly was implemented for their   <strong>Checklist for change</strong></p>

<div class="remarkup-table-wrap"><table class="remarkup-table">
<tr><td><strong>Why do we need a change?</strong></td><td>Start with recurring problems. Evaluate what&#039;s now doesn&#039;t work, set goals, run some tests, demonstrate value, normalize.</td></tr>
<tr><td><strong>How our team would measure the success ( what impact on the product quality)?</strong></td><td>Look at deploys/deploy speed, the rate of roll backs</td></tr>
<tr><td><strong>Distribute knowledge</strong></td><td>the more documentation the better; have an inventory of what is working (and of what&#039;s is not); emphasize the test ownership</td></tr>
<tr></tr>
</table></div>

<p>One of the specific pieces of advice  - there don&#039;t need to be 10 mln tests - less is more in terms of tests, since every test has its cost in terms of maintenance.</p>

<p>Establishing a testing culture that is impactful on delivering a quality product is not only about team processes. In the end, the ultimate question always is - how exactly to do testing?  And immediately the next question - &quot;Do we need to have manual testing at all&quot;? There were three presentations that addressed exactly that - <strong>Manual testing is not dead...just the definition</strong>, <strong>Whole team holistic quality</strong>, and <strong>Contemporary Exploratory Testing</strong>.  Every of these presentation resulted in chat exploded - I did not see before that any of the other topics  (either on July or March conferences) had so many comments, shared thoughts, and, well, just emotional responses. In a sense, reading the chat was as illuminating as listening to those three absolutely superb presentations.</p>

<p><strong>Manual testing is not dead...just the definition </strong>by Erika Chestnut presentation started with describing  an elephant in the room - &quot;The rise of test automation has reduced the manual testers&#039; footprint significantly. We have more and more AI and ML tools that are taking on things like visual regression and providing smart test automation. [...] So where does that leave manual testing? &quot;  Erika showed how manual testing, as an integrated engineering process, is still essential for the product quality.  With a smart term <strong>&quot;Humanual testing&quot;</strong>, Erika stated that  &quot;you cannot have an impactful testing without HUMAN. Manual testers speak language of the customers.&quot;</p>

<p>The comments from chat were in full agreement with the presentation topic and they were insightful on what value manual testing adds:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item"><em>QA becomes Business Analyst most of the time</em> (Mercedes Zendejas)</li>
<li class="remarkup-list-item">(answering to a comment about manual testing being slow and non-effective) [...] <em>the process of testing is the bottleneck - not QA&#039;s</em>; <em>75% of bugs come from bad requirements or conception but some people rely mainly on automation (later) to catch bugs... sorry, too late!</em> (Pascal Brault)</li>
</ul>

<p>So, when in the next presentation - <strong>Whole team holistic quality </strong> by Alexandra Schladebeck, the question &quot;Do we still need testers?&quot; had a Jean-Luc Picard facepalm picture, the chat applauded. <br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/7qxoxc7lny2r5e4ibd4e/PHID-FILE-sryari5fuepbc7l3ip2o/facepalm_picard_2021-03-24_at_9.06.01_AM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_177"><img src="https://phab.wmfusercontent.org/file/data/7qxoxc7lny2r5e4ibd4e/PHID-FILE-sryari5fuepbc7l3ip2o/facepalm_picard_2021-03-24_at_9.06.01_AM.png" width="400" alt="facepalm_picard 2021-03-24 at 9.06.01 AM.png (435×775 px, 284 KB)" /></a></div></p>

<p>Two other presentations - <strong>Contemporary Exploratory Testing</strong> by Maaret Pyhäjärvi and <strong>Agile Tester Toolkit </strong>by Julia Pottinger - were focusing on redefining what exploratory testing includes and on having right tools for exploratory testing. As Maaret pointed out &quot;Contemporary exploratory testing raises from the observation in teams that we too often do a bad job at both manual testing and test automation for the outcomes we seek in projects. What does it look like when we frame the two together, through an example of an application, of testing done and automation created?&quot;  When we look at the agile development process today, the previous QA practices, such as writing tons of tests, obviously are not applicable anymore. What is not fully realized, however, is that having tons of automated tests are not the answer either. Maaret listed several traps that usually were attributed to manual testing, but the automation testing, if the approach to testing is incorrect, would have exactly the same shortcomings as manual testing.</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">Test cases trap</li>
<li class="remarkup-list-item">Bug trap</li>
<li class="remarkup-list-item">Algorithm trap</li>
</ul>

<p>With a well-known saying  &quot;You can&#039;t automate well without exploring. You can&#039;t explore without automation&quot;, the presentation described how to scope exploratory testing correctly by differentiating at what level the exploratory testing is done - a user story level, a feature, and even a software architecture level.</p>

<p><strong>Agile Tester Toolkit </strong> presentation by Julia Pottinger had detailed guidance on how to bring together the intelligence of exploratory testing and efficiency of automated testing by building a tester toolkit. As the first step, a simple visualization might help to see what skills a QA engineer has and what would be great to have: <br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/ev7hwrbb3lhk2c3msdqt/PHID-FILE-o25ymzkxevnvoop26foz/my_toolkit_2021-03-23_at_10.44.23_AM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_178"><img src="https://phab.wmfusercontent.org/file/data/ev7hwrbb3lhk2c3msdqt/PHID-FILE-o25ymzkxevnvoop26foz/my_toolkit_2021-03-23_at_10.44.23_AM.png" width="500" alt="my toolkit 2021-03-23 at 10.44.23 AM.png (449×763 px, 281 KB)" /></a></div> <br />
However, the most interesting to me was the visualization of the process to achieve the goals:</p>

<div class="remarkup-table-wrap"><table class="remarkup-table">
<tr><td><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/a57i5j3p2rg5nlo2srog/PHID-FILE-evvtkmjnzf4z7523nwem/mytoolkit2_2021-03-23_at_10.44.58_AM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_179"><img src="https://phab.wmfusercontent.org/file/data/a57i5j3p2rg5nlo2srog/PHID-FILE-evvtkmjnzf4z7523nwem/mytoolkit2_2021-03-23_at_10.44.58_AM.png" width="300" alt="mytoolkit2 2021-03-23 at 10.44.58 AM.png (439×724 px, 203 KB)" /></a></div></td><td><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/2po7fsilnso5umi6xttt/PHID-FILE-5rlk35sturrxibiber6v/mytoolkit3_2021-03-23_at_10.55.52_AM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_180"><img src="https://phab.wmfusercontent.org/file/data/2po7fsilnso5umi6xttt/PHID-FILE-5rlk35sturrxibiber6v/mytoolkit3_2021-03-23_at_10.55.52_AM.png" width="300" alt="mytoolkit3 2021-03-23 at 10.55.52 AM.png (435×775 px, 283 KB)" /></a></div></td></tr>
<tr></tr>
</table></div>

<p>The point #3 &quot;Dedicate time to learn&quot; sounds as one of the most important to me.</p>

<p>To conclude  - it was great to see shared understanding of the role of exploratory testing in QA process, it was inspiring to get insightful tips of creating better QA practices, and it was fun to share in chat mutual enthusiasm for better testing. Happy testing, everyone!</p></div></content></entry><entry><title>Breakpoint at BrowserStack conferences  (2020-2021) - Part 1 Focus on Automation</title><link href="/phame/live/21/post/234/breakpoint_at_browserstack_conferences_2020-2021_-_part_1_focus_on_automation/" /><id>https://phabricator.wikimedia.org/phame/post/view/234/</id><author><name>Etonkovidova (Elena)</name></author><published>2021-03-31T16:15:32+00:00</published><updated>2021-06-14T16:12:38+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><blockquote><p>“Improving daily work is even more important than doing daily work.”<br />
― Gene Kim, The Phoenix Project: A Novel About IT, DevOps, and Helping Your Business Win</p></blockquote>

<p>I went to two Breakpoint (BrowserStack) conferences - the first one was in July 2020 and  the second was in March 2021.  The table below lists  6 out of 18 presentation that I watched at the Breakpoint conference in July.  The choice which presentations to attend was mostly based on my time availability, so there could be some really interesting presentations that I missed.</p>

<p>Looking at the presentations&#039; titles it&#039;s easy to figure out that the conference main theme was Automation Testing. With the motto &quot;Delivering quality software at speed&quot; the presenters shared their understanding of why testing automation is important and gave some insights into valuable lessons they learned from implementing automation testing in their organizations.</p>

<div class="remarkup-table-wrap"><table class="remarkup-table">
<tr><th>Topic</th><th>Presenter</th></tr>
<tr><td><strong>&quot;Transforming Test methodologies: from manual to robust strategies&quot;</strong></td><td>Todd Eaton, Head of Dev-Ops. <strong>The Weather Company</strong></td></tr>
<tr><td><strong>&quot;WebdriverIO:The next gen Automation Test framework you should know about&quot;</strong></td><td>Kevin Lamping, Senior Front End engineer, <strong>WebdriverIO</strong></td></tr>
<tr><td><strong>&quot;Automating to augment testing&quot;</strong></td><td>Alan Richardson (<em>Evil Tester</em>), Coach &amp; Trainer, <strong>Agile Testing and Development</strong></td></tr>
<tr><td><strong>&quot;Firefox and the push for simpler cross browser testing&quot;</strong></td><td>Maja Frydrychowicz, Senior Software Engineer, <strong>Mozilla</strong></td></tr>
<tr><td><strong>&quot;How we reconstructed our releases at Trivago&quot;</strong></td><td>Benjamin Bischoff, Test Automation Engineer, <strong>Trivago</strong></td></tr>
<tr><td><strong>&quot;Modern automation approaches&quot;</strong></td><td>Priyanka Halder, Sr. Manager, Quality Engineering. <strong>GoodRx</strong></td></tr>
<tr></tr>
</table></div>

<p>Although each presentation by itself probably could be a topic for a separate blog post, I&#039;ll focus here on the ideas that resonated with my thoughts on QA processes and on the role automation testing plays in delivering quality in software products.</p>

<p>Todd Eaton (<strong>&quot;Transforming Test methodologies: from manual to robust strategies&quot;</strong>), strongly  proposed QA-Devops integration, stating  that a QA engineer should be &quot; a release boss&quot;, and &quot;the one who pushes the deployment button&quot;.  Such integration would help creating an optimal framework to increase test coverage which, in turn, would give an immediate feedback on what state the software is.  Alan Richardson (<strong>&quot;Automating to augment testing&quot;</strong>) fully supported that point of view. For him automation testing is a subset of more general automation workflows - basically, it&#039;s a part of dev tools for the build processes, pipelines and other scripting activities.</p>

<p>Re-thinking the place of QA automation Alan Richardson showed a classic Agile test pyramid but with &quot;Manual testing&quot; completely removed, replaced with a small cloud of &quot;Exploratory testing&quot;  which crowns  the pyramid that has all layers dedicated to automation testing.<br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/24uvffn2znui3s3lu2fy/PHID-FILE-zn37dpolro2iyh7xrrve/Screen_Shot_2020-08-02_at_8.50.58_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_181"><img src="https://phab.wmfusercontent.org/file/data/24uvffn2znui3s3lu2fy/PHID-FILE-zn37dpolro2iyh7xrrve/Screen_Shot_2020-08-02_at_8.50.58_PM.png" width="500" alt="Screen Shot 2020-08-02 at 8.50.58 PM.png (601×1 px, 224 KB)" /></a></div></p>

<p>What about a real-life success story of automation testing? Priyanka Halder( <strong>&quot;Modern automation approaches&quot;</strong>)  gave a detailed overview on how automation testing at GoodRx gradually evolved to  play a vital role in ensuring the quality of software products. She mentioned 2,000 tests run for regression and about 600 tests that are run as someone pushes the commit to a pipeline. That variety of tests allowed QA engineers there to run A/B testing and campaign-based testing by quickly create test suites based on features or devices, or even on specific users audiences.</p>

<p>Given massive evidence of many successes for automation testing, the two questions remain</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">what to automate (and how)?</li>
<li class="remarkup-list-item">what communication processes should a QA team implement to be proactive in automation testing?</li>
</ul>

<p>Surprisingly, the two questions above are closely related. Benjamin Bischoff (<strong>&quot;How we reconstructed our releases at Trivago&quot;</strong>) described a disconnected triangle or, in his words, &quot;a triangle of doom&quot;,  when QA team functions separately from  Developers and from Test Automation team. He advocated  &quot;not automation per se - it&#039;s about QA process and people involved into it&quot;.  <br />
 Bischoff&#039;s practical advice -  &quot;Make your test automation user friendly, that would break the &quot;triangle of doom&quot;&quot; finds a support in Todd Eaton presentation.  Todd Eaton described an Automation architect who would define the priorities for developing automation testing tools. <br />
As for the effective communication, Todd Eaton also emphasized that the Test Management with an efficient and user-friendly reporting system must be in place to give immediate and easily-digestible feedback to everyone - managers. devops, developers and, of course, QA engineers.  He demonstrated a QA dashboard  with a sweeping overview of  all tests status and the ability to drill into group of tests or into just a single test to see the detailed info.</p>

<p>Alan Richardson added to the above a checklist with important questions that should be asked before starting automation testing:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">What we can automate?</li>
<li class="remarkup-list-item">What processes do I do and  would it help to automate some of that?</li>
<li class="remarkup-list-item">What I am <strong>not doing</strong>?</li>
<li class="remarkup-list-item">How to balance the time spent on automation  with the risk you’re mitigating?</li>
</ul>

<p>Each of the questions requires a good analysis to grasp what&#039;s needed most at the moment and what&#039;s needed in the long term.</p>

<p>The lessons learned? As I watched the presentations and was reflecting on what the most important to learn there, the two questions I wrote earlier are still valid but they may be re-prioritized (and rephrased) by putting the communication processes (including test management reporting system) first and adding <strong>why?</strong>  (to automate) as the first question to ask:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">what communication processes should a QA team implement to be proactive in automation testing?</li>
<li class="remarkup-list-item"><strong>why</strong>/what/how to automate</li>
</ul>

<p>And I completely agree with what Alan Richardson said concluding his presentation: &quot;Automating is driven by ideas. Don&#039;t let tools dictate what you automate.”</p></div></content></entry><entry><title>Outreachy, December 2020-March 2021</title><link href="/phame/live/21/post/233/outreachy_december_2020-march_2021/" /><id>https://phabricator.wikimedia.org/phame/post/view/233/</id><author><name>zeljkofilipin (Željko Filipin)</name></author><published>2021-03-17T19:19:48+00:00</published><updated>2021-03-23T14:00:05+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p><a href="https://www.mediawiki.org/wiki/Outreachy/Round_21" class="remarkup-link remarkup-link-ext" rel="noreferrer">Outreachy Round</a> 21 has finished! <a href="https://www.vidhimody.me/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Vidhi Mody</a>, <a href="https://www.sohamp.dev/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Soham Parekh</a> and I were mentoring <a href="https://harriet-ayugi.onrender.com/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Harriet Ayugi</a> on project <a href="https://phabricator.wikimedia.org/T262682" class="remarkup-link" rel="noreferrer">Evaluation of Microsoft Playwright</a>.</p>

<h2 class="remarkup-header">Project management</h2>

<p>In the previous internship (<a href="https://phabricator.wikimedia.org/gsoc-june-august-2020" class="remarkup-link" rel="noreferrer">Google Summer of Code, June-August 2020</a>, GSoC) we&#039;ve used the usual Wikimedia tools. <a href="https://phabricator.wikimedia.org" class="remarkup-link" rel="noreferrer">Phabricator</a> for tasks, <a href="https://gerrit.wikimedia.org" class="remarkup-link remarkup-link-ext" rel="noreferrer">Gerrit</a> for code hosting and review and <a href="https://integration.wikimedia.org/ci" class="remarkup-link remarkup-link-ext" rel="noreferrer">Jenkins</a> for continuos integration (CI). It worked well for <a href="https://phabricator.wikimedia.org/T247844" class="remarkup-link" rel="noreferrer">Vidhi&#039;s project</a> but not so well for <a href="https://phabricator.wikimedia.org/T248738" class="remarkup-link" rel="noreferrer">Soham&#039;s project</a>. Since this internship was really similar to Soham&#039;s project, we&#039;ve decided to use <a href="https://github.com/hariclerry/mediawiki" class="remarkup-link remarkup-link-ext" rel="noreferrer">GitHub</a> for tasks, code hosting and review and <a href="https://github.com/features/actions" class="remarkup-link remarkup-link-ext" rel="noreferrer">GitHub Actions</a> for CI.</p>

<h2 class="remarkup-header">Project</h2>

<p>We have roughly split the project into three parts. The setup, the implementation and the report. We estimated each part to roughly 4 weeks. The internship lasted for 12 weeks.</p>

<p>The initial setup, mostly CI, took about 6 weeks. Luckily, implementing the code took about 2 weeks. The report took about 4 weeks. In the end, we had time for everything.</p>

<h2 class="remarkup-header">CI</h2>

<p>CI setup took longer than expected. We&#039;ve tried <a href="https://travis-ci.com/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Travis CI</a> first because Harriet was familiar with it, but it wasn&#039;t easy to store artifacts, like screenshots. Soham suggested GitHub Actions and it worked great. We&#039;ve even managed to set up <a href="https://www.mediawiki.org/wiki/MediaWiki-Docker" class="remarkup-link remarkup-link-ext" rel="noreferrer">MediaWiki-Docker</a> there.</p>

<h2 class="remarkup-header">Local development environment</h2>

<p>I&#039;ve noticed that Harriet could use some improvements to her local development environment, so gave her advice on how to set up <a href="https://code.visualstudio.com/" class="remarkup-link remarkup-link-ext" rel="noreferrer">VSCode</a>, mostly by installing useful extensions.</p>

<ul class="remarkup-list">
<li class="remarkup-list-item"><a href="https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker" class="remarkup-link remarkup-link-ext" rel="noreferrer">Code Spell Checker</a></li>
<li class="remarkup-list-item"><a href="https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint" class="remarkup-link remarkup-link-ext" rel="noreferrer">ESLint</a></li>
<li class="remarkup-list-item"><a href="https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint" class="remarkup-link remarkup-link-ext" rel="noreferrer">markdownlint</a></li>
</ul>

<h2 class="remarkup-header">Mentors</h2>

<p>Outreachy was much easier for me to mentor than GSoC. During GSoC, most of the time I was mentoring 2 interns. It was a lot of fun, but also a lot of work. During Outreachy, there were 3 mentors on 1 intern. Most of the mentoring was done by Vidhi and Soham, so things were much easier this time for me.</p>

<p>I think I did a decent job of letting Vidhi and Soham mentor Harriet, but I&#039;ve sometimes made a mistake of mentoring her too much. I should have focused more on mentoring Vidhi and Soham and let them mentor Harriet. There&#039;s a chance we&#039;ll co-mentor again in the future. I&#039;ll make sure not to mentor the intern myself at all, so Vidhi and Soham could develop as mentors.</p>

<h2 class="remarkup-header">Communication</h2>

<p>We&#039;ve continued with the usual communication tools. We&#039;ve used <a href="https://meet.google.com/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Google Meet</a> for our almost daily video meeting and <a href="https://wikimedia.zulipchat.com" class="remarkup-link remarkup-link-ext" rel="noreferrer">Zulip</a> for chat.</p>

<h2 class="remarkup-header">Blogging</h2>

<p>Harriet wrote a <a href="https://dev.to/hariclerry" class="remarkup-link remarkup-link-ext" rel="noreferrer">blog post</a> every couple of weeks. She posted a few of those posts at my <a href="https://phabricator.wikimedia.org/phame/blog/view/21/" class="remarkup-link" rel="noreferrer">team blog</a>. I don&#039;t think other mentors wrote anything about the internship. (I&#039;ll remind them to do so.) For my first article about the internship see <a href="https://phabricator.wikimedia.org/outreachy-september-november-2020" class="remarkup-link" rel="noreferrer">Outreachy, September-November 2020</a>.</p>

<h2 class="remarkup-header">Report</h2>

<p>We&#039;ve spent a lot of time writing the report. You can see all the <a href="https://github.com/hariclerry/mediawiki/pull/86" class="remarkup-link remarkup-link-ext" rel="noreferrer">discussion</a> at GitHub. There were 199 comments and 25 commits from February 3 to March 1. The report is available at three places.</p>

<ul class="remarkup-list">
<li class="remarkup-list-item"><a href="https://github.com/hariclerry/mediawiki/blob/master/tests/playwright/Report.md" class="remarkup-link remarkup-link-ext" rel="noreferrer">Evaluation of Microsoft Playwright</a> at GitHub</li>
<li class="remarkup-list-item"><a href="https://dev.to/hariclerry/evaluation-of-microsoft-playwright-28oi" class="remarkup-link remarkup-link-ext" rel="noreferrer">Evaluation of Microsoft Playwright</a> at DEV</li>
<li class="remarkup-list-item"><a href="https://phabricator.wikimedia.org/phame/post/view/231/evaluation_of_microsoft_playwright/" class="remarkup-link" rel="noreferrer">Evaluation of Microsoft Playwright</a> at Phabricator</li>
</ul></div></content></entry><entry><title> Evaluation of Microsoft Playwright</title><link href="/phame/live/21/post/231/evaluation_of_microsoft_playwright/" /><id>https://phabricator.wikimedia.org/phame/post/view/231/</id><author><name>Harriet (Harriet Ayugi)</name></author><published>2021-03-02T15:29:23+00:00</published><updated>2021-03-02T15:35:39+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><h3 class="remarkup-header">Table of Contents</h3>

<ul class="remarkup-list">
<li class="remarkup-list-item">Introduction</li>
</ul>

<ul class="remarkup-list">
<li class="remarkup-list-item">Project Background</li>
</ul>

<ul class="remarkup-list">
<li class="remarkup-list-item">WebdriverIO<ul class="remarkup-list">
<li class="remarkup-list-item">Sample WebdriverIO Code</li>
<li class="remarkup-list-item">Mocha]</li>
<li class="remarkup-list-item">Sample Mocha Code</li>
<li class="remarkup-list-item">WebdriverIO Advantages</li>
<li class="remarkup-list-item">WebdriverIO Disadvantages</li>
</ul></li>
</ul>

<ul class="remarkup-list">
<li class="remarkup-list-item">Playwright<ul class="remarkup-list">
<li class="remarkup-list-item">Sample Playwright Code</li>
<li class="remarkup-list-item">Jest</li>
<li class="remarkup-list-item">Sample Jest Code</li>
<li class="remarkup-list-item">Playwright Advantages</li>
<li class="remarkup-list-item">Playwright Disadvantages</li>
</ul></li>
</ul>

<ul class="remarkup-list">
<li class="remarkup-list-item">Playwright Vs WebdriverIO<ul class="remarkup-list">
<li class="remarkup-list-item">Statistics</li>
<li class="remarkup-list-item">MediaWiki Core Tests</li>
<li class="remarkup-list-item">Migrating From WebdriverIO</li>
<li class="remarkup-list-item">Advantages</li>
<li class="remarkup-list-item">Disadvantages</li>
</ul></li>
</ul>

<ul class="remarkup-list">
<li class="remarkup-list-item">What Next</li>
</ul>

<ul class="remarkup-list">
<li class="remarkup-list-item">Summary</li>
</ul>

<ul class="remarkup-list">
<li class="remarkup-list-item">Acknowledgement</li>
</ul>

<ul class="remarkup-list">
<li class="remarkup-list-item">References</li>
</ul>

<h3 class="remarkup-header">Introduction</h3>

<p>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&#039;t entirely depend on end-to-end testing but it surely helps to detect bugs in applications, among other benefits.</p>

<p>Below are some of the popular test automation frameworks being used;</p>

<ul class="remarkup-list">
<li class="remarkup-list-item"><a href="https://www.selenium.dev/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Selenium</a> (<a href="https://webdriver.io/" class="remarkup-link remarkup-link-ext" rel="noreferrer">WebdriverIO</a>)</li>
<li class="remarkup-list-item"><a href="https://developers.google.com/web/tools/puppeteer/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Puppeteer</a></li>
<li class="remarkup-list-item"><a href="https://www.cypress.io/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Cypress</a></li>
<li class="remarkup-list-item"><a href="https://playwright.dev/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Playwright</a></li>
</ul>

<p>Playwright maybe the new kid on the block but it&#039;s gaining quite a trajectory among software developers and testers.</p>

<h3 class="remarkup-header">Project Background</h3>

<p>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.</p>

<p>At the time of choosing which automation framework to use in the implementation of the test automation, extensive research was done and an <a href="https://filipin.eu/selenium-javascript" class="remarkup-link remarkup-link-ext" rel="noreferrer">evaluation of WebdriverIO</a> 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 <a href="https://www.mediawiki.org/wiki/User:SimTran" class="remarkup-link remarkup-link-ext" rel="noreferrer">Sim T.H. Tran</a>. These evaluations can be found in the links below;</p>

<ul class="remarkup-list">
<li class="remarkup-list-item"><a href="https://www.mediawiki.org/wiki/User:SimTran/Cypress_vs_WebdriverIO:_What_are_the_differences%3F" class="remarkup-link remarkup-link-ext" rel="noreferrer">Cypress Evaluation</a> by Sim T.H. Tran.</li>
<li class="remarkup-list-item"><a href="https://www.sohamp.dev/blog/2020-08-24-wmf-gsoc2020/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Puppeteer Evaluation</a> by Soham Parekh.</li>
</ul>

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

<ul class="remarkup-list">
<li class="remarkup-list-item">Configuring and setting up of Wikimedia Core to run on continuous integration, in this case on <a href="https://docs.github.com/en/actions" class="remarkup-link remarkup-link-ext" rel="noreferrer">Github Actions</a>.</li>
<li class="remarkup-list-item">Implementation of all MediaWiki Core tests in Playwright.</li>
<li class="remarkup-list-item">Running MediaWiki Core tests in WebdriverIO.</li>
<li class="remarkup-list-item">Analysis of both WebdriverIO and Playwright tests in terms of speed and stability.</li>
</ul>

<h3 class="remarkup-header">WebdriverIO</h3>

<p>WebdriverIO is a test automation framework that allows you to run tests based on the WebDriver protocol and Appium automation technology.</p>

<p>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 <a href="https://www.npmjs.com/package/fibers" class="remarkup-link remarkup-link-ext" rel="noreferrer">node-fibers</a>. Both of these options have their own benefits and issues which can be found on the <a href="https://webdriver.io/docs/sync-vs-async" class="remarkup-link remarkup-link-ext" rel="noreferrer">WebdriverIO</a> website.</p>

<h4 class="remarkup-header">Sample WebdriverIO Code</h4>

<p>The code snippet below navigates to wikipedia.org in Chrome and checks if the correct title is being displayed.</p>

<div class="remarkup-code-block" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code">const { remote } = require(&#039;webdriverio&#039;);

(async () =&gt; {
 const browser = await remote({
        capabilities: {
            browserName: &#039;chrome&#039;
        }
  });
  await browser.url(&#039;https://www.wikipedia.org/&#039;);

  const title = await browser.getTitle();
  expect(title).toHaveTitle(&#039;The Free Encyclopedia&#039;);

  await browser.deleteSession();
})();</pre></div>



<h4 class="remarkup-header">Mocha</h4>

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

<p>WebdriverIO provides an adapter for Mocha which can easily be added as <tt class="remarkup-monospaced">@wdio/mocha-framework</tt>.</p>

<h4 class="remarkup-header">Sample Mocha Code</h4>

<p>The code snippet below navigates to wikipedia.org in Chrome and checks if the correct title is being displayed.</p>

<div class="remarkup-code-block" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code">const { remote } = require(&#039;webdriverio&#039;);

describe(&#039;Wikipedia home page&#039;, async() =&gt; {
  const browser = await remote({
        capabilities: {
            browserName: &#039;chrome&#039;
        }
  });

  it(&#039;should display correct page title&#039;, async() =&gt; {
    await browser.url(&#039;https://www.wikipedia.org/&#039;);

    expect(browser).toHaveTitle(&#039;The Free Encyclopedia&#039;);
    
    await browser.deleteSession();
  });
})();</pre></div>



<h4 class="remarkup-header">WebdriverIO Advantages</h4>

<p>WebdriverIO offers some great pros such as;</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">Extendable, adding helper functions, or more complicated sets and combinations of existing commands is simple and really useful.</li>
<li class="remarkup-list-item">It&#039;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.</li>
<li class="remarkup-list-item">Rich feature with huge variety of community plugins that allows you to easily integrate and extend your setup to fulfill your requirements.</li>
<li class="remarkup-list-item">Stable features.</li>
<li class="remarkup-list-item">Synchronous implementation of asynchronous browser commands.</li>
<li class="remarkup-list-item">Excellent API documentation.</li>
<li class="remarkup-list-item">Support for modern web and mobile frameworks.</li>
</ul>

<h4 class="remarkup-header">WebdriverIO Disadvantages</h4>

<p>WebdriverIO also presents some cons such as;</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">Additional effort to set up browser driver with selenium-standalone or ChromeDriver especially in v5 and below.</li>
<li class="remarkup-list-item">Much slower compared to frameworks like Playwright and Puppeteer.</li>
</ul>

<p>To explore more WebdriverIO capabilities, you can check out the WebdriverIO and <a href="https://www.mediawiki.org/wiki/Selenium" class="remarkup-link remarkup-link-ext" rel="noreferrer">MediaWiki documentation</a>.</p>

<h3 class="remarkup-header">Playwright</h3>

<p>Playwright is a Node.js library to automate Chromium, Firefox, and WebKit with a single API.</p>

<p>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 <a href="https://playwright.tech/blog/record-your-browser-tests-with-playwright" class="remarkup-link remarkup-link-ext" rel="noreferrer">playwright-video and ffmpeg</a> but they all blend in with Playwright seamlessly.</p>

<h4 class="remarkup-header">Sample Playwright Code</h4>

<p>The code snippet below navigates to wikipedia.org in Chrome and checks if the correct title is being displayed.</p>

<div class="remarkup-code-block" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code">const { chromium } = require(&#039;playwright&#039;);
const expect = require(&#039;expect-playwright&#039;);

(async () =&gt; {
  let browser, page;
  browser = await chromium.launch();
  page = await browser.newPage();
  await page.goto(&#039;https://www.wikipedia.org/&#039;);

  const title = await page.$(&#039;.localized-slogan&#039;);
  await expect(title).toEqualText(&#039;The Free Encyclopedia&#039;);

  await browser.close();
})();</pre></div>



<h4 class="remarkup-header">Jest</h4>

<p><a href="https://jestjs.io/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Jest</a> 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 <a href="https://github.com/playwright-community/jest-playwright" class="remarkup-link remarkup-link-ext" rel="noreferrer">jest-playwright</a> which has rich features like:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">Multi-browser and device (like iPhones with given screen sizes) support.</li>
<li class="remarkup-list-item">jest-dev-server integration which can start your webserver like create-react-app before running the tests.</li>
<li class="remarkup-list-item">expect-playwright integration which provides common expect helper functions.</li>
</ul>

<p>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 <a href="https://github.com/smooth-code/jest-puppeteer/blob/master/README.md#start-a-server" class="remarkup-link remarkup-link-ext" rel="noreferrer">jest-puppeteer</a>.</p>

<h4 class="remarkup-header">Sample Jest Code</h4>

<p>The code snippet below navigates to wikipedia.org in Chrome and checks if the correct title is being displayed.</p>

<div class="remarkup-code-block" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code">const { chromium } = require(&#039;playwright&#039;);

describe(&#039;Wikipedia home page&#039;, async() =&gt; {
  let browser, page;
  browser = await chromium.launch();
  page = await browser.newPage();

  it(&#039;should display correct page title&#039;, async() =&gt; {
  await page.goto(&#039;https://www.wikipedia.org/&#039;);

  const title = await page.title();
  await expect(title).toBe(&#039;The Free Encyclopedia&#039;);

  await browser.close();
})
})();</pre></div>



<h4 class="remarkup-header">Playwright Advantages</h4>

<p>Playwright offers some great pros such as;</p>

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

<h4 class="remarkup-header">Playwright Disadvantages</h4>

<p>Playwright also presents some cons such as;</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">It is very new so the APIs are evolving.</li>
<li class="remarkup-list-item">Has no support for IE11 or non-browser platforms.</li>
<li class="remarkup-list-item">Documentations and community are not as good as the other framework yet.</li>
</ul>

<p>To explore more on Playwright capability, you can check out the Playwright documentation and my <a href="https://github.com/hariclerry/mediawiki/tree/master/tests/playwright" class="remarkup-link remarkup-link-ext" rel="noreferrer">MediaWiki Core fork</a>.</p>

<h3 class="remarkup-header">Playwright Vs WebdriverIO</h3>

<p>The below table is a comparison between Playwright and WebdriverIO in terms of;</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">Performance</li>
<li class="remarkup-list-item">Developer Experience</li>
<li class="remarkup-list-item">Documentation</li>
<li class="remarkup-list-item">Ecosystem/Community</li>
</ul>

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



<h4 class="remarkup-header">Statistics</h4>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/tp7ki4dcwbiifbhmoms6/PHID-FILE-2a6fkitu57ve2wm6cwkk/statistics.png" class="phabricator-remarkup-embed-image-full" data-sigil="lightboxable" data-meta="0_182"><img src="https://phab.wmfusercontent.org/file/data/tp7ki4dcwbiifbhmoms6/PHID-FILE-2a6fkitu57ve2wm6cwkk/statistics.png" height="1332" width="2402" loading="lazy" alt="statistics.png (1×2 px, 255 KB)" /></a></div></p>

<p>The above data was adopted from <a href="https://www.npmtrends.com/cypress-vs-playwright-vs-puppeteer-vs-selenium-vs-testcafe" class="remarkup-link remarkup-link-ext" rel="noreferrer">npm trends</a> 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.</p>

<h4 class="remarkup-header">MediaWiki Core Tests</h4>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/n2ubvvk6wgv7sccwd4e2/PHID-FILE-37kmabhunkz4iqzwkxqs/evaluation-chart.png" class="phabricator-remarkup-embed-image-full" data-sigil="lightboxable" data-meta="0_183"><img src="https://phab.wmfusercontent.org/file/data/n2ubvvk6wgv7sccwd4e2/PHID-FILE-37kmabhunkz4iqzwkxqs/evaluation-chart.png" height="453" width="1189" loading="lazy" alt="evaluation-chart.png (453×1 px, 39 KB)" /></a></div></p>

<p>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.</p>

<p>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.</p>

<p>The above chart further shows that Playwright is much faster than WebdriverIO in terms of speed.</p>

<h4 class="remarkup-header">Migrating From WebdriverIO</h4>

<p>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.</p>

<h4 class="remarkup-header">Advantages</h4>

<ul class="remarkup-list">
<li class="remarkup-list-item">WebdriverIO is <a href="https://en.wikipedia.org/wiki/JavaScript" class="remarkup-link remarkup-link-ext" rel="noreferrer">JavaScript</a> based and is built over <a href="https://en.wikipedia.org/wiki/Node.js" class="remarkup-link remarkup-link-ext" rel="noreferrer">Node.js</a> 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.</li>
<li class="remarkup-list-item">The MediaWiki Core test implementation follows the Page Object Pattern, this would make it easy to write Playwright tests using the existing structure.</li>
<li class="remarkup-list-item">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.</li>
</ul>

<h4 class="remarkup-header">Disadvantages</h4>

<ul class="remarkup-list">
<li class="remarkup-list-item">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.</li>
<li class="remarkup-list-item">Update of documentation. Most documentation is already written and has references to WebdriverIO. Updating the documentation would require some time.</li>
<li class="remarkup-list-item">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.</li>
</ul>

<h3 class="remarkup-header">What Next</h3>

<ul class="remarkup-list">
<li class="remarkup-list-item">Refactor existing tests.</li>
<li class="remarkup-list-item">Evaluate Puppeteer.</li>
</ul>

<h3 class="remarkup-header">Summary</h3>

<p>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 <a href="https://webdriver.io/blog/2021/02/09/webdriverio-v7-released/" class="remarkup-link remarkup-link-ext" rel="noreferrer">WebdriverIO v7</a> 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.</p>

<h3 class="remarkup-header">Acknowledgement</h3>

<p>The completion of this project wouldn&#039;t have been a success without the support of my mentors, <a href="https://filipin.eu/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Željko Filipin</a>, <a href="https://www.vidhimody.me/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Vidhi Mody</a> and <a href="https://www.sohamp.dev/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Soham Parekh</a>. 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.</p>

<h3 class="remarkup-header">References</h3>

<ul class="remarkup-list">
<li class="remarkup-list-item"><a href="https://www.testim.io/blog/puppeteer-selenium-playwright-cypress-how-to-choose/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Puppeteer, Selenium, Playwright, Cypress – how to choose?</a> by Benjamin Gruenbaum.</li>
<li class="remarkup-list-item"><a href="https://playwright.tech/blog/using-jest-with-playwright" class="remarkup-link remarkup-link-ext" rel="noreferrer">Using Jest with Playwright</a> by Max Schmitt.</li>
<li class="remarkup-list-item"><a href="https://2020.stateofjs.com/en-US/technologies/testing/#testing_experience_ranking" class="remarkup-link remarkup-link-ext" rel="noreferrer">State of JS 2020: Testing</a> by Sacha Greif and Raphaël Benitte.</li>
<li class="remarkup-list-item"><a href="https://github.com/playwright-community/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Playwright Community</a>.</li>
</ul></div></content></entry><entry><title>Eventlogging journey </title><link href="/phame/live/21/post/230/eventlogging_journey/" /><id>https://phabricator.wikimedia.org/phame/post/view/230/</id><author><name>Etonkovidova (Elena)</name></author><published>2021-02-28T19:28:21+00:00</published><updated>2021-03-07T20:38:11+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">

<blockquote><p>“I felt in need of a great pilgrimage, so I sat still for three days.”  <a href="https://en.wikipedia.org/wiki/Hafez" class="remarkup-link remarkup-link-ext" rel="noreferrer">Hafiz</a></p></blockquote>

<p>In <a href="https://phabricator.wikimedia.org/phame/post/view/225/exempla_docent_-_testing_instrumentation_on_special_homepage_qa_perspective/" class="remarkup-link" rel="noreferrer">Testing instrumentation on Special:Homepage (QA perspective)</a> the general, step-by-step testing approach was described and  Special:Homepage was used as a specific example.</p>

<blockquote><p><span class="visual-only phui-icon-view phui-font-fa fa-hand-o-right" data-meta="0_191" aria-hidden="true"></span> <em><strong>Special:Homepage </strong>with the SE module is enabled by default for most of the new accounts on participating wikis, e.g. <tt class="remarkup-monospaced">testwiki</tt>, <tt class="remarkup-monospaced">cswiki</tt>, <tt class="remarkup-monospaced">svwiki</tt>, or <tt class="remarkup-monospaced">arwiki</tt>. On betacluster <strong>Special:Homepage</strong> is enabled not only on the mentioned wikis but also on <tt class="remarkup-monospaced">enwiki</tt>.  For existing user accounts Special:Homepage  can be enabled via Special:Preferences option </em><strong>Newcomer homepage</strong> in User profile tab settings.</p></blockquote>

<p>This post adds more details on QA process for error validation.  Let&#039;s start with a story. <br />
On the Special:Homepage a banner module was added to inform users visiting Special:Homepage on new community events or campaigns.<br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/n2tpeqovak4nj57rlbws/PHID-FILE-vio5jv4rrceplx55e372/Screen_Shot_2021-02-28_at_10.37.43_AM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_184"><img src="https://phab.wmfusercontent.org/file/data/n2tpeqovak4nj57rlbws/PHID-FILE-vio5jv4rrceplx55e372/Screen_Shot_2021-02-28_at_10.37.43_AM.png" width="600" alt="Screen Shot 2021-02-28 at 10.37.43 AM.png (741×1 px, 143 KB)" /></a></div><br />
 The data on users&#039; banner clicks would provide valuable information on how Special:Homepage helps communities to increase users&#039; participation. To measure how many users click on the banner, a new event was added to the HomepageModule schema.</p>

<p>However, when the banner module was deployed, the issue was reported - <a href="https://phabricator.wikimedia.org/T273084" class="remarkup-link" rel="noreferrer">HomepageModule events with validation errors</a>. Since the QA task was to verify whether the event - a user clicking on the banner - is correctly recorded, the question is -  why validation errors were not caught during the testing?</p>

<p>There are several places where errors (or overlooks) might happen. To minimize failures and ensure that events are recorded as expected,  the testing should happen in stages. The first step is to check the schema itself - <a href="https://schema.wikimedia.org/#!//secondary/jsonschema/analytics/legacy/homepagemodule" class="remarkup-link remarkup-link-ext" rel="noreferrer">the HomepageModuleschema description page</a> to see  if the <tt class="remarkup-monospaced">banner</tt> module, indeed, has been added and the expected actions -  including <tt class="remarkup-monospaced">link-click</tt> - are listed:</p>

<div class="remarkup-table-wrap"><table class="remarkup-table">
<tr><td><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/cu3iph5s2gbbrcdfncjh/PHID-FILE-rr7bhgwcggeh7rej35hf/Screen_Shot_2021-02-27_at_6.09.56_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_185"><img src="https://phab.wmfusercontent.org/file/data/cu3iph5s2gbbrcdfncjh/PHID-FILE-rr7bhgwcggeh7rej35hf/Screen_Shot_2021-02-27_at_6.09.56_PM.png" width="300" alt="Screen Shot 2021-02-27 at 6.09.56 PM.png (347×768 px, 47 KB)" /></a></div></td><td><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/6maph3j4hhvk3ydbocah/PHID-FILE-ffr27euoanrzfv4mn7u2/new-scema_description.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_186"><img src="https://phab.wmfusercontent.org/file/data/gve63cupb7lebrlxwzsh/PHID-FILE-ayc62dnbm7jg7ybpognb/preview-new-scema_description.png" width="220" height="82.06599713056" alt="new-scema_description.png (260×697 px, 28 KB)" /></a></div></td></tr>
<tr></tr>
</table></div>

<p>Then, the testing should start with triggering users&#039; action - visiting Special:Homepage and clicking on the banner and see if the event will be recorded.  There are couple of extremely helpful javascript snippets that can be entered into the Console and the events can be viewed. <br />
<strong>1. Showing all instrumentation schemas on a page</strong> (credits to <a href="https://phabricator.wikimedia.org/p/Catrope/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_192"><span class="phui-tag-core phui-tag-color-person">@Catrope</span></a>)</p>

<div class="remarkup-code-block" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code">mw.loader.using( &#039;mediawiki.api&#039; ).then( function () { new mw.Api().saveOption( &#039;eventlogging-display-web&#039;, &#039;1&#039; ); } );</pre></div>

<p>Here how it looks - Special:Homepage has few schemas: <br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/lke3xljkq3wux2tn32t7/PHID-FILE-tygugyj6i27qeewr6jnb/Homepage_all_schemas.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_187"><img src="https://phab.wmfusercontent.org/file/data/lke3xljkq3wux2tn32t7/PHID-FILE-tygugyj6i27qeewr6jnb/Homepage_all_schemas.png" width="500" alt="Homepage_all_schemas.png (684×1 px, 184 KB)" /></a></div></p>

<p><strong>2.  Showing HomepageModule schema events on a page</strong> (credits to <a href="https://phabricator.wikimedia.org/p/kostajh/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_193"><span class="phui-tag-core phui-tag-color-person">@kostajh</span></a>)</p>

<div class="remarkup-code-block" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code">mw.trackSubscribe(&#039;event.HomepageModule&#039;, console.log);</pre></div>

<p>The HomepageModule schema  events will be visible in the Console.<br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/oumhqtraobxegp6vcndz/PHID-FILE-gxasp5esngz6wmjwt27h/Homepage_schema_events.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_188"><img src="https://phab.wmfusercontent.org/file/data/oumhqtraobxegp6vcndz/PHID-FILE-gxasp5esngz6wmjwt27h/Homepage_schema_events.png" width="400" alt="Homepage_schema_events.png (756×1 px, 297 KB)" /></a></div></p>

<blockquote><p><span class="visual-only phui-icon-view phui-font-fa fa-hand-o-right" data-meta="0_194" aria-hidden="true"></span> <em> Persistent log checkbox should be checked, otherwise the event of clicking on the banner won&#039;t be present in the Console</em>.</p></blockquote>

<p>The banner related event(s) can be filtered and reviewed for completeness. <br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/72b4mxfsr64fhf2raed3/PHID-FILE-h6it4jwg7xrbnoiyhetf/banner_impression.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_189"><img src="https://phab.wmfusercontent.org/file/data/72b4mxfsr64fhf2raed3/PHID-FILE-h6it4jwg7xrbnoiyhetf/banner_impression.png" width="400" alt="banner_impression.png (754×1 px, 222 KB)" /></a></div></p>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/4w46i7m4yem5nqetl53w/PHID-FILE-xqgvd3huhoszp3vpsfa3/banner_link_click.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_190"><img src="https://phab.wmfusercontent.org/file/data/4w46i7m4yem5nqetl53w/PHID-FILE-xqgvd3huhoszp3vpsfa3/banner_link_click.png" width="400" alt="banner_link_click.png (134×1 px, 54 KB)" /></a></div></p>

<p>The front-end instrumentation testing for the new banner module is finished. Does it mean that the  event validation is all good too? The front-end testing can be done reliably in betalabs but the validation happens differently and quite often cannot be seen from the front end.   Here is a twist - presently betalabs does not have a convenient way to check for the eventlogging validation errors.    To see the validation errors for the schemas only production logstash can present the full pictures for the eventlogging validation.<br />
. <br />
What is logstash?  From <a href="https://wikitech.wikimedia.org/wiki/Logstash" class="remarkup-link remarkup-link-ext" rel="noreferrer">the  wikitech page</a></p>

<blockquote><p>Logstash is a tool for managing events and logs. When used generically, the term encompasses a larger system of log collection, processing, storage and searching activities.</p></blockquote>

<p>And from the following <a href="https://www.tutorialspoint.com/logstash/logstash_introduction.htm" class="remarkup-link remarkup-link-ext" rel="noreferrer">logstash introduction</a></p>

<blockquote><p>Logstash is an open-source, centralized, events and logging manager. It is a part of the ELK (ElasticSearch, Logstash, Kibana) stack.</p></blockquote>

<p>All the above sound really helpful for doing proper instrumentation QA, but the betalabs logstash presently is unable to provide any information on eventlogging validation errors.  The only option to see what gets stored for betalabs eventlogging is to watch the following stream (and <tt class="remarkup-monospaced">grep</tt> for getting the event info ) for the events that are being tested:</p>

<div class="remarkup-code-block" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code">@deployment-eventlog05:~$ kafkacat -C -t eventlogging_HomepageModule -b deployment-kafka-jumbo-2.deployment-prep.eqiad.wmflabs:9092 -c 10 -o -10</pre></div>

<p>As a result, the close monitoring the production logstash becomes really important. As soon as the deployment of updated schema is done to <tt class="remarkup-monospaced">testwiki</tt>, the eventlogging testing should be rechecked to make sure that front-end actions are not resulted in validation errors.   The logstash dashboard -  <tt class="remarkup-monospaced">eventgate-validation</tt> is a perfect reporting tool and should be checked during testing instrumentation on production.</p>

<p><strong><em>Read more: </em></strong></p>

<ol class="remarkup-list">
<li class="remarkup-list-item"><a href="https://wikitech.wikimedia.org/wiki/Event_Platform/Instrumentation_How_To#In_beta" class="remarkup-link remarkup-link-ext" rel="noreferrer">Event Platform/Instrumentation How To</a> - specifically, how to check eventlogging on  betacluster,</li>
<li class="remarkup-list-item"><a href="https://jdlrobson.com/posts/2020-09-28_diving-into-wikipedia-s-ocean-of-errors-a6b6be92bf2e" class="remarkup-link remarkup-link-ext" rel="noreferrer">Diving into Wikipedia&#039;s ocean of errors</a> - a developer&#039;s perspective on how to keep the level of reported errors in logstash manageable</li>
<li class="remarkup-list-item"><a href="https://www.mediawiki.org/wiki/Wikimedia_Product/Better_use_of_data/Event_Platform_Clients" class="remarkup-link remarkup-link-ext" rel="noreferrer">Wikimedia Product/Better use of data</a></li>
</ol>

</div></content></entry><entry><title>Testing search in MediaSearch - Part 1</title><link href="/phame/live/21/post/226/testing_search_in_mediasearch_-_part_1/" /><id>https://phabricator.wikimedia.org/phame/post/view/226/</id><author><name>Etonkovidova (Elena)</name></author><published>2021-01-31T20:52:09+00:00</published><updated>2021-06-29T01:23:45+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><blockquote><p>The secret of getting ahead is getting started. The secret of getting started is breaking your complex overwhelming tasks into small manageable tasks, and then starting on the first one.<br />
—Mark Twain</p></blockquote>



<h5 class="remarkup-header">Prep work</h5>

<p>Search is  <em>sine que non</em> - a necessary component for making information accessible, so users and communities across wikimedia projects could effectively <a href="https://wikimediafoundation.org/about/mission/" class="remarkup-link remarkup-link-ext" rel="noreferrer">&quot;share in the sum of all knowledge&quot;</a>.   Since <a href="https://commons.wikimedia.org/wiki/Special:MediaSearch?type=bitmap" class="remarkup-link remarkup-link-ext" rel="noreferrer">Special:MediaSearch</a> offers a new way of searching media (image, audio, video) and other files and pages, it is critical to have a thorough QA analysis of how well the new search answers users&#039; expectations. However, the question of what makes the search efficient or whether the search works well at all is not an easy one. For example, the   <a href="https://meta.wikimedia.org/wiki/Research:Measuring_User_Search_Satisfaction" class="remarkup-link remarkup-link-ext" rel="noreferrer">Measuring User Search Satisfaction</a> research has found the quality of the search performance quite challenging to assess:</p>

<blockquote><p>&quot;On desktop alone, 64 million searches are made a day [...]. This makes measuring how well the system is doing of paramount concern, and we don&#039;t currently have a good way of doing that.&quot;</p></blockquote>

<p>Well, what exactly could be tested then?  What aspects of the search functionality are to be tested and how they should be tested?</p>

<p>Following the first part of Mark Twain&#039;s advice -  <em>The secret of getting ahead is getting started </em>- we can start with understanding of what MediaSearch is supposed to do. The following description (see <a href="https://commons.wikimedia.org/wiki/Commons:Structured_data/Media_search" class="remarkup-link remarkup-link-ext" rel="noreferrer">Commons:Structured data/Media search</a>) gives a concise review of the context for  MediaSearch and, more importantly, it gives specific guidelines for starting to map the goals for the high-level QA analysis:</p>

<blockquote><p>Special:MediaSearch is an alternative, image-focused way to find media on Commons that is being developed. MediaSearch uses categories, structured data and wikitext from Commons, and Wikidata to find its results.</p></blockquote>

<p>Looking closely at the description and breaking it into smaller chunks (following the next part of Mark Twain&#039;s advice  -<em>The secret of getting started is breaking your complex overwhelming tasks into small manageable tasks</em>), the QA analysis for the future testing gets some specificity. The table below maps specific parts of the description to the high-level QA tasks.</p>

<div class="remarkup-table-wrap"><table class="remarkup-table">
<tr><th>Description</th><th>QA analysis</th></tr>
<tr><td>&quot;an alternative way to find media&quot;</td><td><strong>Special:MediaSearch</strong> should be compared with <strong>Special:Search</strong> to see how the new search functionality performs.</td></tr>
<tr><td>&quot;image-focused way&quot;</td><td>It would be important to see how images are displayed -  image quality, the positioning of images, images&#039; meta info etc.</td></tr>
<tr><td>&quot;MediaSearch uses categories, structured data and wikitext&quot;</td><td>The testing should be segmented into clusters of tests based on overall search functionality.</td></tr>
<tr></tr>
</table></div>

<p>Now the Special:MediaSearch page  looks as a test map with the areas for testing: <br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/2gccbvobxomjzt3x7q75/PHID-FILE-4aq2yggxio2sdyxcegk3/Screen_Shot_2021-01-30_at_3.05.31_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_195"><img src="https://phab.wmfusercontent.org/file/data/2gccbvobxomjzt3x7q75/PHID-FILE-4aq2yggxio2sdyxcegk3/Screen_Shot_2021-01-30_at_3.05.31_PM.png" width="700" alt="Screen Shot 2021-01-30 at 3.05.31 PM.png (669×1 px, 823 KB)" /></a></div></p>

<h5 class="remarkup-header">Testing search</h5>

<p>After breaking the big task (the task of testing Special:MediaSearch page functionality) into manageable tasks, we need to start on the first one - testing the search.  The drawing below provides an overview of segmenting the search test cases.  The segmentation has resulted from reading documentation - <a href="https://en.wikipedia.org/wiki/Help:Searching" class="remarkup-link remarkup-link-ext" rel="noreferrer">Help:Searching</a> and <a href="https://www.mediawiki.org/wiki/Help:CirrusSearch" class="remarkup-link remarkup-link-ext" rel="noreferrer">Help:CirrusSearch</a> and from  previous experience with testing the search functionality for the wikipedia apps. <br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/5vgmrpu6mnknnlnmxfu5/PHID-FILE-onyl6twztjlbtkf4l4te/Screen_Shot_2021-01-31_at_12.50.34_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_196"><img src="https://phab.wmfusercontent.org/file/data/5vgmrpu6mnknnlnmxfu5/PHID-FILE-onyl6twztjlbtkf4l4te/Screen_Shot_2021-01-31_at_12.50.34_PM.png" width="500" alt="Screen Shot 2021-01-31 at 12.50.34 PM.png (552×708 px, 109 KB)" /></a></div><br />
After identifying the segments, the next two steps are writing the specific test cases in a google spreadsheet document and  getting them reviewed by the Structured Data team developers. The reviewing step is vital to make sure that all  important search options would be tested. The spreadsheet with test cases acted as a working document not only for storing the test cases, but for comparing the MediaSearch test results to  Special:Search testing and for communicating the test results back to the team. The screenshot below shows the part of the tests spreadsheet with the test cases (for Search and MediaSearch). The highlighted cells and notes indicate that the results should either be discussed or followed up with more testing. <br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/vjsnkk42hd2vtazolfpb/PHID-FILE-7vcmykf6q6cpdhfmeied/Screen_Shot_2021-01-31_at_9.40.24_AM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_197"><img src="https://phab.wmfusercontent.org/file/data/vjsnkk42hd2vtazolfpb/PHID-FILE-7vcmykf6q6cpdhfmeied/Screen_Shot_2021-01-31_at_9.40.24_AM.png" width="600" alt="Screen Shot 2021-01-31 at 9.40.24 AM.png (559×920 px, 93 KB)" /></a></div><br />
Although testing was primarily focused on comparing search functionality between Search and MediasSearch, some UX issues resurfaced as well. For example, there were inconsistencies in auto-completing/auto-suggesting behavior,  and couple of performance issues needed attention as well as some issues with UX - e.g. empty search communication, the behavior of the cancel button (the &#039;x&#039; button) etc.  <br />
The prep QA analysis - reading the documentation, creating testing segmentation and test cases discussion -  paid off. Testing search functionality on Special:Media Search page  has helped to increase understanding of what users should expect from the new search.   As a result, the new search - MeidaSearch -  is efficient and robust, and it serves the users&#039; expectations better.</p></div></content></entry><entry><title>Exempla Docent - Testing instrumentation on Special:Homepage (QA perspective)</title><link href="/phame/live/21/post/225/exempla_docent_-_testing_instrumentation_on_special_homepage_qa_perspective/" /><id>https://phabricator.wikimedia.org/phame/post/view/225/</id><author><name>Etonkovidova (Elena)</name></author><published>2020-12-31T03:47:24+00:00</published><updated>2021-03-01T08:38:04+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Two previous posts -<em> Exempla Docent</em>  <a href="https://phabricator.wikimedia.org/phame/post/view/216/exempla_docent_-_testing_ores_articletopic_model/" class="remarkup-link" rel="noreferrer">Part 1</a> and <a href="https://phabricator.wikimedia.org/phame/post/view/222/exempla_docent_-_testing_ui_for_suggested_edits_module/" class="remarkup-link" rel="noreferrer">Part 2</a> outlined QA approach to testing functionality of the Suggested edits (SE) module on <a href="https://www.mediawiki.org/wiki/Growth/Personalized_first_day/Newcomer_homepage" class="remarkup-link remarkup-link-ext" rel="noreferrer">Special:Homepage</a>.  Part 1 explored  testing <a href="https://www.mediawiki.org/wiki/ORES/Articletopic" class="remarkup-link remarkup-link-ext" rel="noreferrer">ORES model-articletopic</a> logic implementation and Part 2 described testing user workflows.</p>

<p>This post, as a Part 3 of <em>Exempla Docent</em>,  presents another important aspect of QA work  - the task of testing instrumentation. While analyzing data is a complex task which would be addressed by data analytics,  there  are still quite a few points that would be important to check  before the instrumentation would be deployed to production. Let&#039;s look at a specific example - <a href="https://meta.wikimedia.org/wiki/Schema:HomepageModule" class="remarkup-link remarkup-link-ext" rel="noreferrer">Schema:HomepageModule</a> on Special:Homepage.</p>

<p><span class="visual-only phui-icon-view phui-font-fa fa-hand-o-right" data-meta="0_200" aria-hidden="true"></span> <em>Note:</em> <strong>Special:Homepage </strong>with the SE module is enabled by default for most of the new accounts on participating wikis, e.g. <tt class="remarkup-monospaced">testwiki</tt>, <tt class="remarkup-monospaced">cswiki</tt>, <tt class="remarkup-monospaced">svwiki</tt>, or <tt class="remarkup-monospaced">arwiki</tt>. On betacluster Special:Homepage is enabled not only on the mentioned wikis but also on <tt class="remarkup-monospaced">enwiki</tt>.  For existing user accounts Special:Homepage  can be enabled via Special:Preferences option <strong>Newcomer homepage</strong> in User profile tab settings.</p>

<p>The <strong>Step zero</strong> should be, of course, getting a good understanding  of the user workflows on the Special:Homepage.  <a href="https://www.mediawiki.org/wiki/File:Understanding_First_Day_-_full_user_flow_2018-10-22.jpg" class="remarkup-link remarkup-link-ext" rel="noreferrer">Understanding First Day - full user flow</a> gives a good overview of that.  <a href="https://wikitech.wikimedia.org/wiki/Analytics/Systems/EventLogging/TestingOnBetaCluster" class="remarkup-link remarkup-link-ext" rel="noreferrer">EventLogging/TestingOnBetaCluster</a> documentation page is also a good reference point for getting in-depth info on EventLogging on the betacluster.  <br />
Now, the <strong>Step one</strong> would be going through <a href="https://meta.wikimedia.org/wiki/Schema:HomepageModule" class="remarkup-link remarkup-link-ext" rel="noreferrer">Schema:HomepageModule</a> page. The page has full information on the actions that are included in the schema along with some description and other helpful info (e.g. <tt class="remarkup-monospaced">impression: Module is shown to user</tt> or <tt class="remarkup-monospaced">link-click: User clicks a link in the module</tt>). These descriptions are basically ready-to-go tests.</p>

<div class="remarkup-table-wrap"><table class="remarkup-table">
<tr><th>Schema</th><th>Action to check</th><th>Tests</th><th>Description</th></tr>
<tr><td><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/hsxif266zuxmxeydygkg/PHID-FILE-wsd3kv3b2cr2wqc3tsqz/Screen_Shot_2020-12-29_at_11.06.39_AM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_198"><img src="https://phab.wmfusercontent.org/file/data/c354r5vwlupauxwmpjij/PHID-FILE-frprkhftzrclh7rfu4jf/preview-Screen_Shot_2020-12-29_at_11.06.39_AM.png" width="220" height="139.81684981685" alt="Screen Shot 2020-12-29 at 11.06.39 AM.png (694×1 px, 110 KB)" /></a></div></td><td><tt class="remarkup-monospaced">impression</tt></td><td>Test 1</td><td>when a page loads, the <tt class="remarkup-monospaced">impression</tt> event should be recorded for each module</td></tr>
<tr><td></td><td><tt class="remarkup-monospaced">link-click</tt></td><td>Test 2</td><td>click on a link(s) present in the modules</td></tr>
<tr></tr>
</table></div>

<p><strong>Step two </strong> - using the test scenarios from <strong>Step one</strong>, perform actions on the Homepage.  The browser dev tools console allows us to see the recorded events, e.g.  testing Schema:HomepageModule includes the following steps:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">enable your browser&#039;s  dev tools and  enable &quot;persistent log&quot; in the Console</li>
</ul>

<ul class="remarkup-list">
<li class="remarkup-list-item">use the following snippet (credit to <a href="https://phabricator.wikimedia.org/p/kostajh/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_201"><span class="phui-tag-core phui-tag-color-person">@kostajh</span></a>)</li>
</ul>

<p><tt class="remarkup-monospaced">mw.trackSubscribe(&#039;event.HomepageModule&#039;, console.log);</tt></p>

<ul class="remarkup-list">
<li class="remarkup-list-item">perform the actions that trigger eventlogging and compare with the info documented in the relevant schema description</li>
</ul>

<p>As a result, the Console will display all recorded events with detailed information - e.g. see the info for the <tt class="remarkup-monospaced">impression</tt> event: <br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/yqpj745nwwftplzvslkl/PHID-FILE-nhylfsepaw735dqub2es/Screen_Shot_2020-12-30_at_10.15.10_AM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_199"><img src="https://phab.wmfusercontent.org/file/data/uct3ncmbrwwo6lmszq3x/PHID-FILE-mb2r7pauuli2pdarimky/preview-Screen_Shot_2020-12-30_at_10.15.10_AM.png" width="220" height="122.463878327" alt="Screen Shot 2020-12-30 at 10.15.10 AM.png (732×1 px, 326 KB)" /></a></div></p>

<p><strong>Step four</strong> - quite often it makes sense to check the logs directly. For the server-side schemas, e.g. <a href="https://meta.wikimedia.org/wiki/Schema:EditorJourney" class="remarkup-link remarkup-link-ext" rel="noreferrer">EditorJourney</a>, it is, in fact, the only option for checking if the events are being recorded.  The instructions include the following simple steps:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">log in and go to the directory with logs:</li>
</ul>

<p><tt class="remarkup-monospaced">ssh deployment-eventlog05.eqiad.wmflabs</tt></p>

<p><tt class="remarkup-monospaced">cd /srv/log/eventlogging</tt></p>

<ul class="remarkup-list">
<li class="remarkup-list-item">to verify that events have been properly logged you may use <tt class="remarkup-monospaced">grep</tt> to find specific records.  For example, to see which <tt class="remarkup-monospaced">editor_interface</tt> events were recorded, you may use:</li>
</ul>

<p><tt class="remarkup-monospaced">grep  &#039;&quot;schema&quot;: &quot;HomepageModule&quot;&#039; all-events.log|grep &#039;impact&#039;|grep &#039;link-click&#039;|grep &#039;&quot;is_mobile&quot;: true&#039;</tt></p>

<p>What can be checked on the betacluster?  The tests should verify, at the very basic, that</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">there are no errors in the recorded events</li>
<li class="remarkup-list-item">all actions and all info (according to a schema description) are present</li>
<li class="remarkup-list-item">no missing/duplicate actions</li>
<li class="remarkup-list-item">and, overall, the logic of  tested user workflows is reflected accurately in the recorded events</li>
</ul>

<p>Even with limitations of betalabs environment, checking instrumentation (the schemas) before deployment to production might give valuable insights and allows to catch bugs and errors or to modify, if it&#039;s necessary, the schema itself. In the context of <a href="https://www.mediawiki.org/wiki/Growth/Understanding_first_day" class="remarkup-link remarkup-link-ext" rel="noreferrer">Growth team projects</a> the instrumentation plays a crucial role for answering important questions on how features are being used and to make decisions on  how to improve the Special:Homepage, so newcomer editors would easily find editing tasks and successfully publish their first edits.</p></div></content></entry><entry><title>Struggle, the road to growth</title><link href="/phame/live/21/post/224/struggle_the_road_to_growth/" /><id>https://phabricator.wikimedia.org/phame/post/view/224/</id><author><name>Harriet (Harriet Ayugi)</name></author><published>2020-12-24T08:47:19+00:00</published><updated>2021-01-16T23:28:05+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>It has been more than 3 weeks into my Outreachy internship with Wikimedia foundations. The internship started well and the project that I&#039;m working on is about evaluating <a href="https://github.com/microsoft/playwright" class="remarkup-link remarkup-link-ext" rel="noreferrer">Microsoft playwright</a> 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;</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">Forking the Wikimedia repository</li>
<li class="remarkup-list-item">Cloning the repository, setting up and running it on my local machine</li>
<li class="remarkup-list-item">Connecting my forked with upstream</li>
<li class="remarkup-list-item">Configuring CI.</li>
</ul>

<p>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;</p>

<ol class="remarkup-list">
<li class="remarkup-list-item">Travis CI doesn&#039;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.</li>
<li class="remarkup-list-item">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.</li>
</ol>

<p>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&#039;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;</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">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&#039;m getting past this.</li>
<li class="remarkup-list-item">I have had several issues with setting up and configuring jest with Microsoft playwright, but my mentors have been there to help unblock me.</li>
</ul>

<p>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&#039;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&#039;m working on.</p></div></content></entry><entry><title>To dream a dream. My Outreachy Journey</title><link href="/phame/live/21/post/223/to_dream_a_dream._my_outreachy_journey/" /><id>https://phabricator.wikimedia.org/phame/post/view/223/</id><author><name>Harriet (Harriet Ayugi)</name></author><published>2020-12-01T13:45:07+00:00</published><updated>2021-01-18T05:33:29+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>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. <a href="https://www.outreachy.org/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Outreachy</a> 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&#039;s engagement in technology is quite low.</p>

<p>My journey into being accepted as an outreachy intern started when I submitted my application about 3 months ago, the whole<br />
<a href="https://www.outreachy.org/apply/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Outreachy application</a> 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&#039;s one I&#039;m truly excited to embark on, though a bit scary but I know that great things will come out of it!.</p>

<p>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!!. <a href="https://www.wikimedia.org/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Wikimedia</a> is a global movement whose mission is to bring free educational content to the world. One of the reasons why I&#039;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&#039;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 <a href="https://twitter.com/vidhi_mody" class="remarkup-link remarkup-link-ext" rel="noreferrer">Vidhi Mody</a>, <a href="https://twitter.com/zeljkofilipin" class="remarkup-link remarkup-link-ext" rel="noreferrer">Željko Filipin</a>, and <a href="https://twitter.com/und3fined_v01d" class="remarkup-link remarkup-link-ext" rel="noreferrer">Soham Parekh</a> whom I look forward to learning from and collaborating with.</p>

<p>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.</p>

<p>This post was originally published on <a href="https://dev.to/hariclerry/to-dream-a-dream-my-outreachy-journey-23f6" class="remarkup-link remarkup-link-ext" rel="noreferrer">dev.to</a></p></div></content></entry><entry><title>Exempla Docent - testing UI for Suggested edits module </title><link href="/phame/live/21/post/222/exempla_docent_-_testing_ui_for_suggested_edits_module/" /><id>https://phabricator.wikimedia.org/phame/post/view/222/</id><author><name>Etonkovidova (Elena)</name></author><published>2020-11-30T04:31:32+00:00</published><updated>2020-11-30T20:12:30+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>In <a href="https://phabricator.wikimedia.org/phame/post/view/216/exempla_docent_-_testing_ores_articletopic_model/" class="remarkup-link" rel="noreferrer">Part 1</a> of <em>Exempla Docent </em> for QA practices,  some approaches to testing <a href="https://www.mediawiki.org/wiki/ORES/Articletopic" class="remarkup-link remarkup-link-ext" rel="noreferrer">ORES model articletopic</a> were explored. This post, as <em>Part 2</em>, will present an overview on  testing Suggested edits module (SE) - the UI that presents the ORES <tt class="remarkup-monospaced">articletopic</tt> logic to users  (more info on <a href="https://www.mediawiki.org/wiki/Growth/Personalized_first_day/Newcomer_tasks" class="remarkup-link remarkup-link-ext" rel="noreferrer">Newcomers tasks on Special:Homepage</a>).</p>

<p><span class="visual-only phui-icon-view phui-font-fa fa-hand-o-right" data-meta="0_210" aria-hidden="true"></span> <em>Note: Special:Homepage with the SE module is enabled by default for new accounts on participating wikis, for example, <tt class="remarkup-monospaced">testwiki</tt>, <tt class="remarkup-monospaced">cswiki</tt>, <tt class="remarkup-monospaced">svwiki</tt>, or <tt class="remarkup-monospaced">arwiki</tt>. On betacluster Special:Homepage is enabled not only on the mentioned wikis but also on <tt class="remarkup-monospaced">enwiki</tt>.  For existing user accounts Special:Homepage  can be enabled via Special:Preferences option <strong>Newcomer homepage</strong> in User profile tab settings. </em></p>

<p>From a practical point of view, there are two huge venues of testing:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">checking if all  UX design specs are in place (including testing user workflows)</li>
<li class="remarkup-list-item">checking the essentials - cross-browser testing, mobile testing, translation, accessibility</li>
</ul>

<p>... and make sure that everything makes sense!</p>

<p>The scrutiny of exploratory QA testing starts with understanding of the problems that we need to solve as well as with the analysis of whether the implementation delivers the solution.  What are the Suggested edits? The Suggested edits module provides guidance and support to newcomers from selecting a task (an article for edit) to publishing the edits. A newcomer workflow would include the following steps:</p>

<div class="remarkup-table-wrap"><table class="remarkup-table">
<tr><th>Intro/selection of topics and difficulty levels</th><th>Suggested edits</th><th>Edit Suggested edits</th><th>Post-edit dialog</th></tr>
<tr><td><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/3tov554zvqe6n7x4fqtj/PHID-FILE-5uwo3z32ly75ooaa5dxx/Screen_Shot_2020-11-20_at_2.41.16_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_202"><img src="https://phab.wmfusercontent.org/file/data/elgx7loevmasve2a47ga/PHID-FILE-em3dk5zz75ks6h5w7e7r/preview-Screen_Shot_2020-11-20_at_2.41.16_PM.png" width="220" height="175.67367119901" alt="Screen Shot 2020-11-20 at 2.41.16 PM.png (646×809 px, 106 KB)" /></a></div><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/5teb4nx2udz4jab6e2zw/PHID-FILE-ye6zsqmwcqmj2b3oj76k/Screen_Shot_2020-11-20_at_2.41.25_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_203"><img src="https://phab.wmfusercontent.org/file/data/gixeqiwbagtsiwmntcf3/PHID-FILE-ceyebhczu4kpdmtimlkf/preview-Screen_Shot_2020-11-20_at_2.41.25_PM.png" width="220" height="177.38364779874" alt="Screen Shot 2020-11-20 at 2.41.25 PM.png (641×795 px, 79 KB)" /></a></div></td><td><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/6zywjvpftcnrdako4okx/PHID-FILE-jzdvi5lfe4nepifzwteu/Screen_Shot_2020-11-29_at_5.04.13_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_204"><img src="https://phab.wmfusercontent.org/file/data/bdjpdtjvllxiwdn23xru/PHID-FILE-dpawfxpp5q2lhu6ajo5h/preview-Screen_Shot_2020-11-29_at_5.04.13_PM.png" width="220" height="209.77511244378" alt="Screen Shot 2020-11-29 at 5.04.13 PM.png (636×667 px, 140 KB)" /></a></div></td><td><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/ivzrkilfpwptrdxhou4h/PHID-FILE-t5he2xtgabcvbhiurq2r/Screen_Shot_2020-11-29_at_5.04.29_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_205"><img src="https://phab.wmfusercontent.org/file/data/wuwtxncm736qnqky4yih/PHID-FILE-zucsh2y6o4loocarg54u/preview-Screen_Shot_2020-11-29_at_5.04.29_PM.png" width="220" height="122.81642917016" alt="Screen Shot 2020-11-29 at 5.04.29 PM.png (666×1 px, 283 KB)" /></a></div><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/estbctnllekw2yv6ihsh/PHID-FILE-wti66dyifkntanh6dsqc/Screen_Shot_2020-11-29_at_5.04.54_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_206"><img src="https://phab.wmfusercontent.org/file/data/z2q2qekg5wycljba5xnp/PHID-FILE-4z5e55ndckyv5wkwlcer/preview-Screen_Shot_2020-11-29_at_5.04.54_PM.png" width="220" height="121.63197335554" alt="Screen Shot 2020-11-29 at 5.04.54 PM.png (664×1 px, 263 KB)" /></a></div></td><td><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/iiavno6kthurqqm6j3p7/PHID-FILE-zylfwdzripoix6qppyb5/Screen_Shot_2020-11-29_at_5.05.17_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_207"><img src="https://phab.wmfusercontent.org/file/data/7p52o4wrq4zkp2m5iu5v/PHID-FILE-e4ekuohl3mnxc5qceg6t/preview-Screen_Shot_2020-11-29_at_5.05.17_PM.png" width="220" height="139.10313901345" alt="Screen Shot 2020-11-29 at 5.05.17 PM.png (564×892 px, 169 KB)" /></a></div></td></tr>
<tr></tr>
</table></div>

<p>Well, it&#039;s a lot to test. To illustrate QA analysis process, let&#039;s get the simplest example - I&#039;ll use the first screen of the intro tour for the SE module. This is what newcomers would see when they come to Special:Homepage -  the intro tour gives newcomers some general information along with options to select topics of interests.</p>

<div class="remarkup-table-wrap"><table class="remarkup-table">
<tr><th>Overall view</th><th>QA analysis view</th></tr>
<tr><td><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/o5ystfvz53td2fu5mdgy/PHID-FILE-mtbwfwnt4xup33hyn7tz/Screen_Shot_2020-11-20_at_2.41.16_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_208"><img src="https://phab.wmfusercontent.org/file/data/kdy4vi4gzwxd66fmyozy/PHID-FILE-5rnfjeksinihqhuek4pa/preview-Screen_Shot_2020-11-20_at_2.41.16_PM.png" width="220" height="175.67367119901" alt="Screen Shot 2020-11-20 at 2.41.16 PM.png (646×809 px, 106 KB)" /></a></div></td><td><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/tsh2wds5iptoeraswvrr/PHID-FILE-othrnttpkhfnmz57v4cv/Screen_Shot_2020-11-20_at_2.40.47_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_209"><img src="https://phab.wmfusercontent.org/file/data/g46fvk7ckuhjhhukyhwn/PHID-FILE-o3xt3fqrkhhirfgojlgo/preview-Screen_Shot_2020-11-20_at_2.40.47_PM.png" width="220" height="178.05658056581" alt="Screen Shot 2020-11-20 at 2.40.47 PM.png (658×813 px, 192 KB)" /></a></div></td></tr>
<tr></tr>
</table></div>

<p><strong>QA analysis view</strong> includes both testing venues mentioned above - checking UX design specs and checking the essentials,  thus providing a sort of the mental map that helps  to prioritize and structure the testing.</p>

<p>Let&#039;s proceed to the next level. There are quite a few ways for the user to interact, and all of them should be tested, of course. For example,  testing the selection of the SE topics gives a whole cluster of possible tests illustrated in a table below:</p>

<div class="remarkup-table-wrap"><table class="remarkup-table">
<tr><th>Selection</th><th>Cases that should be handled</th></tr>
<tr><td>one topic</td><td>no articles exist for this topic; check for topic labels translation - too long/too short</td></tr>
<tr><td>two topics from different categories</td><td>the very first one and the very last one; one topic that does not have articles</td></tr>
<tr><td>all topics in one category</td><td>check for possible performance issues</td></tr>
<tr><td>all topics</td><td>check for possible performance issues</td></tr>
<tr></tr>
</table></div>

<p>Plus, there is a counter! The counter shows how many articles match users&#039; selection. What if an article fits in two topics? Would it be counted twice? If it is not counted twice, would it be confusing for a user to see that the number of articles for several topics is lower than the number of articles for one topic?</p>

<p>Such questions are, in fact, the essence of <a href="http://www.testingeducation.org/conference/wtst_pettichord_FSofST2.pdf" class="remarkup-link remarkup-link-ext" rel="noreferrer">the exploratory testing</a>- &quot;Unchallenged assumptions are dangerous&quot;. And the best QA practice is to remember that. Happy testing, everyone.</p></div></content></entry><entry><title>Engineering Productivity Virtual Offsite October 2020</title><link href="/phame/live/21/post/221/engineering_productivity_virtual_offsite_october_2020/" /><id>https://phabricator.wikimedia.org/phame/post/view/221/</id><author><name>zeljkofilipin (Željko Filipin)</name></author><published>2020-11-27T15:53:55+00:00</published><updated>2021-06-30T15:38:02+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>October 26-29 2020 was my team&#039;s second virtual offsite. We&#039;ve had many offsites, but the first virtual one was in May 2020. The structure of this offsite was similar to the one in May. About four hours of sessions every day, from Monday to Thursday.</p>

<p>I&#039;ve participated in several sessions. For example, <a href="/J214" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_211"><span class="phui-tag-core phui-tag-color-object">Blog Post: Spin up a basic local Phabricator instance with Docker</span></a> and <a href="/T266622" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_212"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T266622: Screenshot Tests, Automated Testing, and Data Driven Testing</span></span></a>. I&#039;ve lead a session on writing a blog post. The last day we&#039;ve played a few games together, including <a href="https://www.jackboxgames.com/trivia-murder-party/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Trivia Murder Party</a> and <a href="https://en.wikipedia.org/wiki/Among_Us" class="remarkup-link remarkup-link-ext" rel="noreferrer">Among Us</a>.</p></div></content></entry><entry><title>Outreachy, September-November 2020</title><link href="/phame/live/21/post/220/outreachy_september-november_2020/" /><id>https://phabricator.wikimedia.org/phame/post/view/220/</id><author><name>zeljkofilipin (Željko Filipin)</name></author><published>2020-11-25T18:08:15+00:00</published><updated>2021-06-30T15:39:23+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>In <a href="/J210" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_213"><span class="phui-tag-core phui-tag-color-object">Blog Post: Google Summer of Code, June-August 2020</span></a> I&#039;ve said:</p>

<blockquote><p>I’ve decided to take a break from mentoring. (I might not take that advice. More about that soon.)</p></blockquote>

<p>I didn&#039;t take my own advice. I will be mentoring <a href="https://phabricator.wikimedia.org/p/Harriet/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_221"><span class="phui-tag-core phui-tag-color-person">@Harriet</span></a> during the <a href="/tag/outreachy/" class="phui-tag-view phui-tag-type-shade phui-tag-blue phui-tag-shade phui-tag-icon-view " data-sigil="hovercard" data-meta="0_218"><span class="phui-tag-core "><span class="visual-only phui-icon-view phui-font-fa fa-umbrella" data-meta="0_217" aria-hidden="true"></span>Outreachy</span></a> internship. Her project is <a href="/T266841" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_214"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T266841: Outreachy 2020 - 2021 Proposal: Evaluate Microsoft Playwright as replacement for our browser automation</span></span></a>. My co-mentors are previous <a href="/tag/google-summer-of-code/" class="phui-tag-view phui-tag-type-shade phui-tag-blue phui-tag-shade phui-tag-icon-view " data-sigil="hovercard" data-meta="0_220"><span class="phui-tag-core "><span class="visual-only phui-icon-view phui-font-fa fa-umbrella" data-meta="0_219" aria-hidden="true"></span>Google-Summer-of-Code</span></a> interns, <a href="https://phabricator.wikimedia.org/p/Vidhi-Mody/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_222"><span class="phui-tag-core phui-tag-color-person">@Vidhi-Mody</span></a> and <a href="https://phabricator.wikimedia.org/p/Soham/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_223"><span class="phui-tag-core phui-tag-color-person">@Soham</span></a>.</p>

<p>At one of our last meetings during <a href="/tag/google-summer-of-code/" class="phui-tag-view phui-tag-type-shade phui-tag-blue phui-tag-shade phui-tag-icon-view " data-sigil="hovercard" data-meta="0_225"><span class="phui-tag-core "><span class="visual-only phui-icon-view phui-font-fa fa-umbrella" data-meta="0_224" aria-hidden="true"></span>Google-Summer-of-Code</span></a> internship, I&#039;ve suggested to <a href="https://phabricator.wikimedia.org/p/Vidhi-Mody/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_228"><span class="phui-tag-core phui-tag-color-person">@Vidhi-Mody</span></a> and <a href="https://phabricator.wikimedia.org/p/Soham/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_229"><span class="phui-tag-core phui-tag-color-person">@Soham</span></a> that mentoring could be a great next step in their careers. I didn&#039;t expect they would take my advice so seriously and act on it so quickly. They have noticed that <a href="/tag/outreachy/" class="phui-tag-view phui-tag-type-shade phui-tag-blue phui-tag-shade phui-tag-icon-view " data-sigil="hovercard" data-meta="0_227"><span class="phui-tag-core "><span class="visual-only phui-icon-view phui-font-fa fa-umbrella" data-meta="0_226" aria-hidden="true"></span>Outreachy</span></a> internship is soon and they have suggested two projects, <a href="/T263221" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_215"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T263221: Selenium Framework Cleanup</span></span></a> and <a href="/T262682" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_216"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T262682: Evaluate Microsoft Playwright as replacement for our browser automation</span></span></a>. We had 3 applicants for the first project, and 6 applicants for the second one. After a lot of thought and discussion we have decided to mentor <a href="https://phabricator.wikimedia.org/p/Harriet/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_230"><span class="phui-tag-core phui-tag-color-person">@Harriet</span></a> for the second project.</p>

<p>This time the application phase of the internship was not that busy for me (compared with the previous internship) because the vast majority of the work was done by <a href="https://phabricator.wikimedia.org/p/Vidhi-Mody/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_231"><span class="phui-tag-core phui-tag-color-person">@Vidhi-Mody</span></a> and <a href="https://phabricator.wikimedia.org/p/Soham/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_232"><span class="phui-tag-core phui-tag-color-person">@Soham</span></a>. This time I will mentor them, and they will mentor <a href="https://phabricator.wikimedia.org/p/Harriet/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_233"><span class="phui-tag-core phui-tag-color-person">@Harriet</span></a>. We&#039;ve already met with her and discussed the internship in general and next steps.</p>

<p>If not before, I will write a review of the internship in March 2021, after it is over.</p>

<h2 class="remarkup-header">Links</h2>

<ul class="remarkup-list">
<li class="remarkup-list-item"><a href="https://playwright.dev/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Playwright</a> at playwright.dev</li>
<li class="remarkup-list-item"><a href="https://www.outreachy.org/alums/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Outreachy December 2020 to March 2021 Interns</a> at outreachy.org</li>
<li class="remarkup-list-item"><a href="https://www.mediawiki.org/wiki/Outreachy/Round_21" class="remarkup-link remarkup-link-ext" rel="noreferrer">Outreachy/Round 21</a> at mediawiki.org</li>
</ul></div></content></entry><entry><title>Exempla Docent - testing ORES &#039;articletopic&#039; model </title><link href="/phame/live/21/post/216/exempla_docent_-_testing_ores_articletopic_model/" /><id>https://phabricator.wikimedia.org/phame/post/view/216/</id><author><name>Etonkovidova (Elena)</name></author><published>2020-10-31T04:57:38+00:00</published><updated>2020-11-19T12:56:01+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p><a href="https://www.mediawiki.org/wiki/ORES" class="remarkup-link remarkup-link-ext" rel="noreferrer">ORES</a> provides machine learning as a service for Wikimedia projects.  The ORES model <a href="https://www.mediawiki.org/wiki/ORES/Articletopic" class="remarkup-link remarkup-link-ext" rel="noreferrer">articletopic</a> was used for the Growth team project - <a href="https://www.mediawiki.org/wiki/Growth/Personalized_first_day/Newcomer_tasks" class="remarkup-link remarkup-link-ext" rel="noreferrer">Suggested edits for newcomers on Special: Homepage</a>.</p>

<p>Testing ORES models always presents several challenges</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">understanding the background</li>
<li class="remarkup-list-item">testing the model logic</li>
<li class="remarkup-list-item">UI testing to see how the specific model logic is presented to users</li>
</ul>

<h5 class="remarkup-header">Understanding background and terms</h5>

<p>Special:RecentChanges and Special:Watchlist were the previous projects where ORES models <tt class="remarkup-monospaced">damaging</tt> and <tt class="remarkup-monospaced">goodfaith</tt> were tested. Another project - Special:NewPagesFeed (PageTriage) involved testing <a href="https://www.mediawiki.org/wiki/ORES/Issues/Article_quality" class="remarkup-link remarkup-link-ext" rel="noreferrer">articlequality</a> ORES model. Testing those models was insightful and quite helpful when <tt class="remarkup-monospaced">articletopic</tt> model was used for the Homepage Suggested edits project.</p>

<p>The starting point for all ORES models testing is to understand the most basic terminology that machine learning tools are using -  <strong>recall</strong> and <strong>precision</strong>.<br />
The definitions include some deceptively easy looking formulas:</p>

<blockquote><p>Recall = True Positive/(True Positive + False Negative)<br />
Precision = True Positive/(True Positive + False Positive)</p></blockquote>

<p>There are many good explanations  (e.g. <a href="https://en.wikipedia.org/wiki/Precision_and_recall" class="remarkup-link remarkup-link-ext" rel="noreferrer">Wikipedia article - Precision and recall</a>), but I was thinking of an example that would help me to fully grasp these important concepts. <br />
<em>My example: </em><br />
There are two candidates for a QA position who need to perform a technical task. The task includes testing  an application that has 10 intentional bugs for them to find. <br />
<strong><em>Candidate #1</em></strong> finds two bugs (True Positives) and reports them. Using the formulas above <br />
<strong>Recall</strong>= True Positive/(True Positive + False Negative) = 2/(2+8) = <strong>0.2 (20%)  </strong><br />
The eight bugs that  were not found by the <strong><em>Candidate #1</em></strong>,  are,  in fact,  true positive outcomes that were rejected. 20% is the fraction of relevant instances that have been retrieved over total relevant instances. It doesn&#039;t look as an impressive result, right?  However, when we look at the precision (also defined as  the fraction of relevant instances among the retrieved instances), <strong><em>Candidate #1</em></strong> looks much better: <br />
<strong>Precision</strong>= True Positive/(True Positive + False Positive) = 2/(2+0) = 1 (100%) <br />
<strong><em>Candidate #1</em></strong> has excellent precision! <br />
Now, <strong><em>Candidate #2</em></strong> finds all 10 bugs (True Positives) but also reports 10 bugs that are not true bugs (False Positives). <br />
<strong>Recall</strong> = 10/(10+0) = 1 (100%) <br />
<strong>Precision</strong> = 10/(10+10) = 0.5 (50%)</p>

<p>And now, we are facing a tough choice - which one of the candidates is better?  <strong><em>Candidate #1</em></strong> who did not find many bugs but is very precise, or <strong><em>Candidate #2</em></strong> who finds much more bugs but also submits many false bug reports? Well, it turns out to be a typical problem in machine learning.  Finding the balance between recall and precision is almost always a tricky process of adjusting  and re-calibrating machine learning models.</p>

<p>How to apply all of the above to practical purposes of testing ORES models?  Let&#039;s review  what ORES <tt class="remarkup-monospaced">articletopic</tt> is about.</p>

<h5 class="remarkup-header">Testing the model logic</h5>

<p>The major challenge the Homepage Suggested edits project faces is - how to suggest edits to newcomers who have not yet edited anything?</p>

<p>ORES <tt class="remarkup-monospaced">articletopic</tt> recommendations should be based on (1) selecting articles that have maintenance templates (indicating that some work needs to be done) and (2) such articles&#039; content should match specific topics - e.g. &quot;Physics&quot;, &quot;Africa&quot;,  &quot;Biography (women)&quot; etc.  As a non-ORES example, you may enter in the search box - <tt class="remarkup-monospaced">morelikethis:Cat hastemplate:Copyedit</tt> - you&#039;ll see articles that supposedly relate (somehow to Cat) and have the Copyedit maintenance template. The result might be  sometime quite surprising. <br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/67mffcpxj7hsbzdjg67r/PHID-FILE-qgtfw75gxb6jqwhpqneb/Screen_Shot_2020-10-30_at_7.09.59_PM.png" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_234"><img src="https://phab.wmfusercontent.org/file/data/67mffcpxj7hsbzdjg67r/PHID-FILE-qgtfw75gxb6jqwhpqneb/Screen_Shot_2020-10-30_at_7.09.59_PM.png" height="400" alt="Screen Shot 2020-10-30 at 7.09.59 PM.png (626×835 px, 116 KB)" /></a></div><br />
Would powerful AI (in our case ORES <tt class="remarkup-monospaced">articletopic</tt> model) improve such searches?  Before ORES <tt class="remarkup-monospaced">articletopic</tt>model could start learning,  the experienced editors should complete their own evaluation process - they should identify high-level topics (and map them to subtopics), then they should classify maintenance templates by the level of difficulty for new editors. These steps were done by our target wikis ambassadors who sampled articles with maintenance templates and created a list of high-level topics. <br />
After that, ORES could start its AI magic and human QA testing could start too.</p>

<p>Here is the sample of  data analysis (our knowledge of recall and precision comes quite handy here!).  And just one more term to learn - <em>a threshold.</em> According to  <a href="https://www.mediawiki.org/wiki/ORES/Thresholds" class="remarkup-link remarkup-link-ext" rel="noreferrer">ORES/Thresholds</a>,  thresholds are  trade-offs between the specificity (precision) and sensitivity (recall).<br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/mlczny665fotwnsjkrqg/PHID-FILE-liityn3yi5f3riyeh6y5/ORES_tresholds.png" class="phabricator-remarkup-embed-image-full" data-sigil="lightboxable" data-meta="0_235"><img src="https://phab.wmfusercontent.org/file/data/mlczny665fotwnsjkrqg/PHID-FILE-liityn3yi5f3riyeh6y5/ORES_tresholds.png" height="752" width="815" loading="lazy" alt="ORES_tresholds.png (752×815 px, 203 KB)" /></a></div><br />
What should be tested?  Looking closely at the sample you can see that some topics have lower precision and some topics have lower recall - there might be potential issues (<tt class="remarkup-monospaced">articletopic</tt> algorithm might fetch non-relevant articles or some articles might not be included). The high precision/high recall values also should be checked to ensure that the result is, indeed, relevant.</p>

<p>And - voila! - it&#039;s easy now to come with a practical test plan - QA testing should watch out for</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">highest/lowest thresholds</li>
<li class="remarkup-list-item">low precision</li>
<li class="remarkup-list-item">low recall</li>
<li class="remarkup-list-item">other anomalies</li>
</ul>

<p>When it comes to an article  (with the great help from <a href="https://meta.wikimedia.org/w/index.php?title=User:EpochFail" class="remarkup-link remarkup-link-ext" rel="noreferrer">User:EpochFail</a>) the scores can be easily viewed: <br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/kebr5td3tn44blywiczj/PHID-FILE-dmiocvbtq4f2qg6h5i75/article_NCIT_127_ORES_scroes.png" class="phabricator-remarkup-embed-image-full" data-sigil="lightboxable" data-meta="0_236"><img src="https://phab.wmfusercontent.org/file/data/kebr5td3tn44blywiczj/PHID-FILE-dmiocvbtq4f2qg6h5i75/article_NCIT_127_ORES_scroes.png" height="558" width="602" loading="lazy" alt="article_NCIT 127_ORES_scroes.png (558×602 px, 119 KB)" /></a></div><br />
Then, the results of topic relevance  (e.g.<tt class="remarkup-monospaced">Culture.Biography.Biography*(65%)</tt> for <strong>NCT 127</strong>) can be compared to other similar (or higher/lower) scores to find out at which thresholds the article should be recommended as a good match for the topics. <br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/nrpxjgynreo5tsyikc2i/PHID-FILE-y33p32motvyjcgdaelt3/Screen_Shot_2020-03-10_at_6.56.42_PM.png" class="phabricator-remarkup-embed-image-full" data-sigil="lightboxable" data-meta="0_237"><img src="https://phab.wmfusercontent.org/file/data/nrpxjgynreo5tsyikc2i/PHID-FILE-y33p32motvyjcgdaelt3/Screen_Shot_2020-03-10_at_6.56.42_PM.png" height="685" width="864" loading="lazy" alt="Screen Shot 2020-03-10 at 6.56.42 PM.png (685×864 px, 126 KB)" /></a></div></p>

<p>So having good understanding of fundamental terms and having tools for looking inside scoring data, the task of testing ORES <tt class="remarkup-monospaced">articletopic</tt> becomes quite enjoyable. And the testing results have helped to adjust machine learning model to optimize new editors experience by providing them  with meaningful tasks that match their interests and areas of expertise.</p></div></content></entry><entry><title>Spin up a basic local Phabricator instance with Docker</title><link href="/phame/live/21/post/214/spin_up_a_basic_local_phabricator_instance_with_docker/" /><id>https://phabricator.wikimedia.org/phame/post/view/214/</id><author><name>Mhurd (Monte)</name></author><published>2020-11-19T00:35:31+00:00</published><updated>2020-12-04T14:33:12+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>If you want to experiment with <a href="https://github.com/phacility/phabricator" class="remarkup-link remarkup-link-ext" rel="noreferrer">Phabricator</a> and/or the <a href="https://secure.phabricator.com/conduit/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Phabricator APIs</a>, it can be convenient to have a local instance to play with.</p>

<p>A relatively simple way to do this is with the following <a href="https://docs.docker.com/compose/compose-file/" class="remarkup-link remarkup-link-ext" rel="noreferrer">docker-compose.yml</a>, which uses a <a href="https://en.wikipedia.org/wiki/Bitnami" class="remarkup-link remarkup-link-ext" rel="noreferrer">Bitnami</a> Phabricator Docker image:</p>

<p><div class="paste-embed"><div class="paste-embed-head"><a href="/P13071">P13071 Simple Phabricator docker-compose.yml</a></div><div class="paste-embed-body" style="max-height: 27.6em;"><div class="phabricator-source-code-container"><table class="phabricator-source-code-view remarkup-code PhabricatorMonospaced" data-sigil="phabricator-source has-symbols" data-meta="0_244"><tr><th class="phabricator-source-line"><span>1</span></th><td class="phabricator-source-code"><span></span><span class="nt">version</span><span class="p">:</span> <span class="s">&#39;3.0&#39;</span>
</td></tr><tr><th class="phabricator-source-line"><span>2</span></th><td class="phabricator-source-code"><span class="nt">services</span><span class="p">:</span>
</td></tr><tr><th class="phabricator-source-line"><span>3</span></th><td class="phabricator-source-code">  <span class="nt">mariadb</span><span class="p">:</span>
</td></tr><tr><th class="phabricator-source-line"><span>4</span></th><td class="phabricator-source-code">    <span class="nt">image</span><span class="p">:</span> <span class="s">&#39;bitnami/mariadb:latest&#39;</span>
</td></tr><tr><th class="phabricator-source-line"><span>5</span></th><td class="phabricator-source-code">    <span class="nt">environment</span><span class="p">:</span>
</td></tr><tr><th class="phabricator-source-line"><span>6</span></th><td class="phabricator-source-code">      <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">ALLOW_EMPTY_PASSWORD=yes</span>
</td></tr><tr><th class="phabricator-source-line"><span>7</span></th><td class="phabricator-source-code">    <span class="nt">volumes</span><span class="p">:</span>
</td></tr><tr><th class="phabricator-source-line"><span>8</span></th><td class="phabricator-source-code">      <span class="p p-Indicator">-</span> <span class="s">&#39;mariadb_data:/bitnami&#39;</span>
</td></tr><tr><th class="phabricator-source-line"><span>9</span></th><td class="phabricator-source-code">  <span class="nt">phabricator</span><span class="p">:</span>
</td></tr><tr><th class="phabricator-source-line"><span>10</span></th><td class="phabricator-source-code">    <span class="nt">image</span><span class="p">:</span> <span class="s">&#39;bitnami/phabricator:latest&#39;</span>
</td></tr><tr><th class="phabricator-source-line"><span>11</span></th><td class="phabricator-source-code">    <span class="nt">ports</span><span class="p">:</span>
</td></tr><tr><th class="phabricator-source-line"><span>12</span></th><td class="phabricator-source-code">      <span class="p p-Indicator">-</span> <span class="s">&#39;80:8080&#39;</span>
</td></tr><tr><th class="phabricator-source-line"><span>13</span></th><td class="phabricator-source-code">      <span class="p p-Indicator">-</span> <span class="s">&#39;443:8443&#39;</span>
</td></tr><tr><th class="phabricator-source-line"><span>14</span></th><td class="phabricator-source-code">    <span class="nt">volumes</span><span class="p">:</span>
</td></tr><tr><th class="phabricator-source-line"><span>15</span></th><td class="phabricator-source-code">      <span class="p p-Indicator">-</span> <span class="s">&#39;phabricator_data:/bitnami&#39;</span>
</td></tr><tr><th class="phabricator-source-line"><span>16</span></th><td class="phabricator-source-code">    <span class="nt">depends_on</span><span class="p">:</span>
</td></tr><tr><th class="phabricator-source-line"><span>17</span></th><td class="phabricator-source-code">      <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">mariadb</span>
</td></tr><tr><th class="phabricator-source-line"><span>18</span></th><td class="phabricator-source-code">    <span class="nt">environment</span><span class="p">:</span>
</td></tr><tr><th class="phabricator-source-line"><span>19</span></th><td class="phabricator-source-code">      <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">PHABRICATOR_HOST=phabricator.local.com</span>
</td></tr><tr><th class="phabricator-source-line"><span>20</span></th><td class="phabricator-source-code">      <span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">ALLOW_EMPTY_PASSWORD=yes</span>
</td></tr><tr><th class="phabricator-source-line"><span>21</span></th><td class="phabricator-source-code">    <span class="nt">hostname</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">phabricator.local.com</span>
</td></tr><tr><th class="phabricator-source-line"><span>22</span></th><td class="phabricator-source-code"><span class="nt">volumes</span><span class="p">:</span>
</td></tr><tr><th class="phabricator-source-line"><span>23</span></th><td class="phabricator-source-code">  <span class="nt">mariadb_data</span><span class="p">:</span>
</td></tr><tr><th class="phabricator-source-line"><span>24</span></th><td class="phabricator-source-code">    <span class="nt">driver</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">local</span>
</td></tr><tr><th class="phabricator-source-line"><span>25</span></th><td class="phabricator-source-code">  <span class="nt">phabricator_data</span><span class="p">:</span>
</td></tr><tr><th class="phabricator-source-line"><span>26</span></th><td class="phabricator-source-code">    <span class="nt">driver</span><span class="p">:</span> <span class="l l-Scalar l-Scalar-Plain">local</span>
</td></tr></table></div></div></div></p>

<p>( This isn&#039;t configured exactly the same as Wikimedia&#039;s Phabricator, but it may be close enough for experimentation purposes. A main objective for this example was to keep configuration to a minimum and the total time to roughly 10 minutes. )</p>

<h3 class="remarkup-header">Installation</h3>

<ol class="remarkup-list">
<li class="remarkup-list-item">Ensure you have <a href="https://docs.docker.com/install/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Docker</a> and <a href="https://docs.docker.com/compose/install/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Docker Compose</a> installed</li>
<li class="remarkup-list-item">Create a directory called something like <tt class="remarkup-monospaced">phabricator</tt> and place a <tt class="remarkup-monospaced">docker-compose.yml</tt> in it with the text above ( for some reason 🤷‍♂️ copying the text above is easier if you click through to the paste file <a href="https://phabricator.wikimedia.org/P13071" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_238"><span class="phui-tag-core phui-tag-color-object">P13071</span></a> )</li>
<li class="remarkup-list-item">In the <tt class="remarkup-monospaced">phabricator</tt> directory run the <tt class="remarkup-monospaced">docker-compose up</tt> command</li>
<li class="remarkup-list-item">Wait a couple minutes for the Docker images specified in the <tt class="remarkup-monospaced">docker-compose.yml</tt> file to be fetched and spun up</li>
</ol>

<h3 class="remarkup-header">Loading</h3>

<ol class="remarkup-list">
<li class="remarkup-list-item">Apparently Phabricator <em>really</em> wants its URL to have a subdomain, so for this to work locally you can edit your <tt class="remarkup-monospaced">/etc/hosts</tt> file (i.e. <tt class="remarkup-monospaced">sudo atom /etc/hosts</tt>) adding this line: <tt class="remarkup-monospaced">127.0.0.1 phabricator.local.com</tt></li>
<li class="remarkup-list-item">Now you should be able to load <a href="https://phabricator.local.com" class="remarkup-link remarkup-link-ext" rel="noreferrer">https://phabricator.local.com</a> in a browser to see the login page of your local Phabricator instance</li>
<li class="remarkup-list-item">You&#039;ll also have to instruct your browser that it&#039;s ok we don&#039;t have a valid certificate for the local instance:</li>
</ol>

<p>( tap image below for animation showing how this is done with Firefox )<br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/gbbukhg335wywjm4h54x/PHID-FILE-szfwh5kr47c7adq74zdo/docker_phab_https.mov.gif" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_239"><img src="https://phab.wmfusercontent.org/file/data/tqpbp3xrxjntlyydl7b2/PHID-FILE-hsezbcdqfo4ofye4imov/preview-docker_phab_https.mov.gif" width="220" height="194.17391304348" alt="docker phab https.mov.gif (812×920 px, 531 KB)" /></a></div></p>

<h3 class="remarkup-header">Logging in</h3>

<p>This Bitnami Phabricator image come with the following default account:<br />
Username: <tt class="remarkup-monospaced">user</tt><br />
Password: <tt class="remarkup-monospaced">bitnami1</tt></p>

<h3 class="remarkup-header">Making a Project, Workboard and Task</h3>

<p>( tap image below for animation )<br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/sk4uv2ohldx2dr6yndkl/PHID-FILE-j2qsvyw6advoblmej27h/test_project_workboard_and_task.mov.gif" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_240"><img src="https://phab.wmfusercontent.org/file/data/ib3pvyau6uvumxp2fmji/PHID-FILE-aqonu3tyspdclgx3yeqt/preview-test_project_workboard_and_task.mov.gif" width="220" height="193.1875" alt="test project workboard and task.mov.gif (1×1 px, 2 MB)" /></a></div></p>

<h3 class="remarkup-header">Generating an API Token</h3>

<p>If you want to play with <a href="https://secure.phabricator.com/conduit/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Phabricator APIs</a> from the command line, you&#039;ll need a token:</p>

<p>( tap image below for animation )<br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/gyrp3q3h5ayhr43bs354/PHID-FILE-gu5gvdqfdfjuqv5jz2lx/phab_3.mov.gif" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_241"><img src="https://phab.wmfusercontent.org/file/data/pxno2224jsb7f2xwect5/PHID-FILE-jfiee3wb6e3z7bbp7wtd/preview-phab_3.mov.gif" width="220" height="193.1875" alt="phab 3.mov.gif (1×1 px, 2 MB)" /></a></div></p>

<p>Typically you&#039;d want to keep such a token private, but since this one is specific to your local Phabricator instance it&#039;s not going to be of much use to anyone else.</p>

<h3 class="remarkup-header">Querying the API from a terminal window</h3>

<p>In the <tt class="remarkup-monospaced">Make first Project / Workboard / Task</tt> step above, the first task <tt class="remarkup-monospaced">T1</tt> was created. A fairly basic Phabricator API endpoint, <a href="https://secure.phabricator.com/conduit/method/phid.lookup/" class="remarkup-link remarkup-link-ext" rel="noreferrer">phid.lookup</a>, can be used to retrieve some basic information about this task, such as its <tt class="remarkup-monospaced">phid</tt>, status, full name, etc.</p>

<p>It can be called from a new terminal window on the host system using:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">the url specified above ( <tt class="remarkup-monospaced">http://phabricator.local.com</tt> )</li>
<li class="remarkup-list-item">the endpoint ( <tt class="remarkup-monospaced">/api/phid.lookup</tt> )</li>
<li class="remarkup-list-item">the token created above ( <tt class="remarkup-monospaced">api-yjnnbnmayjqf5z733qix2ebrri5k</tt> - yours will be different )</li>
<li class="remarkup-list-item">the id of the ticket created above ( <tt class="remarkup-monospaced">T1</tt> )</li>
</ul>

<p>For example, from a new terminal window:</p>

<div class="remarkup-code-block" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code">curl http://phabricator.local.com/api/phid.lookup -d &quot;api.token=YOUR_API_TOKEN_HERE&quot; -d &quot;names[0]=T1&quot; | python -m json.tool</pre></div>

<p>Note: <tt class="remarkup-monospaced">| python -m json.tool</tt> simply formats the json returned by the endpoint</p>

<p>( tap image below for animation )</p>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/3ge57rbe4cemxeypats3/PHID-FILE-yodzo27nthjflkfgvk6s/phab_api.mov.gif" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_242"><img src="https://phab.wmfusercontent.org/file/data/76db453z3k4pifyjv7ov/PHID-FILE-ohvn6jrdqtapofj3mzwu/preview-phab_api.mov.gif" width="220" height="187.6875" alt="phab api.mov.gif (1×1 px, 582 KB)" /></a></div></p>

<h3 class="remarkup-header">Querying the API from endpoint documentation pages</h3>

<p>If you use your local instance&#039;s URL ( <a href="https://phabricator.local.com" class="remarkup-link remarkup-link-ext" rel="noreferrer">https://phabricator.local.com</a> ) to load the API docs ( <a href="https://phabricator.local.com/conduit/" class="remarkup-link remarkup-link-ext" rel="noreferrer">https://phabricator.local.com/conduit/</a> ), as long as you&#039;ve logged in ( with the <tt class="remarkup-monospaced">user</tt> / <tt class="remarkup-monospaced">bitnami1</tt> credentials mentioned above, for example ) you can experiment with calling API endpoints without having to mess with tokens. At the bottom of every API&#039;s documentation page there is a form which can be used to enter parameters and call the endpoint:</p>

<p>( tap image below for animation )<br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/chpnmnhthzpb4u5o4dlx/PHID-FILE-ra2vubzfbzwlhtgh5vmi/phab_query_3.mov.gif" class="phabricator-remarkup-embed-image" data-sigil="lightboxable" data-meta="0_243"><img src="https://phab.wmfusercontent.org/file/data/q7fe2lkgpckes5afhxcr/PHID-FILE-znahz3yciydryrbw5477/preview-phab_query_3.mov.gif" width="220" height="191.8125" alt="phab query 3.mov.gif (1×1 px, 3 MB)" /></a></div></p>

<h3 class="remarkup-header">Enjoy!</h3>

<p>Hopefully this is useful if you ever want to mess around with Phabricator in a worry-free manner :)</p></div></content></entry><entry><title>Visual Studio Code + Neovim</title><link href="/phame/live/21/post/211/visual_studio_code_neovim/" /><id>https://phabricator.wikimedia.org/phame/post/view/211/</id><author><name>zeljkofilipin (Željko Filipin)</name></author><published>2020-10-07T14:48:33+00:00</published><updated>2020-10-16T20:56:09+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>I&#039;ve started using Vim in <a href="https://github.com/zeljkofilipin/dotfiles/commit/a21f4bb5834695dafba64e7c59a05694eaf52fdc" class="remarkup-link remarkup-link-ext" rel="noreferrer">2014</a>. I&#039;ve read a few books, wrote a few articles and gave a few talks on <a href="https://filipin.eu/tags/vim" class="remarkup-link remarkup-link-ext" rel="noreferrer">Vim</a>. I really like editing text with Vim, but I was never happy with it&#039;s file management, extensions, things like that.</p>

<p>I&#039;ve noticed that Visual Studio Code (VSCode) is used by slightly more than 50% of developers that participated in <a href="https://insights.stackoverflow.com/survey/2019#development-environments-and-tools" class="remarkup-link remarkup-link-ext" rel="noreferrer">2019 Stack Overflow survey</a>. (I didn&#039;t find editors section in <a href="https://insights.stackoverflow.com/survey/2020#development-environments-and-tools" class="remarkup-link remarkup-link-ext" rel="noreferrer">2020 survey</a>.)</p>

<p>I&#039;ve learned about Neovim in <a href="https://pragprog.com/titles/modvim/modern-vim/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Modern Vim</a> book. I&#039;ve started using Neovim in <a href="https://github.com/zeljkofilipin/dotfiles/commit/c4320cae324b5c06169be6267bb839becb1960cb" class="remarkup-link remarkup-link-ext" rel="noreferrer">2018</a> after I&#039;ve started reading the book.</p>

<p>I&#039;ve noticed more and more people using VSCode so I gave it a try earlier this year.  The only record I have is a commit in my <a href="https://github.com/zeljkofilipin/dotfiles/commit/87e71cc4e3487a1d88249f4205fbba4785fddd5e" class="remarkup-link remarkup-link-ext" rel="noreferrer">dotfiles</a> from a few days ago, but I know I&#039;ve been using it for a few months. I liked VSCode in general. It has all the features I need and a lot of extensions. But, after using Vim, editing text using anything else feels like walking backwards. (Editing text using Vim feels like running. Forwards.)</p>

<p>vscode-neovim VSCode extension was all I needed to connect the two. A real Vim implementation (not an emulator!) inside VSCode.</p>

<p>You need three things. VSCode, Neovim and vscode-neovim.</p>

<p>Installing VSCode is simple, download the installer from the site.</p>

<p>Installing Neovim should also be simple. I&#039;ve installed it on a Mac using <a href="https://brew.sh/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Homebrew</a> and all I needed to do was:</p>

<div class="remarkup-code-block" data-code-lang="shell" data-sigil="remarkup-code-block"><pre class="remarkup-code"><span></span>brew install --HEAD neovim</pre></div>

<p><tt class="remarkup-monospaced">--HEAD</tt> part is important. It will install version 0.5. If you don&#039;t use <tt class="remarkup-monospaced">--HEAD</tt> you will get version 0.4. vscode-neovim needs version 0.5.</p>

<p>vscode-neovim is installed from VSCode Extensions. Search for <em>Neo Vim</em> by Alexey Svetliakov.</p>

<h3 class="remarkup-header">Links</h3>

<ul class="remarkup-list">
<li class="remarkup-list-item"><a href="https://code.visualstudio.com/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Visual Studio Code</a> at visualstudio.com</li>
<li class="remarkup-list-item"><a href="https://neovim.io/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Neovim</a> at neovim.io</li>
<li class="remarkup-list-item"><a href="https://github.com/asvetliakov/vscode-neovim" class="remarkup-link remarkup-link-ext" rel="noreferrer">vscode-neovim</a> at github.com</li>
</ul>

<p><em>Originally published as <a href="https://filipin.eu/vscode-neovim" class="remarkup-link remarkup-link-ext" rel="noreferrer">Visual Studio Code + Neovim</a> at Željko Filipin&#039;s blog.</em></p></div></content></entry><entry><title>Google Summer of Code, June-August 2020</title><link href="/phame/live/21/post/210/google_summer_of_code_june-august_2020/" /><id>https://phabricator.wikimedia.org/phame/post/view/210/</id><author><name>zeljkofilipin (Željko Filipin)</name></author><published>2020-09-25T18:05:21+00:00</published><updated>2021-06-30T15:40:09+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><h2 class="remarkup-header">Introduction</h2>

<p>June and July were pretty busy. I was on vacation the majority of August. Interns and other mentors were busy even then. For more introduction, read my post <a href="/J209" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_245"><span class="phui-tag-core phui-tag-color-object">Blog Post: Google Summer of Code, February-May 2020</span></a>.</p>

<h2 class="remarkup-header">Things that went well</h2>

<h3 class="remarkup-header">Code</h3>

<p>We use <a href="https://en.wikipedia.org/wiki/Gerrit_(software)" class="remarkup-link remarkup-link-ext" rel="noreferrer">Gerrit</a> for hosting Git repositories and for code review.</p>

<p><a href="https://phabricator.wikimedia.org/p/Vidhi-Mody/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_249"><span class="phui-tag-core phui-tag-color-person">@Vidhi-Mody</span></a> project was updating about 30 repositories to <a href="https://webdriver.io/" class="remarkup-link remarkup-link-ext" rel="noreferrer">WebdriverIO</a> v6 (from v4 or v5). We are currently at 70 or 80% of all repositories at v6. (Depending on if you count repositories, or relevant lines of code.) She created about <a href="https://gerrit.wikimedia.org/r/q/owner:vidhimody6%2540gmail.com" class="remarkup-link remarkup-link-ext" rel="noreferrer">60 commits</a>. In the majority of cases, there were no significant problems with the update, so most of her contributions are already merged, about <a href="https://gerrit.wikimedia.org/r/q/owner:vidhimody6%2540gmail.com+is:merged" class="remarkup-link remarkup-link-ext" rel="noreferrer">40 commits</a>.</p>

<p><a href="https://phabricator.wikimedia.org/p/Soham/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_250"><span class="phui-tag-core phui-tag-color-person">@Soham</span></a> evaluated two WebdriverIO alternatives, <a href="https://developers.google.com/web/tools/puppeteer/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Puppeteer</a> (from Google) and <a href="https://www.cypress.io/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Cypress</a>. He also took a quick look at <a href="https://playwright.dev/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Playwright</a> (from Microsoft) but we decided not to evaluate it during the internship. (I&#039;ll probably mention Playwright in another post soon.) He created almost <a href="https://gerrit.wikimedia.org/r/q/owner:soham.parekh1998%2540gmail.com" class="remarkup-link remarkup-link-ext" rel="noreferrer">100 commits</a>. In the end, we decided not to adopt the tools, so we didn&#039;t merge the vast majority of his commits. Only <a href="https://gerrit.wikimedia.org/r/q/owner:soham.parekh1998%2540gmail.com+is:merged" class="remarkup-link remarkup-link-ext" rel="noreferrer">2 commits</a> were merged.</p>

<p>They created a lot of small commits that were easy to review. Small commits are also easy to revert, if a problem is found later. Both students had to revert at least one commit. Vidhi had to revert <a href="https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/615682" class="remarkup-link remarkup-link-ext" rel="noreferrer">615682</a> and Soham <a href="https://gerrit.wikimedia.org/r/c/mediawiki/core/+/595932" class="remarkup-link remarkup-link-ext" rel="noreferrer">595932</a>. I hope that experience made it clear why I was insisting on small commits from the start.</p>

<h3 class="remarkup-header">Mentors</h3>

<p>I&#039;ve managed to recruit a couple of mentors, <a href="https://phabricator.wikimedia.org/p/Jpita/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_251"><span class="phui-tag-core phui-tag-color-person"><span class="phui-tag-dot phui-tag-color-grey"></span>@Jpita</span></a> and <a href="https://phabricator.wikimedia.org/p/jbolorinos-ctr/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_252"><span class="phui-tag-core phui-tag-color-person"><span class="phui-tag-dot phui-tag-color-grey"></span>@jbolorinos-ctr</span></a>  They were a lot of help, especially while I was on vacation in August. Pita&#039;s specialty during the internship was Cypress and John&#039;s bug reporting.</p>

<h3 class="remarkup-header">Tasks</h3>

<p>We use <a href="https://en.wikipedia.org/wiki/Phabricator" class="remarkup-link remarkup-link-ext" rel="noreferrer">Phabricator</a> for task management.</p>

<p>It&#039;s easy to get overwhelmed or distracted, so good task management is important. We used Phabricator Workboards to organize work (<a href="https://phabricator.wikimedia.org/tag/user-vidhi-mody/" class="remarkup-link" rel="noreferrer">Vidhi</a>, <a href="https://phabricator.wikimedia.org/tag/user-soham/" class="remarkup-link" rel="noreferrer">Soham</a>).</p>

<h3 class="remarkup-header">Blogging</h3>

<p>Interns were writing blog posts every few weeks. Check out their blogs (<a href="https://vidhi-mody.netlify.app/blog/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Vidhi</a>, <a href="https://www.sohamp.dev/blog/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Soham</a>). Each of them even wrote a blog post for my team&#039;s blog, <em><a href="https://phabricator.wikimedia.org/phame/blog/view/21/" class="remarkup-link" rel="noreferrer">Wow. So wikimedia. Such quality. Many testing. Very team.</a></em> Vidhi wrote <a href="/J201" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_246"><span class="phui-tag-core phui-tag-color-object">Blog Post: GSoCpedia: The journey so far</span></a> and Soham wrote <a href="/J202" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_247"><span class="phui-tag-core phui-tag-color-object">Blog Post: Fanboying Cypress</span></a>.</p>

<h3 class="remarkup-header">Communication</h3>

<p>We had daily video meetings. When there was a problem to resolve, one of us would share the screen. That helped to resolve a lot of problems quickly.</p>

<p>We&#039;ve used <a href="https://en.wikipedia.org/wiki/Zulip" class="remarkup-link remarkup-link-ext" rel="noreferrer">Zulip</a> for text messages. That helped us stay in touch during the day, or on rare days when we didn&#039;t have a meeting.</p>

<p>Interns were invited to my team&#039;s IRC channel and weekly video meeting. They were also invited to our informal Telegram group and weekly watercooler video meeting. The group and the meeting are used for non-work related chat. I hope that helped them to see how a team works, and also to spend some social time with us.</p>

<p>They have participated in our virtual team offsite, workshops on test driven development, refactoring and bug reporting.</p>

<h3 class="remarkup-header">Documentation</h3>

<p>Vidhi created the majority of the documentation on how use <a href="https://www.mediawiki.org/wiki/MediaWiki-Docker" class="remarkup-link remarkup-link-ext" rel="noreferrer">MediaWiki-Docker</a> for various extensions (<a href="/T256239" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_248"><span class="phui-tag-core phui-tag-color-object">T256239: Run Selenium tests targeting MediaWiki-Docker</span></a>). MediaWiki-Docker is the closest thing we have to the official local development environment.</p>

<h3 class="remarkup-header">Upstream</h3>

<p>To help with debugging, Soham worked on recording videos of all test runs. We had a framework that works only on Linux. He found an NPM package that works on all platforms, <a href="https://www.npmjs.com/package/wdio-video-reporter" class="remarkup-link remarkup-link-ext" rel="noreferrer">wdio-video-reporter</a>. When we discovered it supports only WebdriverIO v5 he contributed a <a href="https://github.com/presidenten/wdio-video-reporter/pull/44" class="remarkup-link remarkup-link-ext" rel="noreferrer">patch</a> to the package to make it work with v6.</p>

<h2 class="remarkup-header">Things that didn&#039;t go well</h2>

<h3 class="remarkup-header">COVID-19</h3>

<p>Both interns had hardware trouble. In normal times, buying a new laptop would not be a problem. During the pandemic it was pretty hard. Both of them managed to resolve the hardware problems somehow.</p>

<h3 class="remarkup-header">Local development environment</h3>

<p>The biggest problem for Vidhi was that she needed to update about 30 different repositories, but there&#039;s is no official local development environment. If there were any problems with the update (for example, something breaks in our continuous integration), it&#039;s really hard to debug it, if you can&#039;t reproduce the problem locally. To fix the problem, she created the majority of the documentation on how use MediaWiki-Docker for the relevant repositories.</p>

<h3 class="remarkup-header">Continuous integration</h3>

<p>The biggest problem for Soham was that our continuous integration is hard to debug, because it&#039;s hard to replicate locally. If a piece of code works fine on your machine, but fails in continuous integration, it&#039;s almost impossible to debug it.</p>

<h3 class="remarkup-header">Too many interns</h3>

<p>I made a mistake of mentoring two interns. I never had enough time to resolve problems for both of them. If I was mentoring only one, I would have more time to focus on their project.</p>

<h3 class="remarkup-header">Mentors with limited experience</h3>

<p>Both co-mentors were pretty new both to Wikimedia and to our Selenium/WebdriverIO framework, so most of the time they couldn&#039;t help much. I&#039;m not saying mentors didn&#039;t do a good job. I think they did a great job. The failure is mine. I should have recruited more mentors with more experience.</p>

<h2 class="remarkup-header">Advice for interns</h2>

<h3 class="remarkup-header">Vidhi and Soham</h3>

<p>Both interns had good coding and communication skills. Vidhi&#039;s advantage was communication, Soham&#039;s coding. I&#039;m not saying their other skills were not good, only that it was obvious each of them was clearly better in one skill.</p>

<p>After the internship, I&#039;ve suggested that they take a break from coding. A week or two. Instead of coding, they should be thinking about the internship and writing about it.</p>

<p>Another piece of advice I had for them was to try mentoring. (You&#039;ll probably hear more about that soon.)</p>

<p>I guess one of the most important things they have learned during the internship is how to create small commits with good commit messages. They have also learned how to create a good bug report. Bug reporting is a skill that they have significantly improved in, but they still need to work on it.</p>

<h3 class="remarkup-header">General advice</h3>

<p>A piece of advice for all interns: good communication skills are as important as good coding skills, if not slightly more important.</p>

<h2 class="remarkup-header">Advice for mentors</h2>

<h3 class="remarkup-header">Myself</h3>

<p>I&#039;ve decided to take a break from mentoring. (I might not take that advice. More about that soon.) It was a lot of fun, but also a lot of work. Instead, like I&#039;ve advised the interns, I would like to spend some time thinking about the internship and writing about it.</p>

<h3 class="remarkup-header">General advice</h3>

<p>A piece of advice for all mentors: prepare to spend more time on mentoring than you&#039;ve originally planned. I&#039;ve spent about 10 hours a week per intern.</p>

<p><em>Originally published as <a href="https://filipin.eu/gsoc-june-august-2020" class="remarkup-link remarkup-link-ext" rel="noreferrer">Google Summer of Code, June-August 2020</a> at Željko Filipin&#039;s blog.</em></p></div></content></entry><entry><title>Google Summer of Code, February-May 2020</title><link href="/phame/live/21/post/209/google_summer_of_code_february-may_2020/" /><id>https://phabricator.wikimedia.org/phame/post/view/209/</id><author><name>zeljkofilipin (Željko Filipin)</name></author><published>2020-09-24T15:52:49+00:00</published><updated>2024-04-21T21:19:48+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>In February 2020 I&#039;ve noticed an <a href="https://lists.wikimedia.org/pipermail/wikitech-l/2020-February/093062.html" class="remarkup-link remarkup-link-ext" rel="noreferrer">e-mail</a> that Wikimedia is participating in <a href="/tag/google-summer-of-code/" class="phui-tag-view phui-tag-type-shade phui-tag-blue phui-tag-shade phui-tag-icon-view " data-sigil="hovercard" data-meta="0_256"><span class="phui-tag-core "><span class="visual-only phui-icon-view phui-font-fa fa-umbrella" data-meta="0_255" aria-hidden="true"></span>Google-Summer-of-Code</span></a>. Unfortunately, I&#039;ve ignored the e-mail and soon forgot about it.</p>

<p>In March I&#039;ve realized that I have a couple of projects that would be good internship projects, <a href="/T247844" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_253"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T247844: Upgrade WebdriverIO to v6 in all repositories</span></span></a> and <a href="/T247835" class="phui-tag-view phui-tag-type-object " data-sigil="hovercard" data-meta="0_254"><span class="phui-tag-core-closed"><span class="phui-tag-core phui-tag-color-object">T247835: Evaluate WebdriverIO replacements for our browser automation framework</span></span></a>. I&#039;ve managed to apply as a mentor in the last responsible moment. I&#039;ve also managed to recruit a couple of mentors, <a href="https://phabricator.wikimedia.org/p/Jpita/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_257"><span class="phui-tag-core phui-tag-color-person"><span class="phui-tag-dot phui-tag-color-grey"></span>@Jpita</span></a> and <a href="https://phabricator.wikimedia.org/p/jbolorinos-ctr/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_258"><span class="phui-tag-core phui-tag-color-person"><span class="phui-tag-dot phui-tag-color-grey"></span>@jbolorinos-ctr</span></a>.</p>

<p>I&#039;ve expected we&#039;ll get maybe one student application. I really didn&#039;t expect more than that. We got six applications. One student was completely unresponsive, but five were very active. I was overwhelmed with the tasks and commits they have created, and questions they have asked. March and April were very busy.</p>

<p>In May the accepted students were announced. We will be mentoring <a href="https://phabricator.wikimedia.org/p/Vidhi-Mody/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_259"><span class="phui-tag-core phui-tag-color-person">@Vidhi-Mody</span></a> and <a href="https://phabricator.wikimedia.org/p/Soham/" class="phui-tag-view phui-tag-type-person " data-sigil="hovercard" data-meta="0_260"><span class="phui-tag-core phui-tag-color-person">@Soham</span></a> from June to August. We&#039;ve spend May preparing for the internship. Both of them are already working on their projects. I&#039;ve created a <a href="https://www.mediawiki.org/wiki/Google_Summer_of_Code/2020/WebdriverIO" class="remarkup-link remarkup-link-ext" rel="noreferrer">status page</a> to have a quick overview of the projects.</p>

<p>Both of them already wrote about the internship. Vidhi wrote <a href="https://vidhi-mody.netlify.app/blog/2020-05-17-gsocpedia-chapter-one/" class="remarkup-link remarkup-link-ext" rel="noreferrer">GSoCpedia: Chapter One</a> and Soham wrote <a href="https://www.sohamp.dev/blog/2020-05-19-road-to-ninja/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Road to Ninja ⚔️</a> and <a href="https://www.sohamp.dev/blog/2020-05-29-virtues-of-a-programmer/" class="remarkup-link remarkup-link-ext" rel="noreferrer">Virtues of a Programmer</a>.</p>

<p>I&#039;m really looking forward to the internship. I hope I will be a good mentor to the students. I hope I will be a good co-mentor to other mentors. I hope the students will learn many skills that will be useful for them in life. How to create small commits, how to write good commit messages, the importance of local development environments, how to write code so it&#039;s easy to review...</p>

<p><em>Originally published as <a href="https://filipin.eu/gsoc-february-may-2020" class="remarkup-link remarkup-link-ext" rel="noreferrer">Google Summer of Code, February-May 2020</a> at Željko Filipin&#039;s blog.</em></p></div></content></entry><entry><title>Fanboying Cypress</title><link href="/phame/live/21/post/202/fanboying_cypress/" /><id>https://phabricator.wikimedia.org/phame/post/view/202/</id><author><name>Soham (Soham Parekh)</name></author><published>2020-07-07T11:50:39+00:00</published><updated>2020-08-27T21:01:20+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><p>Software development is pretty agile in its nature in that things normally tend to move pretty quickly.  However, the faster you move, the more things break. As a codebase grows in size, its pieces become more and more complex, with every line adding a potential bug. In Wikimedia Foundation, we keep a handle on this through rigorous amounts of testing. Manual testing requires a lot of effort especially when you have a large core repository with a plethora of plugins and extensions that need to be tested. One of the hot frameworks on the scene is <a href="https://cypress.io" class="remarkup-link remarkup-link-ext" rel="noreferrer">Cypress</a>, a complete end to end testing solution.</p>

<p>We have undoubtedly entered into the era of automated testing. Despite this, web end-to-end testing has always been a tricky beast. Good ol’ <a href="https://www.npmjs.com/package/selenium-webdriver" class="remarkup-link remarkup-link-ext" rel="noreferrer">Selenium</a> has been the main solution for quite some time now and has a huge history.  Despite its impressive browser compatibility, having tests that are more consistent and less flakey can be a non-trivial matter mainly because Selenium was not designed for app testing. Enter Cypress, a modern automated testing tool, which not only promises to fix the old and broken ways of past framework but also make the entire process more developer centric. After spending over two months trying to migrate the tests written in <a href="https://webdriver.io" class="remarkup-link remarkup-link-ext" rel="noreferrer">WebdriverIO</a> to Cypress, I wanted to share my journey with Cypress thus far.</p>

<h3 class="remarkup-header">What Cypress brings to the Party?</h3>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/shnsnntqqhpljanktpet/PHID-FILE-zxxi2bmvsh6wunjdkdmb/cypress_overview.png" class="phabricator-remarkup-embed-image-full" data-sigil="lightboxable" data-meta="0_261"><img src="https://phab.wmfusercontent.org/file/data/shnsnntqqhpljanktpet/PHID-FILE-zxxi2bmvsh6wunjdkdmb/cypress_overview.png" height="597" width="1134" loading="lazy" alt="cypress_overview.png (597×1 px, 128 KB)" /></a></div></p>

<p>End-to-end testing is notoriously known for its fragmented experience. You need to bring a lot of your own tools, for example, you need:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">a test runner</li>
<li class="remarkup-list-item">an assertion library</li>
<li class="remarkup-list-item">some reporters</li>
<li class="remarkup-list-item">mocks, etc</li>
</ul>

<p>Cypress includes all of these good stuff out of the box, making setup and configuration dead simple. At the same time, Cypress gives developers an immense amount of freedom when it comes to plugging in things of your own preference. In short,</p>

<blockquote><p>Cypress takes a batteries included but removable approach</p></blockquote>



<h3 class="remarkup-header">Documentation</h3>

<p>A good software should be accompanied by a great documentation for it to be complete.</p>

<p>Cypress has a documentation that is some of the best I have ever read. They have <a href="https://docs.cypress.io/guides/guides/command-line.html#Installation" class="remarkup-link remarkup-link-ext" rel="noreferrer">guides on everything</a> that you are likely to encounter. They do a great job telling you how to use the product. In fact, they even have in-depth explanations on the <a href="https://docs.cypress.io/guides/overview/key-differences.html#Architecture" class="remarkup-link remarkup-link-ext" rel="noreferrer">architecture</a>, <a href="https://docs.cypress.io/guides/overview/key-differences.html#Flake-resistant" class="remarkup-link remarkup-link-ext" rel="noreferrer">flakey tests</a> and <a href="https://docs.cypress.io/guides/references/best-practices.html" class="remarkup-link remarkup-link-ext" rel="noreferrer">best practices</a>.</p>

<h3 class="remarkup-header">Prototyping</h3>

<p>If you have the chance, before adopting anything of this scale, I always think it’s a good idea to test it on a small project first, just to get a feel. Before advocating for it, I added it to my personal blog, just to see how the experience was.</p>

<p>A very simple scenario:</p>

<blockquote><p>Load an app -&gt; Go to index page -&gt; Click blog link -&gt; Assert content shows up</p></blockquote>

<p>This was really as simple as writing a few lines of Javascript for the test itself, the <tt class="remarkup-monospaced">npm</tt> script in <tt class="remarkup-monospaced">package.json</tt> and running it on the CI. I was blown away with how fast it took me, under an hour. I had toiled hard trying to <a href="https://github.com/smooth-code/jest-puppeteer/issues/361" class="remarkup-link remarkup-link-ext" rel="noreferrer">set up video recording with Puppeteer and Jest</a>. Not only did Cypress perform the assertions but also it was recording videos!</p>

<h3 class="remarkup-header">Page Object Model in Cypress</h3>

<p><a href="http://www.seleniumhq.org/docs/06_test_design_considerations.jsp" class="remarkup-link remarkup-link-ext" rel="noreferrer">Page Object Model</a> is an object design pattern in Selenium, where web pages are represented as classes, and the various elements on the page are defined as variables on the class. All possible user interactions can then be implemented as methods on the class.</p>

<p>Since well-named methods in classes are easy to read, this works as an elegant way to implement test routines that are both readable and easier to maintain or update in the future. Let us take an example of a page model for testing user account creation in WebdriverIO.</p>

<div class="remarkup-code-block" data-code-lang="js" data-sigil="remarkup-code-block"><div class="remarkup-code-header">wdio_createaccount.page.js</div><pre class="remarkup-code"><span></span><span class="s2">&quot;use strict&quot;</span><span class="p">;</span>

<span class="kr">class</span> <span class="nx">CreateAccountPage</span> <span class="p">{</span>
    <span class="nx">get</span> <span class="nx">username</span><span class="p">()</span> <span class="p">{</span>
        <span class="k">return</span> <span class="nx">$</span><span class="p">(</span><span class="s2">&quot;#username&quot;</span><span class="p">);</span>
    <span class="p">}</span>

    <span class="nx">get</span> <span class="nx">password</span><span class="p">()</span> <span class="p">{</span>
        <span class="k">return</span> <span class="nx">$</span><span class="p">(</span><span class="s2">&quot;#password&quot;</span><span class="p">);</span>
    <span class="p">}</span>

    <span class="nx">get</span> <span class="nx">confirmPassword</span><span class="p">()</span> <span class="p">{</span>
        <span class="k">return</span> <span class="nx">$</span><span class="p">(</span><span class="s2">&quot;#retypePassword&quot;</span><span class="p">);</span>
    <span class="p">}</span>

    <span class="nx">get</span> <span class="nx">create</span><span class="p">()</span> <span class="p">{</span>
        <span class="k">return</span> <span class="nx">$</span><span class="p">(</span><span class="s2">&quot;#createBtn&quot;</span><span class="p">);</span>
    <span class="p">}</span>

    <span class="nx">get</span> <span class="nx">heading</span><span class="p">()</span> <span class="p">{</span>
        <span class="k">return</span> <span class="nx">$</span><span class="p">(</span><span class="s2">&quot;#firstHeading&quot;</span><span class="p">);</span>
    <span class="p">}</span>

    <span class="nx">open</span><span class="p">()</span> <span class="p">{</span>
        <span class="nx">browser</span><span class="p">.</span><span class="nx">url</span><span class="p">(</span><span class="s2">&quot;https://some_url.com/account/create&quot;</span><span class="p">);</span>
    <span class="p">}</span>

    <span class="nx">createAccount</span><span class="p">(</span><span class="nx">username</span><span class="p">,</span> <span class="nx">password</span><span class="p">)</span> <span class="p">{</span>
        <span class="k">this</span><span class="p">.</span><span class="nx">open</span><span class="p">();</span>
        <span class="k">this</span><span class="p">.</span><span class="nx">username</span><span class="p">.</span><span class="nx">setValue</span><span class="p">(</span><span class="nx">username</span><span class="p">);</span>
        <span class="k">this</span><span class="p">.</span><span class="nx">password</span><span class="p">.</span><span class="nx">setValue</span><span class="p">(</span><span class="nx">password</span><span class="p">);</span>
        <span class="k">this</span><span class="p">.</span><span class="nx">confirmPassword</span><span class="p">.</span><span class="nx">setValue</span><span class="p">(</span><span class="nx">password</span><span class="p">);</span>
        <span class="k">this</span><span class="p">.</span><span class="nx">create</span><span class="p">.</span><span class="nx">click</span><span class="p">();</span>
    <span class="p">}</span>
<span class="p">}</span>

<span class="nx">module</span><span class="p">.</span><span class="nx">exports</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">CreateAccountPage</span><span class="p">();</span></pre></div>

<p>All you need to do is now call the <tt class="remarkup-monospaced">CreateAccountPage.createAccount</tt> method with proper parameters in order to create a user account. Let us have a look at the Cypress version for this:</p>

<div class="remarkup-code-block" data-code-lang="js" data-sigil="remarkup-code-block"><div class="remarkup-code-header">cypress_createaccount.page.js</div><pre class="remarkup-code"><span></span><span class="s2">&quot;use strict&quot;</span><span class="p">;</span>

<span class="kr">class</span> <span class="nx">CreateAccountPage</span> <span class="p">{</span>
    <span class="nx">constructor</span><span class="p">()</span> <span class="p">{</span>
        <span class="k">this</span><span class="p">.</span><span class="nx">username</span> <span class="o">=</span> <span class="s2">&quot;#username&quot;</span><span class="p">;</span>
        <span class="k">this</span><span class="p">.</span><span class="nx">password</span> <span class="o">=</span> <span class="s2">&quot;#password&quot;</span><span class="p">;</span>
        <span class="k">this</span><span class="p">.</span><span class="nx">confirmPassword</span> <span class="o">=</span> <span class="s2">&quot;#retypePassword&quot;</span><span class="p">;</span>
        <span class="k">this</span><span class="p">.</span><span class="nx">create</span> <span class="o">=</span> <span class="s2">&quot;#createBtn&quot;</span><span class="p">;</span>
        <span class="k">this</span><span class="p">.</span><span class="nx">heading</span> <span class="o">=</span> <span class="s2">&quot;#firstHeading&quot;</span><span class="p">;</span>
    <span class="p">}</span>

    <span class="nx">open</span><span class="p">()</span> <span class="p">{</span>
        <span class="nx">cy</span><span class="p">.</span><span class="nx">visit</span><span class="p">(</span><span class="s2">&quot;https://some_url.com/account/create&quot;</span><span class="p">);</span>
    <span class="p">}</span>

    <span class="nx">createAccount</span><span class="p">(</span><span class="nx">username</span><span class="p">,</span> <span class="nx">password</span><span class="p">)</span> <span class="p">{</span>
        <span class="k">this</span><span class="p">.</span><span class="nx">open</span><span class="p">();</span>
        <span class="nx">cy</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">username</span><span class="p">).</span><span class="nx">type</span><span class="p">(</span><span class="nx">username</span><span class="p">);</span>
        <span class="nx">cy</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">password</span><span class="p">).</span><span class="nx">type</span><span class="p">(</span><span class="nx">password</span><span class="p">);</span>
        <span class="nx">cy</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">confirmPassword</span><span class="p">).</span><span class="nx">type</span><span class="p">(</span><span class="nx">password</span><span class="p">);</span>
        <span class="nx">cy</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">create</span><span class="p">).</span><span class="nx">click</span><span class="p">();</span>
    <span class="p">}</span>
<span class="p">}</span>

<span class="nx">module</span><span class="p">.</span><span class="nx">exports</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">CreateAccountPage</span><span class="p">();</span></pre></div>



<h3 class="remarkup-header">Writing Scenarios with Gherkin</h3>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/cw3upkw3m3e3hwv76q7r/PHID-FILE-yjr3oghclcgvk3pmyvsq/1-78i-I8tt-O4cw-D1k7i-Vs-FVyw.png" class="phabricator-remarkup-embed-image-full" data-sigil="lightboxable" data-meta="0_262"><img src="https://phab.wmfusercontent.org/file/data/cw3upkw3m3e3hwv76q7r/PHID-FILE-yjr3oghclcgvk3pmyvsq/1-78i-I8tt-O4cw-D1k7i-Vs-FVyw.png" height="878" width="1480" loading="lazy" alt="1-78i-I8tt-O4cw-D1k7i-Vs-FVyw.png (878×1 px, 162 KB)" /></a></div></p>

<p>If you have written end-to-end tests before, you may be familiar with Gherkin syntax, used by Cucumber. This is an expressive, English-like way to write test scenarios. It can help with documenting your features and non-developers can contribute to writing test cases. I found <a href="https://github.com/TheBrainFamily/cypress-cucumber-preprocessor" class="remarkup-link remarkup-link-ext" rel="noreferrer">a way to integrate this file syntax into Cypress using a plugin</a>.</p>

<div class="remarkup-code-block" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code">Feature: Searching on Wikipedia
    As a programmer, I want to search Wikipedia, so that I can learn new things.

    Background:
        Given I am on Wikipedia

    Scenario: Simple Wikipedia search
        When the search phrase &quot;Bayesian&quot;  is entered
        Then results for &quot;Bayesian&quot; are shown</pre></div>

<p>After writing these commands, the plugin will then go to Cypress to actually run the implementations:</p>

<div class="remarkup-code-block" data-code-lang="js" data-sigil="remarkup-code-block"><pre class="remarkup-code"><span></span><span class="kr">import</span> <span class="p">{</span> <span class="nx">Given</span> <span class="p">}</span> <span class="nx">from</span> <span class="s1">&#39;cypress-cucumber-preprocessor/steps&#39;</span><span class="p">;</span>

<span class="nx">Given</span><span class="p">(</span><span class="s1">&#39;I am on Wikipedia website&#39;</span><span class="p">,</span> <span class="p">()</span> <span class="p">=&gt;</span> <span class="p">{</span>
  <span class="nx">cy</span><span class="p">.</span><span class="nx">visit</span><span class="p">(</span><span class="s1">&#39;https://en.wikipedia.com&#39;</span><span class="p">);</span>
<span class="p">});</span>

<span class="nx">When</span><span class="p">(</span><span class="s1">&#39;the search phrase &quot;Bayesian&quot; is entered&#39;</span><span class="p">,</span> <span class="p">()</span> <span class="p">=&gt;</span> <span class="p">{</span>
  <span class="p">...</span>
<span class="p">});</span>

<span class="nx">When</span><span class="p">(</span><span class="s1">&#39;results for &quot;Bayesian&quot; are shown&#39;</span><span class="p">,</span> <span class="p">()</span> <span class="p">=&gt;</span> <span class="p">{</span>
  <span class="p">...</span>
<span class="p">});</span></pre></div>



<h3 class="remarkup-header">Asserting Elements and Best Practices</h3>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/62fakwxgzktwoa36v24t/PHID-FILE-y76v4tkl7b5odbdzbjzs/js-testing.png" class="phabricator-remarkup-embed-image-full" data-sigil="lightboxable" data-meta="0_263"><img src="https://phab.wmfusercontent.org/file/data/62fakwxgzktwoa36v24t/PHID-FILE-y76v4tkl7b5odbdzbjzs/js-testing.png" height="600" width="1000" loading="lazy" alt="js-testing.png (600×1 px, 12 KB)" /></a></div></p>

<p>End-to-end testing is all about making sure elements on the page have the right content. When writing Cypress tests, you will likely be spending 70% of your time selecting elements and peering inside them. Cypress has a standard <a href="https://docs.cypress.io/api/commands/get.html#Syntax" class="remarkup-link remarkup-link-ext" rel="noreferrer">get()</a> command which exposes a jQuery-like selector to you. This should be familiar to those with some experience in Selenium.</p>

<p>However, a problem with this selector is that it can be used incorrectly and there is no way to enforce (with code) it’s usage. Welcome <a href="https://github.com/testing-library/cypress-testing-library" class="remarkup-link remarkup-link-ext" rel="noreferrer">cypress-testing-library</a>. This plugin exposes a myriad of commands prefixed with <tt class="remarkup-monospaced">find</tt> which work similarly to how <tt class="remarkup-monospaced">get()</tt> does in native Cypress. All of these commands make for selectors <a href="https://kentcdodds.com/blog/making-your-ui-tests-resilient-to-change" class="remarkup-link remarkup-link-ext" rel="noreferrer">that are resilient to change</a>. This can have a dramatic effect on how your tests stay consistent as your application progresses.</p>

<h3 class="remarkup-header">Time for Some Debugging</h3>

<p>Debugging end-to-end tests with Selenium can be somewhat of a nightmare. With Cypress, this pain is at an all-time low. One of the biggest focuses of the core product is to be able to debug is one of the more pleasant experiences in your Cypress journey. Like for most things, <a href="https://on.cypress.io/plugins-guide" class="remarkup-link remarkup-link-ext" rel="noreferrer">they have a great guide to get you started</a>.</p>

<h3 class="remarkup-header">Browser Support</h3>

<p>Unfortunately, if your organization needs to have support for IE11, you are out of luck. <a href="https://github.com/cypress-io/cypress/issues/310#issuecomment-337349727" class="remarkup-link remarkup-link-ext" rel="noreferrer">The Cypress team has explicitly said they won’t be supporting it</a>. <a href="https://github.com/cypress-io/cypress/issues/310" class="remarkup-link remarkup-link-ext" rel="noreferrer">There is an incredible thread on Github that I really hope you read through</a>. It goes into why they are rolling this out slowly and didn’t choose WebDriver from the beginning and wrote their own custom driver. This is the only place where Cypress falls behind Selenium. However, it does support most of the Chromium-based browsers and is starting to roll-out support for Firefox too and this should serve the needs for most organisations.</p>

<p>I highly recommend everyone in the end-to-end testing community to give Cypress a shot. The quick setup, smooth documentation, fluid construction of tests and warm and supportive community will likely make you fall in love with it.</p>

<p><em>Originally published at </em> <a href="https://www.sohamp.dev/blog/2020-06-29-fanboying-cypress" class="remarkup-link remarkup-link-ext" rel="noreferrer">https://www.sohamp.dev/blog/2020-06-29-fanboying-cypress</a></p></div></content></entry><entry><title>GSoCpedia: The journey so far</title><link href="/phame/live/21/post/201/gsocpedia_the_journey_so_far/" /><id>https://phabricator.wikimedia.org/phame/post/view/201/</id><author><name>Vidhi-Mody (Vidhi-Mody)</name></author><published>2020-07-07T11:25:34+00:00</published><updated>2020-10-30T16:04:43+00:00</updated><content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml"><blockquote><p>“Imagine a world in which every single human being can freely share in the sum of all knowledge.”<br />
~ Wikimedia Foundation</p></blockquote>



<h3 class="remarkup-header">Foreword</h3>

<p><a href="https://summerofcode.withgoogle.com" class="remarkup-link remarkup-link-ext" rel="noreferrer">Google Summer of Code (GSoC)</a> is a global program focused on introducing students to open source software development. Students work on a 3 month programming project with an open source organization during their break from university.</p>

<p>As a part of Google Summer of Code, student participants are paired with a mentor from the participating organizations, gaining exposure to real-world software development and techniques. Students have the opportunity to spend the break between their school semesters earning a stipend while working in areas related to their interests.</p>

<p>In turn, the participating organizations are able to identify and bring in new developers who implement new features and hopefully continue to contribute to open source even after the program is over. Most importantly, more code is created and released for the use and benefit of all.</p>

<h3 class="remarkup-header">Introduction</h3>

<p>I believe that Open source projects are a great way of developing quality products by working together with other developers. I have always wanted to contribute to projects that I myself use to give back to the Community. Back in my school days, I remember using Wikipedia extensively for assignments and projects. While going through the GSoC organizations list, when I came across Wikimedia Foundation, I knew it was the organization I wanted to apply to.</p>

<p>For me, Google Summer of Code was an opportunity to meet the community, exchange ideas, learn new skills play a small role in the open source community, and contribute to the organisation that I love. I immediately started working on drafting my proposal as well as performed all the required micro-tasks to familiarize myself with the code-base.</p>

<h5 class="remarkup-header">Ad Astra Per Aspera 🎊</h5>

<p>May 4 2020, I got an email with the subject line <strong><em>“GSoC 2020: Congratulations, your proposal with Wikimedia Foundation has been accepted!&quot;</em></strong> 🎉<br />
My joy knew no bounds. I was super excited to get started and was looking forward to a great summer!</p>

<p>The project I will be working on is <a href="https://phabricator.wikimedia.org/T247844" class="remarkup-link" rel="noreferrer">Upgrade WebdriverIO to the latest version for all repositories</a>. My Google Summer of Code Proposal can be found <a href="https://phabricator.wikimedia.org/T248868" class="remarkup-link" rel="noreferrer">here</a>.</p>

<h3 class="remarkup-header">The Journey so far</h3>

<p>A huge shoutout to my mentor, Željko for giving me the best on-boarding experience ever! In such a short duration, the community has really grown on me. One of the major reasons for this is that the organization offers so many opportunities to get involved in the community.</p>

<h5 class="remarkup-header">Test Stratergy by RiskStorming with TestSphere 💡</h5>

<p>This was a part of the EngProd virtual offsite: micro hackathon. In such hackathons, the main motive is to pick small bugs/tasks and work with people you don’t normally collaborate with.</p>

<p><div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/5gjmphhryehgfrmcxmcu/PHID-FILE-xinaywnlyror2h5bzfto/mediawiki_hackathon.png" class="phabricator-remarkup-embed-image-full" data-sigil="lightboxable" data-meta="0_264"><img src="https://phab.wmfusercontent.org/file/data/5gjmphhryehgfrmcxmcu/PHID-FILE-xinaywnlyror2h5bzfto/mediawiki_hackathon.png" height="1037" width="1616" loading="lazy" alt="mediawiki_hackathon.png (1×1 px, 1 MB)" /></a></div></p>

<p>Testsphere is a card game for testers! It was developed by Beren Van Daele and is sold through Ministry of Testing. RiskStorming is a way to expose the biggest and most important risks to a product or project. It’s a way to discuss and discover things that are often quite scary to talk about. No one really wants to dwell on ways their product could catastrophically fail. The cards provide a nice, fun, colourful vehicle to discuss these.</p>

<p>The projects that we tested were :</p>

<p><strong>1. The Death Star </strong>(I wish I was a Star Wars fan to actually understand more of what was going on 😅)<br />
✔ Quality aspects picked: Functionality, Testability, Operations, Resource Management, Disaster Control, Security and Permissions, Performance</p>

<p><strong>2. Wikipedia Donation Banners</strong><br />
✔ Quality aspects picked: Accessibility, Internationalization, User-friendliness, Performance, Security and Permissions, Concurrency</p>

<p>For more details check <a href="https://phabricator.wikimedia.org/T252704" class="remarkup-link" rel="noreferrer">here</a>.</p>

<h5 class="remarkup-header">The WaterCooler 🚰</h5>

<p>I always wondered how networking was possible if you are working remotely. But there’s a solution for every problem right? So what if normal workplace scenarios like, heading out to get a glass of water and running into a co-worker at that point of time is not possible. You can always set up a meet to catch up with each others lives. The WaterCooler meet aims to do just that. I personally feel it is a great initiative to learn more about each other and take some time off work.</p>

<p>I would like to share one of the stories I got to hear on the WaterCooler by James. Early in his career he worked in an aviation company in the UK. The project was related to the network connectivity of the airplane during it’s entire journey. The code was written. The code was tested by flying the plane through UK Everything seemed to be working fine. Now the interesting part, during an international journey the network connection was working just fine uptil it suddenly disconnected completely. When the flight landed, the development team was called to figure out what went wrong. Turns out the flight passed through the equator (lattitude: 0) leading to the divide by zero error! 😱</p>

<p>For someone like me, who is just getting started as a developer, I loved interacting with the highly experienced members of the community. (<em>Not kidding, few of them have years of experience greater than what my age is!)</em></p>

<h5 class="remarkup-header">The TDD Workshop 🛠️</h5>

<p>This workshop was by far one of the best experiences I’ve had so far. The workshop was about learning basics of Test Driven Development - its rules and Red-Green-Refactor loop. The workshop was very interactive and all the participants worked together while writing code as well as refactoring it. (You can refer to the code for this workshop on <a href="https://github.com/zbyszkop/js-tdd-workshop" class="remarkup-link remarkup-link-ext" rel="noreferrer">GitHub</a>)<br />
<div class="phabricator-remarkup-embed-layout-left"><a href="https://phab.wmfusercontent.org/file/data/dg62vnpx2gzp645mbr2m/PHID-FILE-cgst25vxzt3cpz5b4qyp/TDD.jpeg" class="phabricator-remarkup-embed-image-full" data-sigil="lightboxable" data-meta="0_265"><img src="https://phab.wmfusercontent.org/file/data/dg62vnpx2gzp645mbr2m/PHID-FILE-cgst25vxzt3cpz5b4qyp/TDD.jpeg" height="320" width="178" loading="lazy" alt="TDD.jpeg (320×178 px, 14 KB)" /></a></div></p>

<h3 class="remarkup-header">Carpe diem ✨</h3>

<p>As far as the internship is concerned, I’m quite on track. Currently, the second work period has begun. I still remember the day I had my first commits merged. It was and always will be special, for I had made my first ever contribution to the organization. Since the community bonding period, not only have my coding skills improve, I have even learnt the importance of good commit messages, bug reports and small patches. I have also gained a new sense of professionalism and a clearer view of what it meant to be working as a community! You can view my progress so far <a href="https://phabricator.wikimedia.org/T247844" class="remarkup-link" rel="noreferrer">here</a>.</p>

<h3 class="remarkup-header">Afterword 🔚</h3>

<p>The organization has been very helpful and welcoming since the day I began my application process. Whenever I was stuck with something, I have always received the guidance I need however silly my questions might have been. I see myself continuing to contribute to Wikimedia Foundation as a Volunteer even after the program ends. 💜</p>

<p><em>Originally published at </em><a href="https://www.vidhimody.me/blog/2020-07-04-gsocpedia-the-journey-so-far/" class="remarkup-link remarkup-link-ext" rel="noreferrer">https://www.vidhimody.me/blog/2020-07-04-gsocpedia-the-journey-so-far/</a></p></div></content></entry></feed>