• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Running tests from ant on a continuous integration server
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running tests from ant on a continuous integration server


  • Subject: Re: Running tests from ant on a continuous integration server
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 22 Oct 2008 10:37:19 -0700

Hi James,


On Oct 22, 2008, at 8:18 AM, Brook, James wrote:

Each of our applications is built automatically on a continuous integration server whenever new code is committed. I would now like our tests to be run once these continuous integration builds are completed. These tests should be run from an ant task. We are using the new wolips build style to make this possible (no more nasty woproject/ant.blah files).

My question is: does anyone have a nice ant target/task for achieving this? We are happy to run junit or testng, but I would like a task that makes it easy to provide the WebObjects classpath. I saw that previously there was a task called wounit, which extended the junit task. This seems to have been dropped from the most recent version of WOUnitTest. I guess we could make our own task, but it would be nice not to do this if someone already has a solution.

The plan is to run Selenium-RC tests from junit and it would be excellent to get them running on the continuous integration servers. Any pointers would be very much appreciated.

It seems that some sort of vanilla 'run-tests' task would be a nice thing to have in the ant build files that WOLips generates.


I use this to run my TestNG tests:

    <target name="test" depends="setProps" if="has.unit.tests">

        <testng workingdir="${project.working.directory}"
                outputDir="${test.report.dir}/${database.type}"
                sourcedirref="${project.source.path}"
                haltOnfailure="false">

<!-- Pass values to net.hhshoppers.hh.testng.EOTestSuite.java -->
<jvmarg value="-DDBType=${database.type}" />
<jvmarg value="-DJDBCUrl=${database.url}" />
<jvmarg value="-DJDBCDriver=${database.driver}" />
<jvmarg value="-DDBUserName=${database.userid}" />
<jvmarg value="-DDBPassword=${database.password}" />


            <!-- Make sure the tests run with enough memory -->
            <jvmarg value="-Xmx768m" />

<classpath refid="project.classpath"/>
<classpath>
<fileset dir="${build.product.dir}" includes="**/ *.jar" />
</classpath>
<xmlfileset dir="Testing/" includes="${unit.test.suite}"/>
</testng>
</target>


project.classpath is created using wopath:

        <wopath id="project.classpath">
       		<frameworks root="User"  eclipse="true" />
            <path refid="jars" />
	</wopath>

    	<path id="jars">
	    	<fileset dir="${JarsDir}" includes="*.jar" />
    	</path>	


You can run Selenium tests directly from Ant:

    <target name="run.suite">
        <selenese
            suite="${suite.path}"
            browser="${browser.name}"
            results="${results.path}"
            timeoutInSeconds="2500"
            startURL="http://${hostname}/";
        />
    </target>


-- Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects







_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • RE: Running tests from ant on a continuous integration server
      • From: "Brook, James" <email@hidden>
References: 
 >Running tests from ant on a continuous integration server (From: "Brook, James" <email@hidden>)

  • Prev by Date: SOLVED: Zombie sessions
  • Next by Date: Re: SOLVED: Zombie sessions
  • Previous by thread: Running tests from ant on a continuous integration server
  • Next by thread: RE: Running tests from ant on a continuous integration server
  • Index(es):
    • Date
    • Thread