It may be convenient to introduce a new test-specific property, test.file, containing the filename of the defining file of the test (the file containing `@test`).
Given the recent change to allow "smart action args" in actions, this would make it easier to copy-and-paste test descriptions between tests that only differ in the name of the test file. One possible use of this is when a shared class is used to execute individual tests. For example, a series of might be executed by a custom test runner that processes the test file as needed. For example, the tests could all have a similar test description of
/*
* @test
* @run main MyTestRunner ${this.file}
*/
which would case MyTestRunner to be invoked with the filename of the defining file as an argument.
Given the recent change to allow "smart action args" in actions, this would make it easier to copy-and-paste test descriptions between tests that only differ in the name of the test file. One possible use of this is when a shared class is used to execute individual tests. For example, a series of might be executed by a custom test runner that processes the test file as needed. For example, the tests could all have a similar test description of
/*
* @test
* @run main MyTestRunner ${this.file}
*/
which would case MyTestRunner to be invoked with the filename of the defining file as an argument.