"Unrecognized plugin: org.jetbrains.plugins.cucumber.java.run.CucumberJvm2SMFormatter" error every time I run test in intellij idea - intellij-idea

I am getting the following error every time I try to cucumber test using the cucumber plugin in Intellij Idea. I am using the following version deaIC-2017.3.5. I even tried installing the latest version - ideaIC-2018.2.4 - but the issue still persists. Anybody has any idea why this could be happening?
Exception in thread "main" cucumber.runtime.CucumberException: Unrecognized plugin: org.jetbrains.plugins.cucumber.java.run.CucumberJvm2SMFormatter
at cucumber.runtime.RuntimeOptions.addPluginName(RuntimeOptions.java:171)
at cucumber.runtime.RuntimeOptions.parse(RuntimeOptions.java:122)
at cucumber.runtime.RuntimeOptions.<init>(RuntimeOptions.java:84)
at cucumber.runtime.RuntimeOptions.<init>(RuntimeOptions.java:77)
at cucumber.runtime.RuntimeOptions.<init>(RuntimeOptions.java:69)
at cucumber.api.cli.Main.run(Main.java:31)
at cucumber.api.cli.Main.main(Main.java:18)

In the "Run/Debug Configuration", update "Program arguments" replacing --plugin org.jetbrains.plugins.cucumber.java.run.CucumberJvm2SMFormatter by --plugin org.jetbrains.plugins.cucumber.java.run.CucumberJvmSMFormatter

Let me illustrate how I encountered and found a way about to solve this problem.
I used to run my feature file by right clicking and run in intelliJ. Then I modified the program arguments in the edit configuration for that Run XYZ.feature file configuration.
In that process, I deleted the argument that passed " org.jetbrains.plugins.cucumber.java.run.CucumberJvm4SMFormatter" and added "--thread 5" something like that.
And then when I was done with wanted to revert to the old config. It wouldn't run and throw this error. My hunch is that maybe the arguments are not being passed properly?.
Anyway the solution (kinda hack) is to choose another feature file ABC.feature and edit the configuration for Run ABC.feature and change the location path of the feature file to XYZ.feature and change nothing else. Maybe could rename the configuration to Run XYZ2.feature something like that.This works for me.

This has worked for me: (intelliJ)
In the Program Arguments I have kept below line and it worked for me.
--plugin org.jetbrains.plugins.cucumber.java.run.CucumberJvmSMFormatter --monochrome --name "^Login with valid credentials$"

Related

Neovim gkeep plugin

I installed gkeep plugin for Neovim (https://github.com/stevearc/gkeep.nvim) and didn't like it. I removed it from my plugins (I use vim-plug) and run :PlugClean after that. But now I can't open neovim without error mentioning that gkeep plugin. How to fix this?
Error detected while processing function remote#define#request:
line 2:
Error invoking '/home/daniil/dotfiles/nvim/plugged/gkeep.nvim/rplugin/python3/gkeep:autocmd:BufEnter:*'
no request handler registered for "/home/daniil/dotfiles/nvim/plugged/gkeep.nvim/rplugin/python3/gkeep:
It's pointing to ~/dotfiles/nvim because I created symbolic link from ~/dotfiles/nvim to ~/.config/nvim.
Also, there is no directory gkeep.nvim inside plugged folder.
UPD: and this is my plugins
It seems that you haven't removed the configuration related to gkeep.nvim. Try to remove all settings related to gkeep.nvim.
Also, when you open neovim, run the command :UpdateRemotePlugins. It should solve your issue.

Problem building project in IntelliJ 2020.1

I'm trying to build my project but I can't.
I get this error:
Error:Cannot run program "C:\tools\jdk8.0.191\bin\java.exe" (in directory "C:\Users\"my user"\AppData\Local\JetBrains\IntelliJIdea2020.1\compile-server"): Malformed argument has embedded quote: -Djava.endorsed.dirs=\"\"
Do anyone know what to do about this? Iøm trying to build in IntelliJ 2020.1
Best Regards
It might be related to more strict command-line processing in JDK on Windows after JDK-8221858 (private) security patch see this comment for details.
Try following workaround: Help -> Edit Custom VM Options action and add the following line at the bottom of the file: -Djdk.lang.Process.allowAmbiguousCommands=true and restart IDE.

Can not run Clojure project with Cursive using Leiningen

I am unable to run a simple test project using the intellij plugin cursive. I am able to open a REPL without any problems and can even call functions defined in the core.clj file.
Running the project directly however yields this error message:
Error running 'new-project.core': failed to access class com.intellij.execution.impl.ProcessStreamsSynchronizer from class com.intellij.execution.impl.ConsoleViewRunningState (com.intellij.execution.impl.ProcessStreamsSynchronizer is in unnamed module of loader com.intellij.util.lang.UrlClassLoader #402f32ff; com.intellij.execution.impl.ConsoleViewRunningState is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader #c9a79eb)
Intellij run configuration here. Changing How to run it and What to run does nothing.
Starting the project via the Leiningen tab yields the same error message.
There is an issue open about it.
https://github.com/cursive-ide/cursive/issues/2350
Also I tried to do lein run Let me know if this work for you.

Undefined step definitions in IntelliJ

I'm trying to follow this article to match Cucumber specs with step definitions in IntelliJ.
When I press Alt+Enter, I see Inspection 'Undefined Step' options. However, I should see the intention action Create Step Definition.
I thought I had the Cucumber IntelliJ plugin installed, so that shouldn't be a problem. Any help is greatly appreciated.
Turns out I had the Gherkin plugin but not the Cucumber for Java plugin.
I wasted around an hour to solve this. My issue was, Idea was able to navigate from feature to step file. But when I wanted to execute one cucumber test from feature file (Right click and Run Scenario), it was giving error as undefined steps.
Solution: In the Edit Configuration -> provide the Glue for the cucumber which should be absolute path till steps folder. Please see below screen shot
This fixed my problem of running feature file from Idea.
Hope this helps others.
Most probably you need to install the cucumber for java plugin, if already installed then you need to enable from File>>Settings>>pugins.
I had to uncheck the "Create separate module per source set" checkbox under the "Build, Execution, Deployment" -> "Build Tools" -> "Gradle" settings, and then rebuild the project.
"Undefined" step error message would appear if you import a new BDD project.
This error could appear due to two reasons.
If you have not installed the "Cucumber for Java" plugin.
If you import any BDD projects then it will not detect step definition file.
Solution:
1. If the plugin is not found then you need to install from the below location.
File->Settings->Plugins->MarketPlace->Cucumber for Java
2. After Importing the project disable the plugin and enable once again in the Installed section under Installed.
For me there was a collision between Sidesteps plugin and Cucumber plugin in Intellij and as a result *.feature file extension was taken over by the Sidesteps plugin and was expecting Sidesteps step definitions ignoring Cucumber step definitions. No clue what Sidesteps actually is. So went to IntelliJ settings and reassigned the *.feature extension to Cucumber Scenario type and then everything worked fine and Cucumber steps are recognized by Intellij now.
I had the same issue where all of a sudden my feature to step definition glue was missing. All i did was goto Run->Edit Configurations->and removed the cucumber java
configuration and restarted IntelliJ. it worked fine.
I found that even with the Cucumber for Java plugin installed it was still generating only one step. I eventually uninstalled the Cucumber for Java plugin and reinstalled it and all step definitions were generated.
The issue was fixed after updating the Intelij to the latest version and after updating the cucumber and gherkin intelij plugins
Me not help not one of suggestions above.
But i find if you start one test from runner the problem goes on (it is worked if you have runner for some tests( Runner is class that have line #CucumberOptions(
features = "src/test/resources/stability_*****_features/",
glue = "steps"
)
And may be the next line in config helped you^
in configurations i put line: --plugin org.jetbrains.plugins.cucumber.java.run.CucumberJvm4SMFormatter
in Programm arguments line - it help me
If still not working, you can add runner class
add -> runner package -> Main Runner class
-test
-runner - Create this package
-stepPackage
-resources
-features
#CucumberOptions(features = {"classpath:features"}, glue = {"stepDefinition"},
monochrome = false,dryRun = false)
public class MainRunner extends AbstractTestNGCucumberTests {
}
That is it. Just run this class first. Right mouse click and Run'MainRunner'
Then it will work if you just go back and run Scenarios as well
I had the same issue and was resolved by going to Run> Edit configuration> Before Launch then click on the add option "+" and add Build Project option.
enter image description here

casperjs.bat on windows fails with cannot find module cli.js error

I'm trying out casperJS to run some automated tests. On windows. I followed this installation guide but am stuck.
when I try to run a simple test from the command line like this:
casperjs.bat smoketest.js
I get the following error:
Error: Cannot find module 'C:/code/base/main/Shared/casperjs\modules\cli.js'
I checked, and the file cli.js does exist under the specified path.
I thought the problem could be the mixture of forward and backward slashes in the path, but I edited the bootstrap.js casper code to hard code the path and it made no difference - it still the cannot find module.
I'm have tried this using phantomJS version 1.9.0, and 1.8.2.
Anyone know what I am doing wrong?
Has anyone had success running casper on Windows?
This is due to a bug in PhantomJS 1.9.0 that does not allow for absolute path loading in Windows. Afaik, this should only be apparent if you are using a master build of CasperJS (v1.1).
This bug has been fixed, but is not yet in the Windows binary. You can compile it yourself if you'd like, but that can take quite a bit of time.
I was using the master build of casper. With the latest released version, 1.0.2, it works fine.