Using Implemented steps from one project to another project

24 views
Skip to first unread message

ramalingam seenivasan

unread,
Aug 19, 2016, 12:37:33 PM8/19/16
to Cukes, seenivasan...@nokia.com
Hi, 

We are using cucmber with java. In one project I create some feature files and implemented the steps also. Then I created *.jar file for that project. Now in another project I added the jar as a dependency. Can I use the steps implemented in the jar in another project feature file.


Kindly let me know is it possible to use the steps implemented in the jar in another project feature file. If so let me know.

Thomas Sundberg

unread,
Aug 19, 2016, 2:25:18 PM8/19/16
to cu...@googlegroups.com, seenivasan...@nokia.com
On 16 August 2016 at 12:45, ramalingam seenivasan
<seeniv...@gmail.com> wrote:
> Hi,
>
> We are using cucmber with java. In one project I create some feature files
> and implemented the steps also. Then I created *.jar file for that project.
> Now in another project I added the jar as a dependency. Can I use the steps
> implemented in the jar in another project feature file.
>

Steps available in the class path in the same package as the runner or
a sub-package are found and should therefore executed. Your approach
should work.

It is, however, interesting to think about why you want to re-use
steps. Steps tend to be very specific for the system you are working
with. It sounds as you are thinking about general steps that
implements the same between in more than one project. This is a
situation I haven't been exposed to myself. Every system tend to be
unique and re-use of steps are uncommon.

>
> Kindly let me know is it possible to use the steps implemented in the jar in
> another project feature file. If so let me know.
>

What happened when you tried?

/Thomas

--
Thomas Sundberg
M. Sc. in Computer Science

Mobile: +46 70 767 33 15
Blog: http://www.thinkcode.se/blog
Twitter: @thomassundberg

Better software through faster feedback

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

ramalingam seenivasan

unread,
Aug 29, 2016, 5:55:02 AM8/29/16
to Cukes, seenivasan...@nokia.com
Hi,

Thanks for the reply.

I have tried it, its not working. Its asking me to implement the steps again.

The reason I want to share steps is, Mine is base product on which different teams built their products. So I'm thinking of sharing the scripts from my project to other project where they can use this and write additional steps specific to their application.
Reply all
Reply to author
Forward
0 new messages