How to run test in IntelliJ IDEA project from InteliJ plugin - java

I'm creating plugin for IntelliJ in JAVA I need to find a way how to run tests of opened project in idea trough IntelliJ Plugin. Is there any possible way to do that ?

Related

How to show only class name when running unit tests from gradle project in IntelliJ IDEA?

For IntelliJ IDEA Community Edition v2020.3.1
When I run a test from a Gradle project, the full name of the class is displayed. But this does not happen when I run the same type of test in a Maven project. It's a bit annoying because it's not easy to read when you run multiple unit tests.
Maven & Gradle projects on IntelliJ IDEA screenshot:
It is not possible to hide/disable grouping by packaged for Gradle. Feel free to file a request for this at https://youtrack.jetbrains.com/issues/IDEA.

Intellij IDEA doesn't build maven project

I'm trying to build project using "Hammer button" in Intellij IDEA, but it looks like compilator can't find JEE packages:
But, when I'm trying to build project using Maven (clean, install) everything is OK, where can be problem?
I've got installed adoptopenjdk1.8 and I'm using mac
PS: Invalidating cache and restart didn't work

Unable to run Maven project (gephi-app) the same way on NetBeans in IntelliJ

I am currently working on a project that involves utilizing Gephi's backend tools and frontend visualizers. For this, I have cloned Gephi's repository, https://github.com/gephi/gephi.git. The following tutorial walks users through how to clone and modify Gephi's sourcecode so that you may add "circle creation logic" to Gephi's visualizer, https://seinecle.github.io/gephi-tutorials/generated-html/working-from-the-source-en.html. I have found that running the project through NetBeans is a straightforward process, build the dependencies and run.
Unfortunately, such an option doesn't exist in IntelliJ and the maven "Lifecycle" goals that I can run (clean, validate, compile, test, package, verify, install, site, and deploy) build successfully, but does not actually run the project within the environment unlike NetBeans does. I am wondering what I am missing here, or how NetBeans can simply run the maven project node, but such an option doesn't exist in IntelliJ? How do I perhaps edit my run configuration within the IntelliJ IDE so that I can run such an instance?
The equivalent in IntelliJ IDEA would be the following:
Run the compile goal
Run nbm:cluster-app
Run nbm:run-platform
The last 2 goals are provided by the nbm Maven plug-in.
In IntelliJ IDEA they are visible under the Plugins node of the module in the Maven tool window:

What exactly IntelliJ is doing when compiling project using Gradle?

IntelliJ IDEA 2016.3 add the ability to delegate build/run to Gradle.
It's clear that when the delegate option is on Gradle is doing everything.
My question is what exactly IntelliJ is doing when this option is off?
I'm asking this because I have custom code inside my Gradle files and it does not seems like this code is executed when building in IntelliJ. When I run gradlew build everything works just fine.
IntelliJ has its own build system, called JPS, which uses the IntelliJ IDEA project and .iml files as the project model. When you're using IntelliJ IDEA's default build system to build the project, it does not execute any code in Maven or Gradle files; it uses its own logic, which can only be extended by writing plugins to JPS.

How to prevent IntelliJ from asking to provide the Scala SDK after every Gradle build?

I'm using IntelliJ IDEA (15.0.3) to write a project in Scala over Spark.
Every time I build using the following command
./gradlew clean build idea
IntelliJ pops up the message 'No Scala SDK in module' and asks to setup the Scala SDK version.
Is there a way to permanently specify the SDK version so that building with Gradle won't override it?
In general you don't need to run the idea task with every build. That task generates IDEA project files so you're able to open the project from within the IDE - you usually only need to run it once when setting up the project. Running the task over existing project files can (partially) overwrite them, depending on how the task is configured and apparently does override the SDK configuration changes made in your case.
So just running ./gradlew clean build when building should solve your issue (unless I'm missing/misunderstanding part of your question).

Categories

Resources