qasanov
qasanov

Reputation: 437

How to run play framework unit test in eclipse

Currently i am tring to develop web based application using play framework in java. And i would like to write unit test and run it through Elcipse. I tried but class not found exception appeared. How can i achive that?Could anyone help please? i am using play framework 2.0

Upvotes: 4

Views: 1824

Answers (2)

Jeremy
Jeremy

Reputation: 1208

You can do this with the ScalaTest plug-in for ecplise. You can find it here along with the update links for your version of Eclipse. They also mention it on scalatest.org but none of their update links are still valid.

Upvotes: 0

Steve Atkinson
Steve Atkinson

Reputation: 1239

If you want to unit test your code that calls out to the framework then you can do so by using an object mocking library such as Mockito. You should refactor your code to isolate the touch points with the framework as much as possible into separate classes. Then you can mock the framework objects and test your code.

Upvotes: 1

Related Questions