I use Play Framework 2.0.4 and Java + IntelliJ IDEA.
Try to launch tests from IDEA, and having error like this:
Class not found: "models.SoftwareTest"
Here is the test itself.
package models;
public class SoftwareTest {
@Test
public void findById() {
running(fakeApplication(), new Runnable() {
@Override
public void run() {
Software software1 = Software.find.byId(1L);
assertThat(software1.name).isEqualTo("Soft1");
assertThat(software1.description).isEqualTo("Description1");
}
});
}
}
Anyone?
P.S. I've already cleaned all project/ivy files, having switched from play 2.0.4 to 2.1 RC1 and back.. it does not help. But it was working one day in the past. And I found a lot of records about this in Google, but could not find the answer yet.
Also I've checked out this article (related to Ebean and testing):
http://blog.matthieuguillermin.fr/2012/03/unit-testing-tricks-for-play-2-0-and-ebean/
But the problem I have now it's different one. But just share this link here, it could help to reproduce the problem.
And this: http://monocaffe.blogspot.com.es/2012/12/play-21-rc1-migration-mini-guide.html
PHPUnitUltimate. IntelliJ IDEA supports unit testing of PHP applications through integration with the PHPUnit testing framework.
Sven's link (http://youtrack.jetbrains.com/issue/SCL-5152) led me to the answer to compile / run unit tests in Intellij 12 with Play framework 2.1.1 [sorry, don't have Play 1.x installed anymore].
From the menu bar [OSX -- likely similar for other platforms] navigate to: IntelliJ -> Preferences -> Compiler
Uncheck the "use external build" and voila, my unit tests were able to run.
I'm using play 1.2.5 with Intellii IDEA 12.0.1 and also get this error (followed step by step the play doc to create the project files).
I found this issue in the tracking system.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With