Page MenuHomePhabricator

Outreachy 21 - Proposal (Evaluate Microsoft Playwright as replacement for our browser automation)
Closed, DeclinedPublic

Description

Profile Information

Name: Akanksha Bhattachan
Timezone : UTC+5:45
Linkedin : https://www.linkedin.com/in/akankshabhattachan/
Location: Kathmandu, Nepal
Working Hours: 08 am - 11 am UTC+05:45 , 4 pm - 10 pm UTC+05:45

Background

Purpose

Wikimedia is a global movement whose mission is to bring free educational content to the world, via Wikipedia and other projects.

Currently Wikimedia supports a lot of repositories as well as extensions. So, to make sure good code practices are implemented in all these repos, the Wikimedia team performs an extensive amount of testing. In the current situation, WebdriverIO is being used as a browser automation framework for implementing end to end tests across multiple repos.

However, the Wikimedia team would like to evaluate Microsoft Playwright against WebdriverIO as a potential replacement for our browser automation framework. Previously, Puppeteer & Cypress was evaluated against WebdriverIO but Cypress was not being able to run properly on CI. The tasks for this proposal are as follows:

  • Implement existing tests across moderately sized repo's in Microsoft Playwright
  • Introduce video recording and screenshots of tests
  • Benchmark Playwright against Puppeteer (using previous implementation) and WebdriverIO.
  • Re-run a short evaluation on Cypress (Depending upon whether the issues with Cypress are resolved)

Microsoft Playwright and Brief on Implementation

Playwright is a new, open-source, JavaScript-based, cross-browser automation library for end-to-end testing. It is focused on enabling a cross-browser web automation platform which is ever-green, capable, reliable and fast.
The goal of Playwright is to provide a single API to developers and testers to automate their web applications to improve automated UI testing by eliminating flakiness, improving the speed of execution and offering insights into the browser operation across today’s three major browser engines :

  • Chromium
  • Firefox
  • WebKit

Microsoft Playwright should be developed with methodology which can be integrated with existing Wikimedia projects with better result than the existing ones.

  • The setup can be done same as other node modules.
  • Good documentation is available for Playwright module with detail API reference, tutorials.
  • CI configurations samples are provided for common CI Providers.
  • Playwright scripts work with existing debugging tools like Nodejs debuggers and browser developer tools.

Why Is This Necessary?

To automate testing across all modern browsers taking following advantages:

  • Fast and reliable (Auto-wait APIs)
  • Support for all browsers (Chrome, Edge, Webkit, Firefox)
  • Powerful automation capabilities
  • Timeout-free automation (Eliminates flakiness)
  • Easy to integrate with workflow
  • Playwright in CI environments(sample configurations for common CI)
  • It supports both Headless and headful.(Headful is great for debugging, and headless is faster and suited for CI/cloud executions.)

Do You See Any Risks/Concerns Involved In implementing The Planned Features?

  • It is mentioned to implement existing tests across moderately sized repo's in Microsoft Playwright, however, the number of repos are not described so, if there are many / complex repos then it can be challenging.
  • As per my findings till now, Playwright tests video recording is supported only for browser Chromium .
  • Though it is mentioned it supports testing across browsers Chromium , Firefox , Webkit, testing on Firefox is not as stable as Chromium and Webkit.

Mentors

@zeljkofilipin @Vidhi-Mody @Soham

Deliverables

Planning for the intern tasks timeline :

  1. Community bonding period. 1 Dec 2020 - 1 Dec 2020

Implement existing tests across moderately sized repo's in Microsoft Playwright

  • Install dependencies , Setup environment and explore core details, API References, best practices tutorials 2 Dec 2020 - 3 Dec 2020
  • Create a sample test 4 Dec 2020 - 6 Dec 2020
  • Communicate with mentors and select repo for implementation, explore the repo for implementation 7 Dec 2020 - 8 Dec 2020
  • Start working on implement existing tests across moderately sized repo's in Microsoft Playwright 9 Dec 2020 - 23 Dec 2020
  • Feedback from Mentors, work to implement as suggested 24 Dec 2020 - 30 Dec 2020
  • Write report on (Implement existing tests across moderately sized repo's in Microsoft Playwright) 31 Dec 2020 - 31 Dec 2020

Introduce video recording and screenshots of tests

  • Explore and Install dependencies modules 1 Jan 2020 - 2 Jan 2020
  • Explore API classes and dependencies node- modules for recording and screen shots 3 Jan 2020 - 5 Jan 2020
  • Start working on taking video recording and screenshots of test 6 Jan 2020 - 22 Jan 2020
  • Feedback from Mentors, work to implement as suggested 23 Jan 2020 - 30 Jan 2020
  • Write report on (Introduce video recording and screenshots of tests) 31 Jan 2020 - 31 Jan 2020

Benchmark Playwright against Puppeteer (using previous implementation) and WebdriverIO.

  • Install the previous implementation Puppeteer and webdriverIO and setup environment 1 Feb 2020-2 Feb 2020
  • Explore previous implementation Puppeteer and webdriverIO 3 Feb 2020 - 7 Feb 2020
  • Start working conducting test with Playwright , Puppeteer and WebdriverIO and documentation 8 Feb 2020 - 18 Feb 2020
  • Feedback from Mentors, work to implement as suggested 19 Feb 2020 - 27 Feb 2020
  • Write report on (Benchmark Playwright against Puppeteer (using previous implementation) and WebdriverIO ) 28 Feb 2020 - 28 Feb 2020

Re-run a short evaluation on Cypress (Depending upon whether the issues with Cypress are resolved)

  • Setup the Cypress environment 26 Feb 2020 - 28 Feb 2020
  • Explore Cypress 1 Mar 2020 - 3 Mar 2020
  • Work on re-running a short evaluation on Cypress 4 Mar 2020 - 10 Mar 2020
  • Feedback from Mentors, wrap up the all the tasks 11 Mar 2020 - 25 Mar 2020
  • Write report on (Re-run a short evaluation on Cypress (Depending upon whether the issues with Cypress are resolved) ) 26 Mar 2020 - 26 Mar 2020

Contribution made for the project

Other Deliveries

Blog post on my progress every week
Regular communication with my mentor(s) and other community members

About Me

I am currently working as Associate Project Manager in Javra Software Nepal. I had worked as a developer in PHP, MEAN stack projects.
A few years ago only I came to know about what is open source software. I also wanted to contribute to FOSS and tried, unfortunately previous attempts were not successful.
Though its been more years in technical industry, I want to grow in FOSS, skills, explore the communities working together. I came to know about Outreachy program from a friend from Bangalore whom I met in women technical community. This program has given me motivation, opportunity to contribute . The contribution given for this project are my first contribution though it's small and very happy about this progress.

What does making this project happen mean to you?

This will give me an opportunity to contribute to the free software, to explore in detail in automated testing, uplift my skills, explore being part working together in community. Though I have been working for more years in the IT industry, I didn't know how to contribute to open source and be a part of it.

Projects

I have previously worked on MEAN stack projects which will be helpful for this project.

Boondrive (https://boondrive.com/) : It is a SAAS digital asset management application. I have been involved in the core team of development and also written the unit testing on some parts for this application. I developed the skill of unit testing from this project.

Email Reader System : It is the MEAN stack project with some machine learning feature. The email from the inbox will be read and retrieves the data from the email and after training the format, it will provide data as it is trained according to the format. I was also involved in the development team and also wrote some unit testing for this too. I have gained some knowledge on machine learning.

Skills

  • Languages: PHP, Python, JavaScript, Solidity
  • Frameworks: Bootstrap
  • Web Technologies: HTML, CSS
  • Version Control Systems: Git, Gitlab
  • Databases: MySQL, MongoDB
  • Libraries and tools: Angularjs, Selenium, Kubernetes, ReactJS (learning)
  • Cloud Platforms: Google Cloud

Event Timeline

Gopavasanth subscribed.

@Akanksha_Bhattachan We are sorry to say that we could not allocate a slot for you this time. Please do not consider the rejection to be an assessment of your proposal. We received over 28 quality applications, and we could only accept 7 interns. We were not able to give all applicants a slot that would have deserved one, and these were some very tough decisions to make. Please know that you are still a valued member of our community and we by no means want to exclude you. Many interns who we did not accept in 2019 have become Wikimedia maintainers, contractors and even Outreachy interns and mentors this year!

Your ideas and contributions to our projects are still welcome! As a next step, you could consider finishing up any pending pull requests or inform us that someone has to take them over. Here is the recommended place for you to get started as a newcomer: https://www.mediawiki.org/wiki/New_Developers.

If you would still be eligible for Outreachy next year, we look forward to your participation!

If you're looking for a task take a look at T210726: Selenium framework maintenance. Let us know if you need help.