Skip to content

Support more easily running/managing schema project tests #17

Open
@stevedlawrence

Description

@stevedlawrence

The convention for testing schema projects is to write all tests in a TDML file and then create a Scala file that used JUnit to run those tests. This leads to a bit of duplication and verbosity. It would be nice if we could reduce this to make running tests easier. Some possibilities discussed:

  1. An idea might be to automatically generate this kind of file in a test-managed directory during sbt compile (or sbt Test/compile or sbt test). Then we still can open this kind of Scala file in our IDEs to debug individual tests within the debugger, but our responsibility for creating and updating these files is handed over to the sbt plugin.

  2. Do something like this:

    @Test def test_test01(): Unit = doTest(runner)

    And the doTest function looks at the stack to figure out the function that called it, strips off the "test_" prefix and calls runner.runOneTest passing in the name. It still requires managing scala file, but it's a bit less verbose.

  3. I wonder if now that IDE's have much better SBT support, if creating an SBT Test Interface for TDML would just magically give IDE's the capabilities we expect out of IDEs (e.g. list of tests, ability to right-click a location in a TDML file to run a test).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions