Thinking About My Audience

The theme for this week’s blog post is to describe the project I’m working on to a newcomer, specifically an Outreachy applicant who is thinking about applying to this community. So here goes:



The project I’m working on is to create tests and automate them for Mediawiki. Mediawiki is software that is collaboratively worked on and expanded by a diverse set of developers all over the world. It’s the software that runs Wikipedia as well as many other wikis run by various people/groups (including myself!). I’m working with the QA team which is trying to provide test coverage for the various extended functionalities of Mediawiki. Tests help to check code and functionality to make sure things are not broken when updates are made. The problems we are trying to solve are to figure out what needs test coverage and what is priority to automate. A sometimes neglected part of good test coverage is writing and documenting the tests before writing out the code to automate them.

Some background, an extension in Mediawiki lets you customize how MediaWiki looks and works. The extension I’ve been focusing on is called Echo, and it is used to notify the user when different events happen. The task at hand is to help support the development of the Echo extension, so that new features being added are checked to make sure they don’t break the extension’s basic functionality.

I’m excited to learn about all the various technologies that go into making the project work, as well as learning to think about what makes sense to automate. One new thing I’ve learned is how to write Cucumber tests which are written in a very human readable way and are a bridge to understanding what’s going on in the code.

One challenge I’m facing is getting the development environment, specifically Vagrant, to work on a consistent basis. Vagrant is software that allows teams to work in the same development environment by automating the setup of the appropriate virtual machine and software used for development. It was hard to understand at first how it all worked but I found the documentation about it to be helpful as well as some visuals which illustrated how it works with your machine. In short the visuals show how one runs vagrant, and alongside that how vagrant interacts with my browser and selenium webdriver(software which allows you to control what happens in the web browser with commands) in order to run test scripts. That said, it still took running all of it and observing how it worked for me to really understand what was going on. I’ve experienced a few hang ups with it when enabling extra features or what Mediawiki calls roles. Since I’m writing tests for the Echo extension, I had to enable the Echo role in vagrant. This worked without problems. When I was given the task to write a test that also used the Flow extension alongside Echo, I enabled both roles and ran across multiple errors. I ended up filing a bug report after spending a good amount of time to get it to work. It was discouraging at the time, but going through the process of debugging and filing a report was good experience and the community has been helpful. If you’d like to learn more or dive deeper, I’ve provided some resources below.

Resources

* MediaWiki
* Test Pyramid: the key to good automated test strategy
* Cucumber.io
* Mediawiki Extensions
* Selenium Webdriver