The tests
command supports the following sub-commands:
build
unit
andshow-unit
integration
andshow-integration
system
andshow-system
all
clean
This will build all the eunit tests found in the current directory's (LFE
project) ./test
sub-directory. By convention, LFE unit tests are placed (by
the project developer) in ./test/unit
; integration tests are placed in
./test/integration
; and system tests are placed in ./test/system
.
Furthermore, lfetool
supports custom testing modules which may be used by
the unit tests (e.g., modules for utility functions that are only ever used
in the test modules). If you wish to create and use testing modules like these,
simply create modules in ./test
that are prefixed with testing-
.
The following command builds all of the aforementioned:
$ lfetool tests build
To run the unit tests for the LFE project in the current working directory, execute the following:
$ lfetool tests unit
If you would like to only see the unit test modules defined for the project, and not actually run them, execute this command:
$ lfetool tests show-unit
To run the integration tests for the LFE project in the current working directory, execute the following:
$ lfetool tests integration
If you would like to only see the integration test modules defined for the project, and not actually run them, execute this command:
$ lfetool tests show-integration
To run the system tests for the LFE project in the current working directory, execute the following:
$ lfetool tests system
If you would like to only see the system test modules defined for the project, and not actually run them, execute this command:
$ lfetool tests show-system
To run the entire test suites the LFE project in the current working directory, execute the following:
$ lfetool tests all
To remove all the compiled test modules, execute the following:
$ lfetool tests clean