You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the work on this plugin I am able to run tests within Intellij.
Any instructions on how to Run with Coverage work right within Intellij?
I tried to run with coverage, it seems finished the tests quickly but then always throw this error message when opening the "Coverage" window in Intellij.
Error:Internal error: (com.twitter.intellij.pants.PantsException) This is a Pants project. Please use PantsCompile under `Edit Configuration`
com.twitter.intellij.pants.PantsException: This is a Pants project. Please use PantsCompile under `Edit Configuration`
at com.twitter.intellij.pants.jps.incremental.serialization.PantsJpsProjectExtensionSerializer.loadExtension(PantsJpsProjectExtensionSerializer.java:28)
at com.twitter.intellij.pants.jps.incremental.serialization.PantsJpsProjectExtensionSerializer.loadExtension(PantsJpsProjectExtensionSerializer.java:14)
at org.jetbrains.jps.model.serialization.JpsLoaderBase.loadComponents(JpsLoaderBase.java:62)
at org.jetbrains.jps.model.serialization.JpsProjectLoader.loadFromDirectory(JpsProjectLoader.java:124)
at org.jetbrains.jps.model.serialization.JpsProjectLoader.loadProject(JpsProjectLoader.java:101)
at org.jetbrains.jps.model.serialization.impl.JpsSerializationManagerImpl.loadModel(JpsSerializationManagerImpl.java:41)
at org.jetbrains.jps.cmdline.JpsModelLoaderImpl.loadModel(JpsModelLoaderImpl.java:45)
at org.jetbrains.jps.cmdline.BuildRunner.load(BuildRunner.java:79)
at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:267)
at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:125)
at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:236)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl.lambda$executeOnPooledThread$0(SharedThreadPoolImpl.java:42)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Would really be handy to show what is not covered by unit test this way compare with doing it on command line like ./pants test bla: --test-junit-coverage-open.
I am using latest intellij(2017.2) and latest version of this plugin.
The text was updated successfully, but these errors were encountered:
Thanks for reporting. In short, no, but maybe soon depending on how much community effort is available.
Reasons are:
currently pants coverage uses cobertura, and iirc due to licensing issues, intellij cannot use it.
The code coverage measuring can be performed using the following runners:
IntelliJ IDEA code coverage runner (recommended).
EMMA open-source toolkit. Note that EMMA is not supported by the author any more, and works with Java 7 only when frame validation turned off (pass -noverify to the process).
JaCoCo.
There are recent effort trying to bring jacoco into pants pantsbuild/pants#4881, but afaict the actual jacoco related code isn't there yet.
Since intellij project pants project delegates everything to pants, so the plumbing to get the report from pants to intellij is still todo. Also depending on whether there are such api available from the intellij coverage side.
the stacktrace above is related to intellij trying to run its own compilation instead of Pants, and we have guard to prevent it.
Let me know if you would like to contribute to any aspect of the tooling, I'll be glad to help.
Thanks for the work on this plugin I am able to run tests within Intellij.
Any instructions on how to Run with Coverage work right within Intellij?
I tried to run with coverage, it seems finished the tests quickly but then always throw this error message when opening the "Coverage" window in Intellij.
Would really be handy to show what is not covered by unit test this way compare with doing it on command line like
./pants test bla: --test-junit-coverage-open
.I am using latest intellij(2017.2) and latest version of this plugin.
The text was updated successfully, but these errors were encountered: