Hi i am new to cucumber, when i tried to run test file i am getting below error,can any one help please...
java.lang.NoClassDefFoundError: cucumber/io/ResourceLoaderat java.lang.Class
.getDeclaredConstructors0(Native Method)
at
java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at
java.lang.Class.getConstructor0(Unknown Source)
at
java.lang.Class.getConstructor(Unknown Source)
at
org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:31)
at
org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24)
at
org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
at
org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)
at
org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
at
org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.<init>(JUnit4TestReference.java:33)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestClassReference.<init>(JUnit4TestClassReference.java:25)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:48)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused
by: java.lang.ClassNotFoundException: cucumber.io.ResourceLoader
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)
... 18 moreand here is my POM file.<
project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>cucumber.com</groupId>
<artifactId>cucumber1</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>test231</name>
<description>abc123</description>
<dependencies>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.8</version>
</
dependency>
<
dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.0.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.24.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.13.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-ie-driver</artifactId>
<version>2.24.1</version>
</dependency>
<dependency>
<groupId>org.openqa.selenium.server</groupId>
<artifactId>selenium-server</artifactId>
<version>1.0-20081010.060147</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.5.2</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-firefox-driver</artifactId>
<version>2.24.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-rc</artifactId>
<version>1.0.2</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.8</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<version>3.8</version>
</dependency>
<!-- LOG4J - BASIC LOGGING CAPABILITIES -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-jvm</artifactId>
<version>1.1.2</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-core</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-groovy</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-guice</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>de.saumya.mojo</groupId>
<artifactId>cucumber-maven-plugin</artifactId>
<version>1.0.0-beta</version>
<type>maven-plugin</type>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-html</artifactId>
<version>0.2.2</version>
</dependency>
<dependency>
<groupId>com.daveayan</groupId>
<artifactId>gherkinsalad.cucumber</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-picocontainer</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>net.masterthought</groupId>
<artifactId>cucumber-reporting</artifactId>
<version>0.0.17</version>
</dependency>
<dependency>
<groupId>com.daveayan</groupId>
<artifactId>gherkinsalad</artifactId>
<version>2.2</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.daveayan</groupId>
<artifactId>gherkinsalad.core</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>com.daveayan</groupId>
<artifactId>gherkinsalad.dojo</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>com.daveayan</groupId>
<artifactId>gherkinsalad.html</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>com.daveayan</groupId>
<artifactId>gherkinsalad.jquery</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>com.daveayan</groupId>
<artifactId>gherkinsalad.tinymce</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>com.google.code.maven-play-plugin</groupId>
<artifactId>play-selenium-junit4</artifactId>
<version>1.0.0-beta4</version>
</dependency>
</dependencies>
<build>
<testResources>
<!-- FRAMEWORK PROPERTY FILE -->
<testResource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/*.properties</include>
</includes>
</testResource>
<!-- DATASHEET LOCATION -->
<testResource>
<directory>src/test/resources/datasheets/*</directory>
</testResource>
</testResources>
<plugins>
<!-- MAVEN COMPILER PLUGIN -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<fork>true</fork>
</configuration>
</plugin>
<!-- MAVEN SUREFIRE PLUGIN -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.10</version>
<configuration>
<!-- INCLUDE ALL TEST SCRIPT FILES -->
<includes>
<include>**/*.java</include>
</includes>
<!-- PASS FRAMEWORK PROPERTIES FOR USE BY SUREFIRE -->
<systemProperties>
<property>
<name>test_phase</name>
<value>${test_phase}</value>
</property>
<property>
<name>test_environment</name>
<value>${test_environment}</value>
</property>
<property>
<name>debug_switch</name>
<value>${debug_switch}</value>
</property>
</systemProperties>
</configuration>
</plugin>
</plugins>
</build>
</
project>
thanks in advance--
-- Rules --
1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a new topic instead.
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu...@googlegroups.com. To unsubscribe from this group, send email to cukes+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
---
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/groups/opt_out.
hi Aslak,
<
project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>cucumber.com</groupId>
<artifactId>cucumber1</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>test231</name>
<description>abc123</description>
<dependencies>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.8</version>
</
dependency>
<
dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.1.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.1.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.24.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.13.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
project>
java.lang.NoClassDefFoundError: cucumber/io/ResourceLoaderat java.lang.Class
...<font co
On Wednesday, March 13, 2013 9:22:22 AM UTC, Aslak Hellesøy wrote:hi Aslak,thanks for your reply, i did the changes you mentioned but stll the result is same.
--
java.lang.NoClassDefFoundError: org/codehaus/groovy/runtime/InvokerInvocationException
<
project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>test.com</groupId>
<artifactId>cucumber2</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>test6</name>
<description>test7</description>
<dependencies>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-core</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-groovy</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-html</artifactId>
<version>0.2.2</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-picocontainer</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>net.masterthought</groupId>
<artifactId>cucumber-reporting</artifactId>
<version>0.0.17</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
</dependency>
</dependencies>
</
project>
On Wed, Mar 13, 2013 at 8:47 AM, mahesh tanneeru <tanneer...@gmail.com> wrote:
...<blockquote style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-st
thanx aslak,i observed my project in detail and its all messed up.i created another new project with all dependiences (same version) this time i am gitting different errorjava.lang.NoClassDefFoundError: org/codehaus/groovy/runtime/InvokerInvocationException
--
...<font color="#008080
HI Aslak, thank you very muchfinally i am able to run the test but feature file didn't converted to stepdef.
can you please help me with thistest file:import org.junit.runner.RunWith;import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@Cucumber.Options(features="C://Users//tannerum//workspace//cucumber2//src//test//resources//test1.feature",format = {"pretty", "html:target/cucumber"},tags="@mahesh")
public class Test2 {}when i run the above test file out put is as follows:@mahesh
Feature: loginScenario: testlogin [90m# C:\Users\tannerum\workspace\cucumber2\src\test\resources\test1.feature:4 [0m
Given: i am in home page
When: i want to login
Then: i see welcome message
--
-- Rules --
1) Please prefix the subject with [Ruby], [JVM] or [JS].
Feature: Depositing money in to a User account |
2 |
3 | Scenario: Depositing money in to User's account should add money to the User's current balance |
4 | Given a User has no money in their account |
5 | When £100 is deposited in to the account |
6 |
|
|
when i run the test file i am expecting that to convert the features in to methods @Given
|
...<p align="left
HI Aslak, thank you very muchfinally i am able to run the test but feature file didn't converted to stepdef. can you please help me with thistest file:import org.junit.runner.RunWith;import cucumber.api.junit.Cucumber;
@RunWith(Cucumber.class)
@Cucumber.Options(features="C://Users//tannerum//workspace//cucumber2//src//test//resources//test1.feature",format = {"pretty", "html:target/cucumber"},tags="@mahesh")
public class Test2 {}
when i run the above test file out put is as follows:@mahesh
Feature: loginScenario: testlogin [90m# C:\Users\tannerum\workspace\cucumber2\src\test\resources\test1.feature:4 [0m
Given: i am in home page
When: i want to login
Then: i see welcome messageis there any jar that i missed?
--
-- Rules --
1) Please prefix the subject with [Ruby], [JVM] or [JS].
and my test file is as follows
@RunWith(Cucumber.class)
@Cucumber.Options(format = {"pretty", "html:target/cucumber"},tags="@mahesh")
public class testcucumber{ }
test file is not identifing the features, if i am not wrong its because of folder structure.
can you please help me with this
thanks in advance mahesh
...
Hi Aslak,i think i had some problem with my MAVEN folderby default in my MAVEN structure there are four folderssrc / main / javasrc / main / java / resourcessrc / test / javasrc / test / java / resources
--