Hi.
You can use plain ant-junit task but make sure you have
- gwt-user.jar
- gwt-dev.jar (or platform-dependent, e.g. jargwt-dev-linux.jar)
- junit.jar
In classpath.
And you have to have BOTH SOURCES of your application and TEST SOURCES (I
mean .java files) in the classpath.
Sources are required because GWT compiler will be launched over the
application sources, not class-files.
Here is a sample PART of build.xml:
<target name="run.gwt.tests" depends="compile.gwt.tests">
<junit printsummary="yes" haltonfailure="no" fork="yes">
<sysproperty key="basedir" value="${basedir}"/>
<classpath>
<pathelement location="${temp.gwt.test.classes}"/>
<pathelement location="${temp.classes}"/>
<pathelement location="${module.gwt.src}"/>
<pathelement location="${module.gwt.test.src}"/>
<pathelement location="${gwt.home}"/>
<pathelement location="${gwt.home}/${gwt.dev.lib}"/>
<pathelement path="${module.build.lib}/gwt-user.jar"/>
<pathelement path="${java.class.path}"/>
<!-- junit lib should be in test.lib directory -->
<fileset dir="${test.lib}" includes="*.jar"/>
<pathelement path="${module.build.lib}/servlet-api.jar"/>
</classpath>
<formatter type="xml"/>
<batchtest fork="yes" todir="${reports.tests.xml}">
<fileset dir="${module.gwt.test.src}">
<include name="**/*Test.java"/>
</fileset>
</batchtest>
</junit>
</target>
Here is only a PART of build.xml file, this part will launch tests. If
you're familiar with ANT define missing parts will be not a problem.
--
Kind regards,
Ignat Alexeyenko.
On Sat, Feb 13, 2010 at 2:44 AM, Toddpi314 <[email protected]> wrote:
> Will someone please advice on a Ant JUnit task which will allow me to
> run GWTTestCases against HTMLUnit and Selenium (RunStyle)?
>
> This is vital for our continuous integration architecture.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-web-toolkit%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.