how to access steps available in other cucumber project in current cucumber project

1.161 visualizzazioni
Passa al primo messaggio da leggere

reddy

da leggere,
15 giu 2016, 12:51:2515/06/16
a Cukes
Please help me understand accessing steps available in other cucumber projects in current cucumber project.
i have tried glue option as well and i also have added other cucumber project jar file in maven dependencies but could not make it work. 

attaching 2 cucumber project jar files. basically i have some steps defined in "cucumbertestautomation2" project. and i am trying to access those steps in "cucumbertestautomation1" project. Please help. 

Il messaggio è stato eliminato
Il messaggio è stato eliminato

reddy

da leggere,
16 giu 2016, 00:29:5716/06/16
a Cukes
Below is the feature file of project1:
        Feature: To test cucumber test is running
I want to run a sample feature file.

Scenario: cucumber setup

Given sample feature file is ready1
When I run the feature file1
Then run should be successful1

Scenario: cucumber setup for cucmbertestautomation2

Given sample feature file is ready2
When I run the feature file2
Then run should be successful2

reddy

da leggere,
16 giu 2016, 00:32:0516/06/16
a Cukes
"Given sample feature file is ready2" step is available in project2.

and POM is including project2 jar file like below:
    <dependency>
<groupId>com.celcom</groupId>
<artifactId>cucumbertestautomation2</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>

Still the step "Given sample feature file is ready2" is not recognized which is there in the dependency.

Vino Maddy

da leggere,
17 giu 2016, 08:38:4217/06/16
a Cukes
i am getting the below error while running a cucumber feature in eclipse using run as cucumber.

pls help 

Usage: java cucumber.api.cli.Main [options] [ [FILE|DIR][:LINE[:LINE]*] ]+

Options:

    -g, --glue PATH                        Where glue code (step definitions and hooks) is loaded from.
    -f, --format FORMAT[:PATH_OR_URL]      How to format results. Goes to STDOUT unless PATH_OR_URL is specified.
                                           Built-in FORMAT types: junit, html, pretty, progress, json.
                                           FORMAT can also be a fully qualified class name.
    -t, --tags TAG_EXPRESSION              Only run scenarios tagged with tags matching TAG_EXPRESSION.
    -n, --name REGEXP                      Only run scenarios whose names match REGEXP.
    -d, --[no-]-dry-run                    Skip execution of glue code.
    -m, --[no-]-monochrome                 Don't colour terminal output.
    -s, --[no-]-strict                     Treat undefined and pending steps as errors.
        --snippets [underscore|camelcase]  Naming convention for generated snippets. Defaults to underscore.
        --dotcucumber PATH_OR_URL          Where to write out runtime information. PATH_OR_URL can be a file system
                                           path or a URL.
    -v, --version                          Print version.
    -h, --help                             You're looking at it.

Exception in thread "main" cucumber.runtime.CucumberException: Unknown option: --plugin
at cucumber.runtime.RuntimeOptions.parse(RuntimeOptions.java:130)
at cucumber.runtime.RuntimeOptions.<init>(RuntimeOptions.java:77)
at cucumber.runtime.RuntimeOptions.<init>(RuntimeOptions.java:70)
at cucumber.runtime.RuntimeOptions.<init>(RuntimeOptions.java:62)
at cucumber.api.cli.Main.run(Main.java:31)
at cucumber.api.cli.Main.main(Main.java:18)
 

George Dinwiddie

da leggere,
19 giu 2016, 07:59:3719/06/16
a cu...@googlegroups.com
Vino,

First suggestion, don't tag an unrelated question onto the end of an
existing thread. That's a good way to make your question unnoticed.
What version of cucumber are you using? The --format option has been
deprecated in favor of the newer --plugin option for some time.

- George

--
----------------------------------------------------------------------
* George Dinwiddie * http://blog.gdinwiddie.com
Software Development http://www.idiacomputing.com
Consultant and Coach http://www.agilemaryland.org
----------------------------------------------------------------------

Björn Rasmusson

da leggere,
19 giu 2016, 13:12:0319/06/16
a Cukes
George Dinwiddie wrote:
Vino,

First suggestion, don't tag an unrelated question onto the end of an
existing thread. That's a good way to make your question unnoticed.

I agree completely.
In this case he did post his question again on a new thread:
https://groups.google.com/forum/#!topic/cukes/g8Wtg7nvvlQ
Let's continue the discussion there.

Regards
Björn
 

reddy

da leggere,
21 giu 2016, 05:44:0721/06/16
a Cukes
can some one help on this?


On Wednesday, 15 June 2016 22:21:25 UTC+5:30, reddy wrote:

Thomas Sundberg

da leggere,
21 giu 2016, 05:49:3321/06/16
a cu...@googlegroups.com
Hi
If you add a jar containing the classes from cucumbertestautomation1
to your cucumbertestautomation2 project and make sure that the
classpath for the steps is the same, then it will work out of the box.

The trick is to make sutre that the steps you want to reuse are
defined in the same package, or a subpackage, to your test runner.

If the packages isn't the same, then it will not work since Cucumber
scans the classpath after steps and it only searches for classes in
the same package as the runner or a subpackage.

HTH
Thomas


> --
> 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.



--
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://thomassundberg.wordpress.com/
Twitter: @thomassundberg

Better software through faster feedback

Interested in a BDD Kickstart in Stockholm?
https://cucumber.io/events/bdd-kickstart-stockholm-16

Vino Maddy

da leggere,
21 giu 2016, 06:21:4421/06/16
a cu...@googlegroups.com
-----------------------------------------------
Hi, 
i am using the below jars for my cucumber framework 


You received this message because you are subscribed to a topic in the Google Groups "Cukes" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cukes/-HyeRT6-c_0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cukes+un...@googlegroups.com.

Vino Maddy

da leggere,
21 giu 2016, 06:24:1421/06/16
a cu...@googlegroups.com
Hi,

I m using the below jars for my cucumber -java framework. when i run the feature file from eclipse using run as feature i am getting error.

jars used:

junit - 4.11
cucumber-core - 1.1.7
httpclient - 4.3.3. 
cucumber-java - 1.2.0
cucumber - junit - 1.1.6
selenium-java - 2.41.0
commons- configuration - 1.10 

------------------------------
java version 1.7
eclipse kepler




error message:
Rispondi a tutti
Rispondi all'autore
Inoltra
0 nuovi messaggi