How to run serenity bdd project through its jar

1,158 views
Skip to first unread message

Nakshatra P

unread,
Jun 2, 2016, 3:35:13 AM6/2/16
to Serenity BDD Users Group
Hi,

Can someone guide me how to run serenity bdd project through its jar file?

java -jar target\serenitybdd-1.0-SNAPSHOT.jar 

is throwing no main manifest attribute, in target\serenitybdd-1.0-SNAPSHOT.jar

Thanks
PJ

John Ferguson SmartSmart

unread,
Jun 2, 2016, 3:37:29 AM6/2/16
to Serenity BDD Users Group, Nakshatra P
Hi Nakashtra,

Could you give some background as to what you are trying to achieve by running Serenity via the JAR file?

___________________________________________________
John Smart | Wakaleo Consulting  |  +44 7398 832273
Making smart teams collaborate better

http://johnfergusonsmart.com  | rea...@johnfergusonsmart.com
___________________________________________________

--
You received this message because you are subscribed to the Google Groups "Serenity BDD Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thucydides-use...@googlegroups.com.
To post to this group, send email to thucydid...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Nakshatra P

unread,
Jun 3, 2016, 1:02:40 AM6/3/16
to Serenity BDD Users Group, putta...@gmail.com
Hi John,

My CI team is expecting a packaged test automation build, so they can invoke just the jar to kick start the test execution. They do not want to use maven commands for some reasons which I don't understand properly.

Thanks,
NP

John Smart

unread,
Jun 3, 2016, 7:50:02 AM6/3/16
to Nakshatra P, Serenity BDD Users Group
That would be difficult - you would have to write a runner class that calls the JUnit runners, and bundle up both the dependencies and the test classes into a single JAR (which is surprisingly hard to do). So, no, this feature is not currently supported out of the box. Maybe try to understand why the CI team don't want to run Maven on a build box (which seems a little unconventional)?
--
___________________________________________________
John Smart | Wakaleo Consulting  |  +44 7398 832273
Making smart teams collaborate better
http://www.wakaleo.com  |  john....@wakaleo.com
___________________________________________________

We love breaking down silos and helping smart teams collaborate better! Ask about our tailored on-site workshops in Agile Requirements Discovery, Behaviour Driven Development, Agile Development Practices, and Test Automation!
___________________________________________________

Harry King

unread,
Jun 4, 2016, 12:29:50 PM6/4/16
to Serenity BDD Users Group
Hi Nakshakra,

As John says, your teams approach sounds a little unconventional, but if you have got the tests running locally, you should be able to use this stack overflow answer to build a jar file that contains serenity and your test code.

http://stackoverflow.com/questions/574594/how-can-i-create-an-executable-jar-with-dependencies-using-maven

Reply all
Reply to author
Forward
0 new messages