Peter
Peter

Reputation: 6043

Running a JUnit test from Groovy Console

How can I use the Groovy Console to kick off junit tests?

(Currently using Groovy 1.6.0)

Upvotes: 1

Views: 1672

Answers (1)

Peter
Peter

Reputation: 6043

I currently use:

junit.textui.TestRunner.run(MyTest)

(Where my junit test class is MyTest)

I've tried running:

MyTest

within the Groovy Console, but that just returns the class instance. Is there an easier way?

Upvotes: 2

Related Questions