Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Test and Performance Tools Platform (TPTP) » Recognizing automated GUI test results in Ant
Recognizing automated GUI test results in Ant [message #106407] Wed, 25 July 2007 03:59 Go to next message
Martin Vlk is currently offline Martin Vlk
Messages: 55
Registered: July 2009
Member
Hi All,
coud someone please point me to right direction as of how to recognize a
TPTP GUI test execution result and fail the Ant build accordingly.

In my Ant script I can execute the test easily like this:

<tptp:test
workspace="D:\workspaces\tptp-test"
project="TestContainer"
suite="test-resources/MyTestSuite.testsuite"
synchronicity="synchronous""/>

But even if I get a verdict of failed or inconclusive as opposed to
passed the Ant build finishes successfully. I would need to fail the
build in cate the gui test fails or is inconclusive.

Cheers
Martin
Re: Recognizing automated GUI test results in Ant [message #106422 is a reply to message #106407] Wed, 25 July 2007 04:48 Go to previous messageGo to next message
Martin Vlk is currently offline Martin Vlk
Messages: 55
Registered: July 2009
Member
Just found the solution in the documentation. Sorry. :)

m.

Martin Vlk wrote:
> Hi All,
> coud someone please point me to right direction as of how to recognize a
> TPTP GUI test execution result and fail the Ant build accordingly.
>
> In my Ant script I can execute the test easily like this:
>
> <tptp:test
> workspace="D:\workspaces\tptp-test"
> project="TestContainer"
> suite="test-resources/MyTestSuite.testsuite"
> synchronicity="synchronous""/>
>
> But even if I get a verdict of failed or inconclusive as opposed to
> passed the Ant build finishes successfully. I would need to fail the
> build in cate the gui test fails or is inconclusive.
>
> Cheers
> Martin
Re: Recognizing automated GUI test results in Ant [message #106478 is a reply to message #106422] Wed, 25 July 2007 08:54 Go to previous messageGo to next message
mike is currently offline mike
Messages: 80
Registered: July 2009
Member
Details man...details!!! Please :)
Re: Recognizing automated GUI test results in Ant [message #106501 is a reply to message #106478] Wed, 25 July 2007 09:41 Go to previous messageGo to next message
Joe Toomey is currently offline Joe Toomey
Messages: 79
Registered: July 2009
Member
mike shipkowski wrote:
> Details man...details!!! Please :)
>


I assume Martin found his answer in the following help topic: Testing
Applications -> Testing Applications -> Launching tests from scripts and
applications -> Using the TPTP automatable services

If you pass the resultsrefid parameter to the test execution service, it
will create an ant filelist when the test run is complete, and will
populate that filelist with the paths to each of the .execution files
created as a result of the test run. You can subsequently pass that
filelist into the interrogation service to get the overall verdict of
all tests run by that test execution service invocation. You can pass
multiple filelists to the interrogation service if you executed multiple
test execution service invocations. If you want to branch your ant
build logic based on that overall verdict, you can use an ant condition.
I'll paste the example from the help below.

Note that you can also pass this results filelist into the reporting
service to generate BIRT reports on the results of your test run.

There some nice improvements in this area happening right now in the
4.4.1 development stream -- stay tuned, and thanks for your interest,
--Joe

<project name="TPTP Automatable Services Tutorial"
default="main"
xmlns:tptp="antlib:org.eclipse.hyades.automation.client.adapters.ant ">

<!-- Define common properties for all automatable services -->
<property name="tptp.test.workspace"
value="C:\eclipsecon\eclipse\workspace"/>
<property name="tptp.test.project" value="TPTPJUnitTests" />
<property name="tptp.test.connection"
value="tptp:rac://localhost:10002/default"/>
<property name="tptp.automation.eclipse"
value="C:\eclipseconwb_birt\eclipse" />

<!-- Define script-local properties, that vary by installation -->
<property name="project.dir"
value="${tptp.test.workspace}\${tptp.test.project}"/>

<target name="main" depends="test-execution, test-results-interrogation"/>

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

<!-- Interrogate test suite results for verdict -->
<target name="test-results-interrogation">
<echo message="Interrogating test suite results..." />
<condition property="tptp.test.success">
<tptp:interrogation verdictproperty="tptp.test.verdict">
<filelist refid="tptp.test.results"/>
</tptp:interrogation>
</condition>
<echo message="The overall test result verdict is:
'${tptp.test.verdict}'" />
</target>

</project>
Re: Recognizing automated GUI test results in Ant [message #106582 is a reply to message #106501] Thu, 26 July 2007 03:46 Go to previous message
Martin Vlk is currently offline Martin Vlk
Messages: 55
Registered: July 2009
Member
Joe Toomey wrote:
> mike shipkowski wrote:
>> Details man...details!!! Please :)
>>
>
>
> I assume Martin found his answer in the following help topic: Testing
> Applications -> Testing Applications -> Launching tests from scripts and
> applications -> Using the TPTP automatable services

Exactly. Thanks for the exhaustive reply on my behalf.

Martin
Previous Topic:Monitoring with static parser
Next Topic:TPTP fro Eclipse Applications with a View
Goto Forum:
  


Current Time: Thu Jul 31 03:32:32 EDT 2014

Powered by FUDForum. Page generated in 0.01802 seconds