A user's first impression of 2 Eclipse plugins for Cucumber

892 views
Skip to first unread message

Robert

unread,
Nov 17, 2012, 4:58:33 PM11/17/12
to cu...@googlegroups.com
Recently, I spent some time using 2 Eclipse plugins -- cukes-jvm-eclipse-plugin and Natural -- publicized at https://github.com/cucumber/cucumber-jvm/wiki/IDE-support.  Before I summarize my findings (obviously, subjective), I feel that I should mention that, although each plugin had its strengths, and weaknesses, it became apparent to me that if, by chance, the 2 projects were merged it would likely result in the ideal plugin for Eclipse -- just my 2 cents worth.

Anyhow, here are my findings for each plugin.

cukes-jvm-eclipse-plugin

* English Syntax Highlighting
Nicely supported, however, the highlighting seems to apply to the entire line. I had expected the plugin to only highlight the Gherkin keywords

* Code Completion
This feature does not appear to be completely functional.  When I attempt to access a completed step, the plugin suggests the step I would expect, however, its bounded by regular expression syntax. Example: ^the combined string is (.*)$.  Note the "^" and "$" characters.

* Run selected feature files/feature/scenario
By far, this is the best feature this plugin has to offer.  It's a plugin feature that's a pleasure to use.


Natural

* English Syntax Highlighting
Nicely implemented -- this feature italicizes and highlights Gherkin keywords (e.g., Scenario, Feature, Given, When, etc). I really like the fact that the keywords stand apart from the rest of the step.

* Code Completion
A feature that is currently not supported.  This is one feature that I do miss while using Natural.

* Highlight unmatched steps
Also nicely implemented. This feature supports identifying undefined steps by underlining the step with a yellow line and displaying a warning icon adjacent to the step.

* Go to Stepdef from Step
By far, this is, in my opinion, the best feature this plugin has to offer. The use of this feature reduces the time it takes to locate a step's implementation by a magnitude of 10 (that may be an exaggeration, but it sure does help out in a VERY BIG way).

* Run selected feature files/feature/scenario
Not supported.  This would be nice to have.

* Natural seems to have trouble with scenario outlines
There are a couple of scenario outlines that include steps that have been implemented. Unfortunately, Natural does not seem to properly recognize them.  The errors and warning that Eclipse is reporting are as follows:
  • "required (...)+ loop did not match anything at input '\n'"
  • "No definition found for 'we concatenate <string_1> with <string_2>'"
I've included a gist link to the scenario and code. I have also a screen shot of what I'm seeing in Eclipse (labeled Eclipse_Using_Natural_Plugin.png).

Well, those are my first impressions of each plugin. I hope this review turns out to be helpful to each of the plugin projects as well as to the members of this group.

Eclipse_Using_Natural_Plugin.png

Roberto Lo Giacco

unread,
Nov 23, 2012, 12:11:56 PM11/23/12
to cu...@googlegroups.com
Il giorno sabato 17 novembre 2012 21:58:33 UTC, Robert ha scritto:
Recently, I spent some time using 2 Eclipse plugins -- cukes-jvm-eclipse-plugin and Natural -- publicized at https://github.com/cucumber/cucumber-jvm/wiki/IDE-support.  Before I summarize my findings (obviously, subjective), I feel that I should mention that, although each plugin had its strengths, and weaknesses, it became apparent to me that if, by chance, the 2 projects were merged it would likely result in the ideal plugin for Eclipse -- just my 2 cents worth.

Anyhow, here are my findings for each plugin.

cukes-jvm-eclipse-plugin

* English Syntax Highlighting
Nicely supported, however, the highlighting seems to apply to the entire line. I had expected the plugin to only highlight the Gherkin keywords

* Code Completion
This feature does not appear to be completely functional.  When I attempt to access a completed step, the plugin suggests the step I would expect, however, its bounded by regular expression syntax. Example: ^the combined string is (.*)$.  Note the "^" and "$" characters.

* Run selected feature files/feature/scenario
By far, this is the best feature this plugin has to offer.  It's a plugin feature that's a pleasure to use.


Natural

* English Syntax Highlighting
Nicely implemented -- this feature italicizes and highlights Gherkin keywords (e.g., Scenario, Feature, Given, When, etc). I really like the fact that the keywords stand apart from the rest of the step.

Have you noticed the syntax highlighting is completely configurable through eclipse preferences? I've a plan for supporting other languages too, I might have found a nice way to implement it without having to rewrite the grammar for each language.
 
* Code Completion
A feature that is currently not supported.  This is one feature that I do miss while using Natural.

I'm working on it, thanks for the reminder. Can I ask what type of code completion support would be valuable? Because right now Natural's code completion support is in regards of the grammar (expected keywords mainly) while I guess you are talking about code complete on step defs.

* Highlight unmatched steps
Also nicely implemented. This feature supports identifying undefined steps by underlining the step with a yellow line and displaying a warning icon adjacent to the step.

* Go to Stepdef from Step
By far, this is, in my opinion, the best feature this plugin has to offer. The use of this feature reduces the time it takes to locate a step's implementation by a magnitude of 10 (that may be an exaggeration, but it sure does help out in a VERY BIG way).

Thanks, that was the reason the plugin has been started :-)
 
* Run selected feature files/feature/scenario
Not supported.  This would be nice to have.

* Natural seems to have trouble with scenario outlines
There are a couple of scenario outlines that include steps that have been implemented. Unfortunately, Natural does not seem to properly recognize them.  The errors and warning that Eclipse is reporting are as follows:
  • "required (...)+ loop did not match anything at input '\n'"
  • "No definition found for 'we concatenate <string_1> with <string_2>'"
I've included a gist link to the scenario and code. I have also a screen shot of what I'm seeing in Eclipse (labeled Eclipse_Using_Natural_Plugin.png).

Thanks a million for pointing this out. I had an error in the grammar that was describing all the titles (background, scenario outline and scenario) as mandatory. I've recently updated the grammar and added support for pystrings/docstrings. I'll be releasing the new version this weekend. In the meanwhile, just adding a char after the Scenario Outline keyword should fix your parsing error.
 
There's an additional feature that will be released this weekend and is templating: you will be able to create template snippets to accelerate feature editing.

Robert

unread,
Nov 24, 2012, 12:03:18 AM11/24/12
to cu...@googlegroups.com
Hi Roberto


On Friday, November 23, 2012 9:11:56 AM UTC-8, Roberto Lo Giacco wrote:
Il giorno sabato 17 novembre 2012 21:58:33 UTC, Robert ha scritto:
Recently, I spent some time using 2 Eclipse plugins -- cukes-jvm-eclipse-plugin and Natural -- publicized at https://github.com/cucumber/cucumber-jvm/wiki/IDE-support.  Before I summarize my findings (obviously, subjective), I feel that I should mention that, although each plugin had its strengths, and weaknesses, it became apparent to me that if, by chance, the 2 projects were merged it would likely result in the ideal plugin for Eclipse -- just my 2 cents worth.

Anyhow, here are my findings for each plugin.

cukes-jvm-eclipse-plugin

* English Syntax Highlighting
Nicely supported, however, the highlighting seems to apply to the entire line. I had expected the plugin to only highlight the Gherkin keywords

* Code Completion
This feature does not appear to be completely functional.  When I attempt to access a completed step, the plugin suggests the step I would expect, however, its bounded by regular expression syntax. Example: ^the combined string is (.*)$.  Note the "^" and "$" characters.

* Run selected feature files/feature/scenario
By far, this is the best feature this plugin has to offer.  It's a plugin feature that's a pleasure to use.


Natural

* English Syntax Highlighting
Nicely implemented -- this feature italicizes and highlights Gherkin keywords (e.g., Scenario, Feature, Given, When, etc). I really like the fact that the keywords stand apart from the rest of the step.

Have you noticed the syntax highlighting is completely configurable through eclipse preferences? I've a plan for supporting other languages too, I might have found a nice way to implement it without having to rewrite the grammar for each language.
 
* Code Completion
A feature that is currently not supported.  This is one feature that I do miss while using Natural.

I'm working on it, thanks for the reminder. Can I ask what type of code completion support would be valuable? Because right now Natural's code completion support is in regards of the grammar (expected keywords mainly) while I guess you are talking about code complete on step defs.


I was hoping for step-definition-style code completion -- similar to how RubyMine supports code completion.  Have a look at http://www.jetbrains.com/ruby/webhelp/creating-step-definition.html
 


* Highlight unmatched steps
Also nicely implemented. This feature supports identifying undefined steps by underlining the step with a yellow line and displaying a warning icon adjacent to the step.

* Go to Stepdef from Step
By far, this is, in my opinion, the best feature this plugin has to offer. The use of this feature reduces the time it takes to locate a step's implementation by a magnitude of 10 (that may be an exaggeration, but it sure does help out in a VERY BIG way).

Thanks, that was the reason the plugin has been started :-)
 
* Run selected feature files/feature/scenario
Not supported.  This would be nice to have.

* Natural seems to have trouble with scenario outlines
There are a couple of scenario outlines that include steps that have been implemented. Unfortunately, Natural does not seem to properly recognize them.  The errors and warning that Eclipse is reporting are as follows:
  • "required (...)+ loop did not match anything at input '\n'"
  • "No definition found for 'we concatenate <string_1> with <string_2>'"
I've included a gist link to the scenario and code. I have also a screen shot of what I'm seeing in Eclipse (labeled Eclipse_Using_Natural_Plugin.png).

Thanks a million for pointing this out. I had an error in the grammar that was describing all the titles (background, scenario outline and scenario) as mandatory. I've recently updated the grammar and added support for pystrings/docstrings. I'll be releasing the new version this weekend. In the meanwhile, just adding a char after the Scenario Outline keyword should fix your parsing error.
 
There's an additional feature that will be released this weekend and is templating: you will be able to create template snippets to accelerate feature editing.

Not a problem.  I look forward to taking the new version out for a spin once it's been released. In the meantime, I'll try adding a char after the Scenario Outline keyword to see if that fixes my issue.
Reply all
Reply to author
Forward
0 new messages