Selenium for Java [java] - Scheduling Eclipse Ant Build

43 views
Skip to first unread message

qualityworld

unread,
Jan 21, 2011, 5:24:14 PM1/21/11
to Selenium Users
I have an ant build file within the Eclipse IDE framework that
compiles and executes a group of Java/Junit/Selenium programs.

I start Eclipse, open the build.xml file within Eclipse, select RUN
AS / ANT BUILD, and everything runs correctly, including creating the
junit report.

Now, I want to schedule this to run unattended at a specific time and
date. I’ve tried and failed at this multiple times.

I thought about scheduling Eclipse to run using the windows task
scheduler, which worked, but I couldn’t figure out how to get the ant
build to start automatically in Eclipse from a parameter passed from
the task scheduler.

The other possibility seems to be scheduling ant to run directly
(outside eclipse completely) using the windows task scheduler and
pointing to the build file. From the DOS prompt, in the project
directory, “ant –f buildfilename.xml” displays “build successful” but
the java/junit programs don’t run as they do from Eclipse. I tried
several other things, even found a thread about this which I followed
but still wasn’t able to get this to work. Any help would be
appreciated.

kaushik mahata

unread,
Jan 21, 2011, 5:44:43 PM1/21/11
to seleniu...@googlegroups.com
why dont you use Hudson ?


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.


Paul Winer

unread,
Jan 21, 2011, 6:07:12 PM1/21/11
to seleniu...@googlegroups.com
Problem Solved - just added the ant target name (1 of 3) that actually runs the test.

ant –f buildfilename.xml 

ant –f buildfilename.xml targetname
Reply all
Reply to author
Forward
0 new messages