-
Notifications
You must be signed in to change notification settings - Fork 27
Using XojoUnit
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:
- Create a test class (e.g. MyTests) as a subclass of TestGroup.
- Create a subclass of TestController (e.g. XojoUnitController).
- Add your test subclass (MyTests) to the InitializeTestGroups event handler on XojoUnitController:
group = New MyTests(Self, "My Tests")
- 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.
- 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.