test

Syntax

test(scriptFile, [outputFile], [testMemLeaking=false])

Details

A system command for unit testing. It must be executed by a logged-in user.

If scriptFile is a folder, all script files in the folder will be tested.

If outputFile is not specified, the testing result will be displayed on screen. If outputFile is specified as a relative path, the testing result file will be output to <HomeDir>.

Note:

DolphinDB's test function is used to execute specified test script files and return results; numpy.test can find and run test cases defined within a module and its submodules; pandas.test is used to run the pandas test suite, verifying library functionality via pytest, with optional execution of doctests; scipy.test offers more parameters for fine-grained control, such as fast/slow tags, parallel execution, coverage statistics, and targeted submodule testing; statsmodels.test is used to verify the integrity and availability of the installed library, and is primarily intended for release builds rather than development.

Parameters

scriptFile is a string indicating the path of a testing script file or a folder.

outputFile (optional) is a string indicating the path of a test result script file or a folder.

testMemLeaking (optional) is a Boolean value indicating whether to test for memory leaks.

Examples

test("C:/DolphinDB/test/test1.txt", "C:/DolphinDB/testResult/test1.txt");
test("C:/DolphinDB/test");