Page MenuHomePhabricator

Establish base unit test coverage of MW-Vagrant plugin classes/modules
Closed, ResolvedPublic

Description

As part of an effort to improve the overall stability of MW-Vagrant, we should establish decent unit-test coverage for the plugin classes/modules using rspec and possibly vagrant-spec. Good baseline coverage (and continuing coverage) will protect against regression during development of new features, fixes, and refactoring.

The test suite should be easily runnable by developers before pushing commits and runnable by CI before merges using bundle exec rspec. It may make sense to keep unit tests separate from any functional/acceptance tests we might develop, so as not to muddle the utility of each.

It might also be a good idea to include measurement of coverage with something like simplecov, not so much to measure the absolute health of the project but to measure changes over time—awareness of an incline/decline in coverage will help promote TDD.

Details

Related Gerrit Patches:
integration/config : masterMake mediawiki-vagrant rspec job voting
mediawiki/vagrant : masterUnit tests for settings classes
mediawiki/vagrant : masterUnit tests for Environment class
integration/config : masterExperimental mediawiki-vagrant rspec and rubocop jobs

Event Timeline

dduvall created this task.Dec 3 2014, 6:44 PM
dduvall claimed this task.
dduvall raised the priority of this task from to Needs Triage.
dduvall updated the task description. (Show Details)
dduvall added a project: MediaWiki-Vagrant.
dduvall changed Security from none to None.
dduvall added subscribers: ori, bd808, hashar.
bd808 triaged this task as Medium priority.Dec 30 2014, 1:51 AM
dduvall moved this task from Backlog to Upcoming on the MediaWiki-Vagrant board.Jan 9 2015, 8:41 PM
gerritbot added a subscriber: gerritbot.

Change 185350 had a related patch set uploaded (by Dduvall):
WIP Unit tests for Environment class

https://gerrit.wikimedia.org/r/185350

Patch-For-Review

Change 185399 had a related patch set uploaded (by Hashar):
Experimental mediawiki-vagrant-bundle-rspec job

https://gerrit.wikimedia.org/r/185399

Patch-For-Review

Change 185399 merged by jenkins-bot:
Experimental mediawiki-vagrant rspec and rubocop jobs

https://gerrit.wikimedia.org/r/185399

I have added Jenkins jobs for rspec and rubocop in the experimental pipeline. Can be triggered by commenting in Gerrit 'check experimental'.

Once the patch is ready/merged, we can move the rspec job to the test/gate-and-submit pipeline.

Change 185350 merged by Dduvall:
Unit tests for Environment class

https://gerrit.wikimedia.org/r/185350

Change 189098 had a related patch set uploaded (by Dduvall):
Unit tests for settings classes

https://gerrit.wikimedia.org/r/189098

Patch-For-Review

Change 189098 merged by jenkins-bot:
Unit tests for settings classes

https://gerrit.wikimedia.org/r/189098

dduvall closed this task as Resolved.Feb 18 2015, 7:48 PM
dduvall reopened this task as Open.

Gah. Sorry, this shouldn't be resolved until the rspec job is fixed and voting.

Change 192857 had a related patch set uploaded (by Dduvall):
Make mediawiki-vagrant rspec job voting

https://gerrit.wikimedia.org/r/192857

Change 192857 merged by jenkins-bot:
Make mediawiki-vagrant rspec job voting

https://gerrit.wikimedia.org/r/192857

dduvall closed this task as Resolved.Feb 27 2015, 10:05 PM
bd808 moved this task from In Progress to Done on the MediaWiki-Vagrant board.Mar 5 2015, 5:32 PM