nelson.unittest.discover
Discover test files and return a structured suite.
📝Syntax
suite = nelson.unittest.discover(targets)
suite = nelson.unittest.discover(targets, Name, Value)
📥Input Arguments
Parameter Description
targets module name, directory, file name, or cell array of targets.
Name, Value Kind selection option.
📤Output Arguments
Parameter Description
suite TestSuite structure containing discovered TestCase entries.
📄Description

nelson.unittest.discover finds test_*.m, bug_*.m, and bench_*.m files.

Discovery reads file tags on every call and records stable TestCase fields such as id, module, file, name, kind, tags, mode, resources, timeout, and weight.

For an external module, the module field comes from its module.json manifest and its root is located by the enclosing etc/startup.m file. This also supports versioned installations, temporary package staging directories, and nested tests. Shipped modules and registered legacy modules are identified from their module roots. A directory name alone does not identify a module; files without a valid module identity have an empty module field.

💡Examples
suite = nelson.unittest.discover('string', 'Kind', 'all_tests');
🔗See Also
nelson.unittestnelson.unittest.selectnelson.unittest.run
Edit this page on GitHub