User:Xxmarijnw/Extension:MWUnit/Getting started

This tutorial assumes you have MWUnit installed and working correctly. In this tutorial, you will learn how to write a simple unit test as well as how to run tests.

The documentation on how to install MWUnit can be found here.

Creating a test
To get started, we will create a new template which we will call. This template adds  to the first argument. It returns an error if and only if the first argument is not a number.

We will also create the associated test page for this template. We'll call test page.

Here is what the two pages might look like:

Template:AddTen
This is the "AddTen" template.

-> 22 -> 10    -> 10

Test:AddTen






