Testing
This section describes how to write and run NPL tests.
Writing tests
NPL tests are written using its default testing framework.
It is recommended for the test file to be in the same package as the file being tested, avoiding unnecessary listing
many use statements.
Test framework methods
The methods that are offered by the test framework are described on the Test Type page.
Sample tests
Sample tests can be found in Examples.
Running tests
The NPL-Dev plugin offers out of the box support to run NPL tests.
For larger code bases and automated testing:
- You can use the NPL CLI. Run your tests with
npl test - If your project is built with maven, the
NPL Maven Plugin is also available. Run your tests with
mvn clean test