RDT00004: Test outside a test module
Severity: Warning · Family: RDT (RDCore.UnitTesting) · Raised by: TestModuleAnalyzer
A procedure is annotated as a test, or as the setup or cleanup of a module or of its tests, in a standard module that has no '@TestModule annotation.
Only the procedures of a test module run as tests. A module is a test module when '@TestModule is written in its declarations section.
It is reported at the procedure's first test, setup or cleanup annotation.
How it is raised
| Situation | Example | Resolution |
|---|---|---|
A test in a module with no '@TestModule. |
'@TestMethod above Public Sub AddsTwoNumbers(), in a module whose declarations section has no '@TestModule. |
Add '@TestModule to the module's declarations section, or move the test to a test module. |
See also
- RDT00005: Several setup or cleanup procedures