Page MenuHomePhabricator

[Outreachy 2020 Proposal (Round 21)] Refactor Selenium tests and perform cleanup
Closed, DeclinedPublic

Description

Profile Information

Name: Santana Kenner
Pronouns: he/him/his
PortfolioCVGitHubGitLab
Location: NYC
Working Hours: 8:00 - 17:00 EST
Timezone: EST (UTC -5)

Synopsis

Delivery of optimal quality software with unique and innovative features is always a priority. However, without evaluating software components under various expected and unexpected conditions, one cannot guarantee these aspects. Therefore, testing is performed to test every software component large and small. To increase the efficiency of the testing process and to maximize test coverage, automation is imperative. Automation not only improves the quality of testing but also makes it faster and reduces the cost involved.

MediaWiki uses WebdriverIO, an open-source test automation framework, as it’s a primary testing framework. As a part of the Google Summer of Code 2020 internship, WebdriverIO was migrated to v6 for all most all repositories. Migration provides access to V6 improvements such as default dev tools automation protocol, performance improvements, service configurations, command interface changes, and new assertion library.

While migration was being carried out, a need to perform cleanup and refactoring of the existing WebdriverIO code across all repositories was noticed and a plan was created. The following describes some of the steps involved to fulfill the aforementioned need:
• Introduce video recording in all selenium tests
• Sanitize Page Object imports across all repositories
• Work on extending the wdio.conf.js file so that the same file can be used/extended across all repositories
• Create a standalone NPM package that can be used to record videos of the tests independently

Additional tasks can be found here.

Possible Implementation Methods

At this stage in the testing discipline, it seems to me that the implementation methods are inherent in the testing workflow strategy. Working with all of the stakeholders to ensure the creation of tools that provide the necessary feedback for them to do their jobs better is paramount. Also, in this particular instance, obtaining a clear understanding of the problems that the current solutions solve will provide a baseline to test against when re-factoring and cleaning up tests. That being said, step one will be to verify all assumptions related to what problems are being solved with the current tests. Step two will be to strive for a thorough understanding of how the current solutions are implemented in the existing tests. Next, completing a comprehensive review and investigation of the ROI that the updates will provide will influence the pathway forward. Finally, aggressive deployment of changes will provide the feedback loop necessary to indicate what does and does not work.

Why Is This Necessary?

Refactoring and performing cleanup on selenium tests is necessary to ensure that the overall test strategy is supported by solid and up-to-date tooling. The increasing usage of all online resources is pushing developers to release features at a neck-breaking pace that is both on par with the competition but also responsive to user feedback and demand. Knowing that their efforts are supported by comprehensive automated test suites that mimic user actions and provides timely notifications when things break, give developers the confidence to know that any changes to the code base will not break anything (too bad). In addition to providing these assurances, the fact that their creations are being tested with the latest and greatest of browser automation tools that can provide on-demand feedback on how users interact with their products increases the speed at which engineers can create.

How Will The Proposed Features Benefit Wikimedia Projects?

Not making use of the most current testing tools and design patterns available will be a formidable challenge to ensure that the user experience when interacting with WikiMedia’s catalog of products is not degraded by increased usage and varying access methods. Consequently, the tools to mimic these user interaction scenarios must also improve. Refactoring and clean up ensures that the test strategy is supported by and benefits from the latest advances of the chosen test framework features. Thus engineers will be able to work on improving and maintaining WikiMedia products and services armed with the knowledge that their efforts are enhanced by testing that not only closely mirrors potential and actual user interactions but also provides feedback when changes and updates could negatively affect the user experience.

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

The major risk that I see to implementing this part of the testing strategy is the inherent reliance on the creators and maintainers of the testing tools themselves. After all the product is oftentimes only as good as the tools used to create it. As such introducing new tools create an implicit reliance on the skills of their creators. And although this risk can be mitigated by continuing to utilize the pre-migration code base to validate the results of said updates, refactoring, and clean up. Although some may consider that the time spent double-checking the new changes, in some instances, could be better spent on creating and improving on features that users do and potentially will love. This is a situation where I believe that the “measure twice and cut once” school of thought will prevail more often times than not.

What does making this project happen to mean to you?

Professionally, making this project happen would present me with the opportunity to measure the extent that I am equipped to contribute to a project that affects the lives of hundreds of millions of users. In a trial by fire sense, I envision that working on this project will not only push the limits of my technical skills but also provide me a real-world environment to hone my software engineering workflow and collaboration skills. The opportunity to work with and learn from mentors and coworkers at this stage in my pursuit of excellence (aka the competency stage)... well... I consider being nothing short of game-changing.

Personally, making this project happen will provide credibility to my belief that, maybe for the first time in history, technology creation is an essential, accessible, and powerful skill-set that if pursued, can level the playing field for the traditionally underserved. As the co-founder of an 11-yr old (woo-hoo!) nonprofit which helps underserved communities leverage technology to improve quality-of-life, I have seen firsthand how tech proficiency can empower individuals and communities to excel in our increasingly challenging environment in the best of times. <Insert discussion of pandemic proof internet based jobs and those who possess the required skills here>. Operating on the premise that technology mastery, which apparently directly correlates to options available to improve quality of life, is a goal that can be attained irrespective of who you are and where you come from. The ability to utilize the increasingly available amount of online resources to increase my own technology prowess as both a user and creator can be a real-world personal testament that I can take back to the communities that we serve. Or as my granny would say... talking the talk as I walk the walk.

Mentor(s): @zeljkofilipin @Vidhi-Mody @Soham

Deliverables

WeekTask
Dec 1 - Dec 7Community members, workflow and resource(s) acclimation • Obtain insight re: expectations and recommendations • Determine point people (mentors) for questions • Obtain insight re: existing strategies and plans for issues/tasks • Review T210726 Selenium framework cleanup • Sort access to necessary tools • Prep and sort blog requirements
Dec 8 - Dec 14Weekly standup: discuss what I’m working on, blocks in my way, and my plans for upcoming week • Confirm understanding of task(s) • Draft strategy and update timeline for the task(s) completion • Submit strategy for feedback • Sort outstanding micro-tasks of T265463 '/tests/selenium/log' .gitignore, T248221 Update Selenium docs WebdriverIO v6 • Sort blog requirements
Dec 15 - Dec 21Weekly standup • Refine and confirm strategy for T253113 Record videos of all Selenium tests • Sort T253113 • Sort outstanding tasks from the previous week(s) • Adjust strategy and timeline as necessary • Sort blog requirements
Dec 22 - Dec 28Weekly standup • Sort outstanding tasks from the previous week(s) • Refine and confirm strategy for T(TBD) Sanitize Page Object imports across all repositories • Sort T(TBD) Sanitize Page Object imports • Adjust strategy and timeline as necessary • Sort blog requirements
Dec 29 - Jan 4Weekly standup • Sort outstanding tasks from the previous week(s) • Refine and confirm strategy for T(TBD) extending the wdio.conf.js file • Review P8625 tests/selenium/wdio.conf.js • Sort T(TBD) extending the wdio.conf.js file • Adjust strategy and timeline as necessary • Sort blog requirements
Jan 5 - Jan 11Weekly standup • Sort outstanding tasks from previous week(s) • Refine and confirm strategy for T259341 Create a generic NPM package for recording videos of test • Sort T259341 • Adjust strategy and timeline as necessary • Sort blog requirements
Jan 12 - Jan 18Weekly standup • Sort outstanding tasks from previous week(s) • Refine and confirm strategy for T247844 Upgrade WebdriverIO to the latest version for all repositories • Sort T247844 • Adjust strategy and timeline as necessary • Sort blog requirements
Jan 19 - Jan 25Weekly standup • Sort outstanding tasks from the previous week(s) • Refine and confirm strategy for T254495 Use eslint-config-wikimedia 0.17.x in all repositories with Selenium tests • Sort T254495 • Adjust strategy and timeline as necessary • Sort blog requirements
Jan 26 - Feb 1Weekly standup • Sort outstanding tasks from the previous week(s) • Refine and confirm strategy for T247312 MediaWiki-Docker is the default for Selenium framework • Sort T247312 • Adjust strategy and timeline as necessary • Sort blog requirements
Feb 2 - Feb 8Weekly standup • Sort outstanding tasks from the previous week(s) • Refine and confirm strategy for T214686 selenium-daily-beta Jenkins jobs should have junit publisher • Sort T214686 • Adjust strategy and timeline as necessary • Sort blog requirements
Feb 9 - Feb 15Weekly standup • Sort blog requirements • Internship wrap-up prep • Sort all outstanding tasks from the previous week(s) • Adjust strategy and timeline as necessary
Feb 16 - Feb 22Weekly standup • Sort blog requirements • Internship wrap-up tasks • Sort all outstanding tasks from the previous week(s) • Adjust strategy and timeline as necessary
Feb 23 - Mar 2Weekly standup • Sort blog requirements • Sort all outstanding tasks from previous week(s) • Adjust strategy and timeline as necessary • Internship wrap-up tasks
Projects

Rockstar: Visual AI Hackathon - Code
• Applitools software testing hackathon where I created a collection of tests using WebdriverIO 4 Node.js test framework and Applitools Visual AI SDK.
Knowledge gained: • WebdriverIO 4 • JavaScript • Node.js

bootlegz: Netflix Clone - Code - App (takes a few moments to start the server)
• Design and write test automation scripts with frameworks. Investigate problems as a result of testing
Knowledge gained: • Selenium-Webdriver • Capybara • Ruby on Rails • Test Automation and Syntax • Test-driven development process • Automated testing advanced techniques • Test level determination

tech+: Automated user verification app - App - Code: Available upon request
• Design and build automated user verification support ticket creation app decreasing click-through by half
Knowledge gained: • Selenium • Flask • Python • Browser automation

Event Timeline

santana updated the task description. (Show Details)
santana added subscribers: zeljkofilipin, Vidhi-Mody, Soham.

@santana I see you've recorded a contribution at Outreachy, but you haven't submitted the application. The deadline is Saturday, October 31 2020.

https://www.outreachy.org/outreachy-december-2020-internship-round/communities/wikimedia/refactor-selenium-tests-and-perform-cleanup/contributions/

@zeljkofilipin Very much appreciate the heads up. I (believe) that my application has now been submitted.

Gopavasanth subscribed.

@santana 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.