Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to use IntelliJ with Play Framework and Scala
    primarykey
    data
    text
    <p>I am trying to use IntelliJ with a play framework 2.11 application.</p> <p>I installed the Play Framework 2 plugin and the Scala plugin for IntelliJ.</p> <p>I created a Play application. I have been struggling writing and running Specs 2 tests in IntelliJ. My run config says to run "make" first when running the Specs 2 test, however it doesn't look like my test classes are being generated. Keeps on telling me that it could not find the specification. When I look on the file system, there is no code in target/test-classes, the directory is empty. Further, it seems to take a LONG time to do the build, at least compared to running the Play console.</p> <p>I wanted to see how people are using Play with IntelliJ. Do you just use IntelliJ as an editor, and run everything through the Play console?</p> <p>Is there a way whereby you can run your Application tests in IntelliJ (getting your test classes to run)?</p> <p>I have never had any problem running the Play console and running ~test-only test=xxx.Spec. It has typically been rather fast.</p> <p>Here is the exception I am getting in IntelliJ when I try to run my Specs2 tests:</p> <pre><code>Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.jetbrains.plugins.scala.testingSupport.specs2.JavaSpecs2Runner.runSingleTest(JavaSpecs2Runner.java:130) at org.jetbrains.plugins.scala.testingSupport.specs2.JavaSpecs2Runner.main(JavaSpecs2Runner.java:76) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) Caused by: java.lang.RuntimeException: can not create specification: test.ApplicationSpec at scala.sys.package$.error(package.scala:27) at org.specs2.specification.SpecificationStructure$.createSpecification(BaseSpecification.scala:96) at org.specs2.runner.ClassRunner.createSpecification(ClassRunner.scala:64) at org.specs2.runner.ClassRunner.start(ClassRunner.scala:35) at org.specs2.runner.ClassRunner.main(ClassRunner.scala:28) at org.specs2.runner.NotifierRunner.main(NotifierRunner.scala:24) ... 11 more </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload