Gherkin Syntax Checker

1,413 views
Skip to first unread message

Christian Helmbold

unread,
Jun 5, 2014, 10:28:43 AM6/5/14
to cu...@googlegroups.com
Hi all,

is there a Gherkin syntax checker available?  Preferably JVM-based, but that is not so important.

Thanks,
Christian

Oscar Rieken

unread,
Jun 5, 2014, 11:43:19 AM6/5/14
to cu...@googlegroups.com
do you mean 
cucumber --dry-run 


--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tomáš Knězek

unread,
Jun 6, 2014, 2:35:35 AM6/6/14
to cu...@googlegroups.com
Try Cetriolo NetBeans plugin ;-)

Dne čtvrtek, 5. června 2014 16:28:43 UTC+2 Christian Helmbold napsal(a):

Christian Helmbold

unread,
Jun 6, 2014, 9:16:51 AM6/6/14
to cu...@googlegroups.com
cucumber --dry-run seems to be what I was looking for. Does it work with Cucumber-JVM, too? java -jar cucumber-core-1.1.5.jar --dry-run throws an exception:

>java -jar cucum
ber-core-1.1.5.jar --dry-run
Exception in thread "main" java.lang.NoClassDefFoundError: gherkin/util/FixJava
        at cucumber.runtime.RuntimeOptions.<clinit>(RuntimeOptions.java:29)
        at cucumber.api.cli.Main.run(Main.java:20)
        at cucumber.api.cli.Main.main(Main.java:16)
Caused by: java.lang.ClassNotFoundException: gherkin.util.FixJava
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 3 more

Is it possible to dry-run with cucumber-jvm?

aslak hellesoy

unread,
Jun 6, 2014, 9:51:22 AM6/6/14
to Cucumber Users
On Fri, Jun 6, 2014 at 8:16 AM, Christian Helmbold <helmbold....@gmail.com> wrote:
cucumber --dry-run seems to be what I was looking for. Does it work with Cucumber-JVM, too? java -jar cucumber-core-1.1.5.jar --dry-run throws an exception:


You need the latest gherkin jar on your classpath.
 
>java -jar cucum
ber-core-1.1.5.jar --dry-run
Exception in thread "main" java.lang.NoClassDefFoundError: gherkin/util/FixJava
        at cucumber.runtime.RuntimeOptions.<clinit>(RuntimeOptions.java:29)
        at cucumber.api.cli.Main.run(Main.java:20)
        at cucumber.api.cli.Main.main(Main.java:16)
Caused by: java.lang.ClassNotFoundException: gherkin.util.FixJava
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 3 more

Is it possible to dry-run with cucumber-jvm?

--

Christian Helmbold

unread,
Jun 10, 2014, 3:40:42 AM6/10/14
to cu...@googlegroups.com
I tried it with version 1.1.7 now, but with the same result. Or did you mean the current development version?

Björn Rasmusson

unread,
Jun 10, 2014, 4:13:47 AM6/10/14
to cu...@googlegroups.com

Den tisdagen den 10:e juni 2014 kl. 09:40:42 UTC+2 skrev Christian Helmbold wrote:

Please, answer inline, so we easily get the context of the reply, see http://cukes.info/posting-rules.html
 
cucumber --dry-run seems to be what I was looking for. Does it work with Cucumber-JVM, too? java -jar cucumber-core-1.1.5.jar --dry-run throws an exception:

Exception in thread "main" java.lang.NoClassDefFoundError: gherkin/util/FixJava
        at cucumber.runtime.RuntimeOptions.<clinit>(RuntimeOptions.java:29)

You need the latest gherkin jar on your classpath.
I tried it with version 1.1.7 now, but with the same result. Or did you mean the current development version?
 
Yes, but did you have the latest gherkin jar (gherkin-2.12.2.jar), on the classpath. As you can see in the pom.xml, it is one of cucumber-core:s dependencies.
 
Regards
Björn

Christian Helmbold

unread,
Jun 12, 2014, 9:05:40 AM6/12/14
to cu...@googlegroups.com


Am Dienstag, 10. Juni 2014 10:13:47 UTC+2 schrieb Björn Rasmusson:

Den tisdagen den 10:e juni 2014 kl. 09:40:42 UTC+2 skrev Christian Helmbold wrote:

Please, answer inline, so we easily get the context of the reply, see http://cukes.info/posting-rules.html

I grew up in the usenet where I was educated to remove as most text from the previous post as possible ;-)  
 
 
Yes, but did you have the latest gherkin jar (gherkin-2.12.2.jar), on the classpath. As you can see in the pom.xml, it is one of cucumber-core:s dependencies.

Thank you. I compiled a .jar with dependencies and it works now.

If anyone is interested in doing the same, he or she can use the .pom https://gist.github.com/anonymous/983307e19c1a07cfd0aa and run mvn assembly:single.

Regards
Christian

Christian Helmbold

unread,
Jun 12, 2014, 9:07:45 AM6/12/14
to cu...@googlegroups.com


Am Donnerstag, 12. Juni 2014 15:05:40 UTC+2 schrieb Christian Helmbold:

If anyone is interested in doing the same, he or she can use the .pom https://gist.github.com/anonymous/983307e19c1a07cfd0aa and run mvn assembly:single.

Reply all
Reply to author
Forward
0 new messages