PhpStorm & PHPUnit: launch tests by mouse click - ide

How I can setup IDEA PhpStorm to launch PHPUnit tests (classes or even methods) using context menu (right button click of the mouse)? I have 2 composer modules in my project, one of them allows to launch tests with right button click, but other one does not (as 'PHP Script' only option available).

Related

Why does intellij open two terminals when I right click a folder in project explorer and choose "Open in Terminal"?

If I close all my current terminal windows then right click a folder in my project and choose "Open in Terminal" I see this:
It drops me into "Local(2)" but also opens "Local". Why does it do this? Can I have intellij just open one terminal when I do this?
It's a cosmetic issue. Opening Terminal tool window automatically starts the terminal in the current project root.
When you invoke the Open in Terminal for a folder, the following happens:
Terminal tool window opens automatically starting the shell in the project root
An action to open a terminal in the selected folder is called which leads to the second tab open
Bug report is welcome.

Intellij IDEA - run all unit tests before launching the application with a single click

always before launching my app I'm running all the unit tests to make sure there is no regression. So I have two separate tasks and run all tests, and then I launch the app.
I'm curious if there is any option of setting the configuration this way that I click "Run" button, and it invokes build, tests and launch?
Thanks!
IntelliJ IDEA provides Compound Run/Debug configurations exactly for that:
Use this dialog box to create configurations containing multiple run/debug configurations that you can launch at once. This is useful, for example, if you want to launch various automated tests and get test results in one window.

Keyboard shortcut to refresh Gradle project in IntelliJ IDEA

There is an icon to refresh Gradle project which is very useful if auto-import is disabled:
When I hover over it, status bar says Force refresh all linked Gradle projects.
However, I cannot find any way to assign keyboard shortcuts for this button and also I don't see it in CTRLSHIFTA menu. Is there any way to invoke this refresh using just a keyboard?
I'm using IDEA 2016.3 EAP.
You can use "Refresh external project" (for currently selected) or "Refresh all external projects". These actions are available in the find actions menu (CtrlShiftA) and can also be assigned a shortcut in the keymap settings as there is no default assigned.
Note that the menu item when right-clicking a Gradle project in the tool menu is also labeled "refresh external project".
There is no option to assign shortcut to refresh just gradle projects.
However, there is an action "Refresh all external projects", which will trigger also refresh of gradle projects.
You can set the shortcut in
Preferences → Keymap → Refresh all external projects → Right click →
Add keyboard Shortcut
In newer versions of IntelliJ Idea, the name of this functionality has been changed to Reload All External Projects

How to open external console window in intellij platform on run?

I'm write console application on C++ and wanna use CLion (JetBrains). But when i'm runned exe, it use internal IDE console output. Is there way to say to CLion that it should use cmd.exe directly without internal console?
I don't think there is a way to use cmd.exe (default command-line interpreter), while using CLion (JetBrains). But you can amend setting to have CLion console in a separate window.
Press Alt+F12.
Console will appear at the bottom.
In the right top corner of console there is a "gear" symbol ⚙️ (settings), click on it.
Go to "View mode" and select "Float".

Eclipse plugin deployment in same Eclipse instance - possible?

I am developing an Eclipse plugin which will operate in plugin-only mode - mainly special context menus for certain project natures. Is there a way to deploy the plugin into the current Eclipse runtime, so I can immediately test it there?
If no, how are developers supposed to test plugins which use Eclipse's file explorer?
In your Eclipse IDE, open "Run > Run Configurations..." Select Eclipse Application and create a new run configuration.
Then on the "Main" tab there will be a "Program to Run" section. Select the radio button "Run an application:"
Then in it's drop down menu, select "org.eclipse.ui.ide.workbench"
Now switch to the tab labeled "Plug-ins". Make sure the plug-in that you are building and want to test is selected. You may have to use the drop down labeled "Launch with:" and select "plug-ins selected below only" in order for the UI to let you select the plug-in your building.
Now, just to make sure this is all going to launch correctly, select the button, "Validate Plug-ins" If there are errors, close the message box and select the button, "Add Required Plug-ins" This will auto select all dependent plugins for this run configuration.
Now select the button "Run" and a new instance of Eclipse will launch with your plug-in installed in it.