rules_scala icon indicating copy to clipboard operation
rules_scala copied to clipboard

Abstract over test frameworks using the SBT testing interface

Open andyscott opened this issue 5 years ago • 2 comments
trafficstars

I'd like to abstract over test interfaces so that the scala_test rule supports all test frameworks implementing the SBT testing interface.

This is relatively easy to implement using the SBT testing interface class graph utility and the new phase architecture. The new rule will then automatically discover any Scala test in the same way SBT discovers test.

The bigger issue is our migration strategy: I would like to replace the existing scala_test rule-- which only works for ScalaTest tests-- with this new generic rule. The Specs2 rules (scala_specs2_junit_test, etc) can also be removed as the new rule will run Specs2 tests.

One possible migration strategy is to introduce the new rule at a new location. During a cutover period the existing test rules can delegate to the new implementation. Once we are ready to make a breaking change, we can get rid of the old rules (just facades at this point) and rename/move the main rule over.

andyscott avatar Jan 23 '20 04:01 andyscott