Testing in RadGrad follows the guidelines in the Meteor Testing Guide, which is worth reading if you are new to testing and/or Meteor. The Meteor Testing Guide begins with some testing basics, including the four canonical types of tests: Unit, Integration, Acceptance, and Load. RadGrad currently provides support for the first three of those four kinds of tests.
Unit tests focus on one small module of the application. In the context of RadGrad, unit tests are tests that run on the server-side only. RadGrad unit tests generally focus on the data model and test code in the api/ directory. To run the unit tests, you can invoke:
Integration tests focus on testing interactions between modules. In the context of RadGrad, integration tests are tests that check the correct functioning of Meteor Methods. Meteor Methods are essentially remote procedure calls from the client to the server, and so RadGrad integration tests exercise code on both the client and server side of the system. To run the integration tests, you can invoke:
Acceptance tests focus on testing the application as experienced by the end user. In the context of RadGrad, acceptance tests use TestCafe to step through the user interface with the goal of assessing that all pages display, all links are valid, the default database contents appear to be retrieved correctly, and that forms enter and update information correctly. To run the acceptance tests, you can invoke:
There are variations of these scripts to support various development situations, which are documented more completely in the Testing Scripts Reference.