Skip to content
paullefebvre edited this page Sep 19, 2014 · 8 revisions

To use XojoUnit, copy the XojoUnit folder from one of the example projects to your project.

Adding your own tests is a simple process:

  1. Create a test class (e.g. MyTests) as a subclass of TestGroup.
  2. Create a subclass of TestController (e.g. XojoUnitController).
  3. Add your test subclass (MyTests) to the InitializeTestGroups event handler on XojoUnitController:
 group = New MyTests(Self, "My Tests")
  4. Create methods in your test subclass class (MyTests) to do the tests. The methods must end in “Test” in order for them to appear in the XojoUnit results.
  5. Provide a way to display the results and run the tests. For desktop apps, you want to show the TestWindow, for web apps you want to show the TestPage and for console apps you want to run the tests manually.
Clone this wiki locally