How to set a crontab for executing cucumber feature and output the results to send mail ?

234 views
Skip to first unread message

anurag

unread,
Feb 24, 2012, 7:15:25 AM2/24/12
to Cukes


Hi,


I would like to run my cucumber features files for every 2hours and
output the reults in html format and send mail to the required people.

Can anyone suggest me an approach to do this job?

My Ruby framework environment is :

OS : ubuntu 10.04LTS
RVM with ruby 1.9.2 as defualt version and rubygems 1.8.17

And my gem list is :

paxterra@paxterra-desktop:~$ gem list

*** LOCAL GEMS ***

Ascii85 (1.0.1)
builder (3.0.0)
bundler (1.0.22)
childprocess (0.3.1)
cucumber (1.1.8)
diff-lcs (1.1.3)
ffi (1.0.11)
gherkin (2.9.0, 2.8.0)
json (1.6.5)
multi_json (1.0.4)
mysql (2.8.1)
net-ssh (2.3.0)
pdf-reader (1.0.0)
prawn (0.12.0)
rake (0.9.2)
rspec (2.8.0)
rspec-core (2.8.0)
rspec-expectations (2.8.0)
rspec-mocks (2.8.0)
ruby-rc4 (0.1.5)
rubyzip (0.9.6.1)
selenium-webdriver (2.19.0)
term-ansicolor (1.0.7)
ttfunk (1.0.3)
watir-webdriver (0.5.3)
paxterra@paxterra-desktop:~$


Regards,
Anurag

aslak hellesoy

unread,
Feb 24, 2012, 8:36:10 AM2/24/12
to cu...@googlegroups.com
On Fri, Feb 24, 2012 at 12:15 PM, anurag <anurags...@gmail.com> wrote:
>
>
> Hi,
>
>
> I would like to run my cucumber features files for every 2hours and
> output the reults in html format and send mail to the required people.
>
> Can anyone suggest me an approach to do this job?
>

Why don't you use a continuous integration server instead?

Aslak

> --
> 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 http://groups.google.com/group/cukes?hl=en.
>

Jon Kern

unread,
Feb 24, 2012, 10:06:12 AM2/24/12
to cu...@googlegroups.com
yea, this is not a cucumber request...

in addition to CI servers that do this sort of thing for a living, you
could try manual route with something like guard to monitor file changes
(like autotest)? Plus, I would wager 12 emails per day will turn into
spam in short order... Might be better to post results on server and
folks just go see the latest page...

jon

blog: http://technicaldebt.com
twitter: http://twitter.com/JonKernPA


aslak hellesoy said the following on 2/24/12 8:36 AM:

Anurag_CSE

unread,
Feb 27, 2012, 4:49:54 AM2/27/12
to cu...@googlegroups.com

Do I need to install Jenkins(hudson server) for this job to be done?

I have installed jenkins in my gem list and also locally in the system
by using sudo apt-get install jenkins.

After this how shall I proceed to run my cucumber feature files. I am
finding some tutorials using rails, rake etc., which I do not have in my
framework.

Can anyone guide me through with this?

Regards,
Anurag

aslak hellesoy

unread,
Feb 27, 2012, 6:02:12 AM2/27/12
to cu...@googlegroups.com
On Mon, Feb 27, 2012 at 9:49 AM, Anurag_CSE <anurags...@gmail.com> wrote:
>
> Do I need to install Jenkins(hudson server) for this job to be done?
>

No.

Any continuous integration server will do.

They will all run an arbitrary command that you choose (rake,
cucumber, whatever) when it detects a new commit in your source
control system. They can all be configured to send out email on
failure/success.

> I have installed jenkins in my gem list and also locally in the system by
> using sudo apt-get install jenkins.
>
> After this how shall I proceed to run my cucumber feature files. I am
> finding some tutorials using rails, rake etc., which I do not have in my
> framework.
>
> Can anyone guide me through with this?
>

Why don't you follow one of the many guides available on the World
Wide Web on this topic? Do you need help finding a blog/wiki/webpage
that describes how to set up continuous integration with cucumber?

Aslak

Anurag_CSE

unread,
Feb 27, 2012, 6:26:49 AM2/27/12
to cu...@googlegroups.com
Ok. I chose Jenkins as my CI to the run.
Using jenkins how should I run my cucumber features.

aslak hellesoy

unread,
Feb 27, 2012, 6:37:33 AM2/27/12
to cu...@googlegroups.com
On Mon, Feb 27, 2012 at 11:26 AM, Anurag_CSE <anurags...@gmail.com> wrote:
> Ok. I chose Jenkins as my CI to the run.
> Using jenkins how should I run my cucumber features.
>

Do you know how to use google?

Anurag_CSE

unread,
Feb 27, 2012, 8:12:22 AM2/27/12
to cu...@googlegroups.com
With all due respect, ofcourse aslak I knew how to use google.

But I couldn't find a proper tutorial on how to use jenkins for running
the cucumber features.

aslak hellesoy

unread,
Feb 27, 2012, 8:24:12 AM2/27/12
to cu...@googlegroups.com
On Mon, Feb 27, 2012 at 1:12 PM, Anurag_CSE <anurags...@gmail.com> wrote:
> With all due respect, ofcourse aslak I knew how to use google.
>

When I google for jenkins cucumber the top 3 search results point to:

* http://stackoverflow.com/questions/4772377/ci-with-hudson-and-cucumber
* http://www.cheezyworld.com/2011/08/09/running-your-cukes-in-jenkins/
* http://sermoa.wordpress.com/2011/07/02/cucumber-running-headless-selenium-with-jenkins-the-easy-way/

Did you get different search results? Do neither of there resources
answer your question?

Aslak

Jon Kern

unread,
Feb 27, 2012, 10:26:53 AM2/27/12
to cu...@googlegroups.com
Anurag,

you are asking a cucumber mailing list about how to use a CI server... hence, you are pissing off Aslak :-)

  1. AFAIK, CI servers can run arbitrary commands -- as can a cron job...
  2. running cucumber is as easy as "<project root>$cucumber" -- and it will pick up your default config settings and run all features it finds.
Your solution is 1 + 2 above -- and the google search links Aslak posted :-)
Anurag_CSE said the following on 2/27/12 8:12 AM:

Anurag_CSE

unread,
Feb 27, 2012, 10:40:04 AM2/27/12
to cu...@googlegroups.com

Thank you Jon.

Sorry, aslak since I am a newbie to these things.

aslak hellesoy

unread,
Feb 27, 2012, 10:55:49 AM2/27/12
to cu...@googlegroups.com
On Mon, Feb 27, 2012 at 3:26 PM, Jon Kern <jonk...@gmail.com> wrote:
> Anurag,
>
> you are asking a cucumber mailing list about how to use a CI server...
> hence, you are pissing off Aslak :-)
>

That's not true. I'm just trying to help Anurag find stuff on the
Internet so he can be solve problems more independently.

Anurag - it's ok to ask questions, but we expect that you have done a
minimum or research yourself, otherwise you are just wasting
everybody's time.
I find it hard to believe that you are unable to find any existing web
pages that explain how to use cucumber and jenkins (or cucumber and
continuous integration in general).

Aslak

ANURAG_CSE

unread,
Feb 29, 2012, 2:25:30 AM2/29/12
to cu...@googlegroups.com

Hi All,

I have installed Jenkins and svn server for repository of cucumber
feature files in my ubuntu system.
And created a new job with Project name jenkins and gave Source Code
Management : Subversion where I placed my cucumber files location in svn
repository and created the build.

But I couldn't find my hmtl generated report and the browser is not
getting launched when I run the build.

Andrew Premdas

unread,
Feb 29, 2012, 6:58:13 AM2/29/12
to cu...@googlegroups.com
Anurag,

Before you post asking for help try reading your post and think about

1) If you received this post would you be able to help with the information you've supplied
2) Are you asking the correct people for help
3) Is there anything more I can do to answer my question myself

If you apply these criteria to your post you will see

1) You haven't provided enough clear information for someone to know what your problem is
2) You should probably be posting this to a jenkins mailing list
3) You could look at the documentation for Jenkins and do a bit more work yourself on learning how it works. At the very least this should help you describe your problem a little better. 

You have only been using Jenkins for a day or two, you should give yourself a little more time to learn about it.

All best

Andrew
On Mon, Feb 27, 2012 at 11:26 AM, Anurag_CSE<anuragsatishcse@gmail.com>

wrote:

Ok. I chose Jenkins as my CI to the run.
Using jenkins how should I run my cucumber features.

Do you know how to use google?


On Monday 27 February 2012 04:32 PM, aslak hellesoy wrote:

On Mon, Feb 27, 2012 at 9:49 AM, Anurag_CSE<anuragsatishcse@gmail.com>
On Fri, Feb 24, 2012 at 12:15 PM, anurag<anuragsatishcse@gmail.com>

For more options, visit this group at
http://groups.google.com/group/cukes?hl=en.

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

For more options, visit this group at
http://groups.google.com/group/cukes?hl=en.

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

For more options, visit this group at
http://groups.google.com/group/cukes?hl=en.


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

For more options, visit this group at
http://groups.google.com/group/cukes?hl=en.

--
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+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/cukes?hl=en.




--
------------------------
Andrew Premdas
Reply all
Reply to author
Forward
0 new messages