$TestFileName

$TestFileName

gives the absolute file name of the currently executing test file.

Details

Examples

Basic Examples  (3)

During interactive input, $TestFileName is "":

This test file prints $TestFileName when it is executed:

Execute the test file with TestReport:

After the TestReport is complete, $TestFileName is "" again:

Open an example test notebook:

Run the test report on the notebook:

Get the test that tests $TestFileName:

Show the input, expected output and actual output for the test result:

Introduced in 2019
 (12.0)