Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7902545

Introduce test.file

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • None
    • None
    • tools
    • None

      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.

            cstein Christian Stein
            jjg Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: