How can I make IntelliJ default to a Jest configuration? - intellij-idea

I have Create React App applications that I test with Jest. I've been using VSCode, but am now switching to IntelliJ. I'm wanting to duplicate the test run/debug behavior that I get in VSCode.
In VSCode, whenever I run or debug, in VSCode, a prompt comes up in the terminal asking which file, test, etc, that I would like to run. See first photo below. As of right now, I can run the tests in IntelliJ, but it doesn't ask me which tests I want to run.
Also, in IntelliJ, if I run a test file by itself, or a single test by itself, it seems to make a new configuration automatically, which I don't like.
I'd like to have just a single configuration for Jest and have any/all tests default to that configuration if possible.
Behavior in VSCode, that I'd like in inteliiJ

Related

Intellij - work-around for IDE not building module on Run/Debug

I have a pretty large project, of which the Selenium/Cucumber part is integrated, and belongs to me.
No, after upgrading to Intelij 2022, I find that things have changed to the worse. Since I only bother about the module containin cucumber/selenium tests, I have been used to just clicking Run or Debug on each Run/Debug configuration to get my changes built, and the Cucumber/Selenium tests run locally on my computer.
This doesn't work anymore, and absolutely 100% of all help/support I have found on the net is unhelpful. The problem is that when I make a change in the code and click Run or Debug, the module (cucumber, where all the Cucumber/selenium tests resides) is not built. So, it keeps running the previously built code when I'm working on debugging/fixing tests.
The solution has been to first build the module containing the tests, then run/debug the test(s). Even though the run/debug configuration DOES have "Build" before launch. But this is tiresome, and a total waste of time.
So, what I'm wondering is: Can I tailer a terminal command to do all this? That is, build a specified module, then Run or Debug a Cucumber test.
Any help/hints are appreciated. I'm experiencting the usual "me" problem, where it seems that everyone else in the world has something working, while the same solutions doesn't work for me.
EDIT:
I tried the solution offered below in the comments: Deleted the .idea folder, reimported all Maven modules and reconfigured the project. It seemed to work on the first run, but then it went back to not building before launch.
You can try to change Select Run/Debug configuration in idea. Change Build to Build Project. It worked for me.

Testing Profile Robotframework VScode

In VSCode there is a option about for testing. There you can select which tests you want to run. Also you can select testing profiles. But there i can only select robotframework profile or python profile. A cant find anywhere to create new profiles.
The thing i want to create is to run tests via that screen with some kind of run configuration. Because i have some environment variables. These aren't used when i run the tests from that screen.
I think the robotframework language server from Robocorp installs this plugin in VS code
Does somebody now how to use that?
Testing screen

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.

IntelliJ: Launch Run-configuration from the embeded terminal

Lets say I have run-config1 and run-config2 setup for my project in IntelliJ.
I know there are ways of adding custom shell code to be perfomed before/after a build run, but that's not what I want to do.
Is there a way of calling them from the embedded terminal?
As of IntelliJ IDEA 14 there is no such way. You can write a plugin for IntelliJ IDEA that will handle a command like "idea.sh run configuration-name" and start the run configuration in the existing instance, but this is fairly non-trivial.

IntelliJ Ultimate/PhpStorm, showing code coverage results for Symfony2 project

I'm using IntelliJ Ultimate 11.1 which includes the goodies that comes with the latest PhpStorm.
I'm trying to get some things working with the new Code Coverage feature, but having a bit of trouble getting the coverage to show up in my IDE.
The unit testing is working 100%, I can even run the unit tests in debug mode, and trigger xdebug breakpoints etc, which I think is the most awesome thing since toast.
When I set --coverage-html the HTML coverage report is being generated ok, so it's clear that xdebug and phpunit are working nicely together.
The project is a Symfony2 project, which has it's PhpUnit configuration done in a file app/phpunit.xml.dist.
When I select Analyze > Show Code Coverage Data from the menu, I get a popup looking like this:
I'm clicking the [+] but not sure what I have to select, as the OK button on that dialog box is disabled all the time.
I understand that my Test Suite is defined inside the phpunit.xml.dist file, but not sure how to get IntelliJ to use that to figure out how to display code coverage.
I'd be really thrilled to be able to use this neat feature.
Please check the documentation:
To measure code coverage
Prepare tests manually or have test classes generated.
Create a run configuration of the type PHPUnit.
On the main toolbar, select the PHPUnit run configuration in the Run/Debug Configurations drop-down list and click the Run with Coverage button.
Monitor the code coverage in the Coverage tool window.
Do you use the Run with Coverage button?
I just ran a recent update, and everything started working perfectly!