Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » runnint tests from ant script
runnint tests from ant script [message #59578] Tue, 21 March 2006 12:00 Go to next message
Eclipse User
Originally posted by: Joan.He.freescale.com

Hi,

I would like to get help from somebody who had experiences with running
test from ant script.

1. I am getting ResourceException, I don't know why the resource is
pointing to the following place? Am I doing anything wrong?
org.eclipse.core.internal.resources.ResourceException: Resource
/com.freescale.codetest.tests/cygwin/home/navscan/tests/com. freescale.codetest.tests/src/com/freescale/codetest/wizards/ newdatasource/tests/autogui/DataSourceWizard.testsuite
does not exist.

My test suite is at
'C:\cygwin\home\navscan\tests\com.freescale.codetest.tests\s rc\com\freescale\codetest\wizards\newdatasource\tests\autogu i\DataSourceWizard.testsuite'

My ant script:
<project name="TPTP Ant Tasks Test Script" default="test"
xmlns:tptp="antlib:org.eclipse.hyades.automation.client.adapters.ant ">

<!-- Define common properties for all tests -->
<property name="tptp.test.workspace" value="C:\cygwin\home\navscan\tests"
/>
<property name="tptp.test.project" value="com.freescale.codetest.tests" />
<property name="tptp.test.connection"
value="tptp:rac://localhost:10002/default" />
<property name="tptp.automation.eclipse" value="C:\eclipse_tptp4101" />
<property name="tptp.automation.quiet" value="false" />

<description>
This ant script tests the TPTP automation ant task client adapters
and also can be used to test the underlying execution of TPTP automatable
services via the TPTP automation server
</description>


<!-- Execute TPTP test suites -->
<target name="test" description="Executes TPTP tests using various
property combinations">

<!-- Execute a TPTP test suite specified by suite -->
<echo message="Executing a TPTP test suite specified by a test suite" />
<tptp:test
suite=" C:\cygwin\home\navscan\tests\com.freescale.codetest.tests\sr c\com\freescale\codetest\wizards\newdatasource\tests\autogui \DataSourceWizard.testsuite "
/>
</target>

</project>

2. What is -Xquickstart vmargs for? It appears in example.xml in
automatable service framwork plugin. I get error message from Java Virtual
Machine Launcher, says 'Could not create the Java virtual machine'. Any
idea why?

Thanks,

Joan
Re: runnint tests from ant script [message #60356 is a reply to message #59578] Mon, 27 March 2006 08:51 Go to previous messageGo to next message
Joe Toomey is currently offline Joe Toomey
Messages: 79
Registered: July 2009
Member
This is a multipart message in MIME format.
--=_alternative 004C1AA78525713E_=
Content-Type: text/plain; charset="US-ASCII"

Hi Joan,

1. I am getting ResourceException, I don't know why the resource is
pointing to the following place? Am I doing anything wrong?

<tptp:test
suite=" C:\cygwin\home\navscan\tests\com.freescale.codetest.tests\sr c\com\freescale\codetest\wizards\newdatasource\tests\autogui \DataSourceWizard.testsuite "/>

When passing a test suite into the tptp:test suite task, please specify
the path to the test suite relative to the specified workspace and project
(which are global variables in your ant script.) If I understand your
project structure corrcetly, try:

<tptp:test
suite=" src\com\freescale\codetest\wizards\newdatasource\tests\autog ui\DataSourceWizard.testsuite "/>

Note: If you're using a recent development driver of TPTP (March 17th or
later), you'll find support for ant filesets and filelists, and those
constructs accept fully qualified paths in order to allow the use of ant
wildcarding (for filesets) and to fit in properly with other ant tasks
(which may return file lists.) An example of this usage would be:

<!-- Execute test suites using default results name -->
<target name="test-execution">
<echo message="Executing test suite..." />
<tptp:execution resultsrefid="tptp.test.results">
<fileset dir="${project.dir}">
<include name="**/*.testsuite" />
</fileset>
</tptp:execution>
</target>

In this example, we will run all of the testsuites in the ${project.dir},
and will return the list of all execution histories created by those
executions in a filelist with the ID "tptp.test.results".

2. What is -Xquickstart vmargs for? It appears in example.xml in
automatable service framwork plugin. I get error message from Java Virtual
Machine Launcher, says 'Could not create the Java virtual machine'. Any
idea why?

-Xquickstart is a JVM argument that is specific to the IBM JVM. It speeds
up the loading of the application by spending less time in the JIT, and
since the eclipse instance that we are launching is not doing much beyond
invoking the test, it may make sense to specify this argument. If you're
not using the IBM JRE, as you mention, you'll get an error. There is no
harm in not specifying this argument.

Hope this helps,
--Joe



--=_alternative 004C1AA78525713E_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">Hi Joan,</font>
<br>
<br><font size=2><tt>1. I am getting ResourceException, I don't know why
the resource is pointing to the following place? Am I doing anything wrong?
</tt></font>
<br>
<br><font size=2><tt>&lt;tptp:test suite=&quot;C:\cygwin\home\navscan\tests\com.freescale.c odetest.tests\src\com\freescale\codetest\wizards\newdatasour ce\tests\autogui\DataSourceWizard.testsuite&quot;/&g t; <br>
</tt></font>
<br><font size=2><tt>When passing a test suite into the tptp:test suite
task, please specify the path to the test suite relative to the specified
workspace and project (which are global variables in your ant script.)
&nbsp;If I understand your project structure corrcetly, try:</tt></font>
<br>
<br><font size=2><tt>&lt;tptp:test suite=&quot;src\com\freescale\codetest\wizards\newdataso urce\tests\autogui\DataSourceWizard.testsuite&quot;/& ;gt; </tt></font>
<br>
<br><font size=2><tt>Note: &nbsp;If you're using a recent development driver
of TPTP (March 17th or later), you'll find support for ant filesets and
filelists, and those constructs accept fully qualified paths in order to
allow the use of ant wildcarding (for filesets) and to fit in properly
with other ant tasks (which may return file lists.) &nbsp;An example of
this usage would be:</tt></font>
<br>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &lt;!-- Execute
test suites using default results name --&gt;</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &lt;target name=&quot;test-execution&quot;&gt;</tt></font >
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &lt;echo message=&quot;Executing test suite...&quot;
/&gt;</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &lt;tptp:execution resultsrefid=&quot;tptp.test.results&quot;&gt;</tt ></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;fileset dir=&quot;${project.dir}&quot;&gt;</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &lt;include name=&quot;**/*.testsuite&quot; /&gt;</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;/fileset&gt;</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &lt;/tptp:execution&gt;</tt></font>
<br><font size=2><tt>&nbsp; &nbsp; &nbsp; &nbsp; &lt;/target&gt;<br>
</tt></font>
<br><font size=2><tt>In this example, we will run all of the testsuites
in the ${project.dir}, and will return the list of all execution histories
created by those executions in a filelist with the ID &quot;tptp.test.results&quot;.</tt></font>
<br><font size=2><tt><br>
2. What is -Xquickstart vmargs for? It appears in example.xml in automatable
service framwork plugin. I get error message from Java Virtual Machine
Launcher, says 'Could not create the Java virtual machine'. Any idea why?</tt></font>
<br>
<br><font size=2><tt>-Xquickstart is a JVM argument that is specific to
the IBM JVM. &nbsp;It speeds up the loading of the application by spending
less time in the JIT, and since the eclipse instance that we are launching
is not doing much beyond invoking the test, it may make sense to specify
this argument. &nbsp;If you're not using the IBM JRE, as you mention, you'll
get an error. &nbsp;There is no harm in not specifying this argument.</tt></font>
<br>
<br><font size=2><tt>Hope this helps,</tt></font>
<br><font size=2><tt>--Joe</tt></font>
<br>
<br>
<br>
--=_alternative 004C1AA78525713E_=--
Re: runnint tests from ant script [message #60402 is a reply to message #59578] Mon, 27 March 2006 09:58 Go to previous message
Scott E. Schneider is currently offline Scott E. Schneider
Messages: 8
Registered: July 2009
Junior Member
Okay, so, for part one of your question, currently the Ant integration
only supports project relative paths for the test suite identifiers (there
is an enhancement request open for absolute path support). Basically,
something like "/myTests/MyTestSuite.testsuite" instead of
" c:/eclipse/workspace/org.myproject.mytests/myTests/MyTestSui te.testsuite ".

Also, try to use forward-slashes in lieu of backward-slashes (I think this
is a good rule in general when dealing with Eclipse, resources and
multiple OS compatible support).

For part two of your question, please omit -Xquickstart, this is used for
the IBM JRE only. I had thought that VMs ignore any -X options that they
do not understand, perhaps not? This was just showing how one can specify
additional VM options for the automation server VM (not the test VM) -- so
you can add -Xmx512m for example to increase the heap size, etc.

Hope this helps, email me directly with any more questions or concerns,
-Scott
Previous Topic:How to profile a java class?
Next Topic:Heap memory in use
Goto Forum:
  


Current Time: Thu Apr 24 11:26:25 EDT 2014

Powered by FUDForum. Page generated in 0.04838 seconds