Re: Multiple <webtest> tags in one target

Josep García <[email protected]>
Newsgroups gmane.comp.web.canoo.webtest
Message-ID <CAF2hc=qeoAFH26KZhsP5+=cwiSpZ6s4F8jxZftjyAWoKiREDsA@mail.gmail.com>
Try:
    <target name="run-all-tests"
        depends="xpressWSTest,xpressWSProcessingTest"
        description="Call and executes all test cases (targets)"/>

  <target name="xpressWSTest">
   <webtest name="xpress WS Production Test">
     <invoke
       url="http://url.com"
       description="xpress WS Test Production" />

       <verifyXPath description="CID" text="CID-0000002184319"
XPath="/ref:ONIXMessage/ref:
>
> Product//ref:ProductIdentifier/ref:IDValue"/>
>    </webtest>

</target>
>
>    <webtest name="xpressWSProcessingTest">
>      <invoke
>        url="http://url.com"
>        description="xpress WS Test Processing" />
>
>        <verifyXPath description="CID" text="CID-0000002184319"
> XPath="/ref:ONIXMessage/ref:Product/ref:ProductIdentifier/ref:IDValue"/>
>    </webtest>
>
>  </target>
>
Avoid blank spaces in webtest name. You can add description attribute with
textual description.

Cheers,
Josep

2011/7/5 Eric Bunton <[email protected]>

> I currently have multiple webtest tags within one target/project while it
> runs all of the webtests I do not get the report for all of the tests.
> Looking at the output on the terminal I get a lot of exceptions thrown. Here
> is an example of my test file. I have cut out the actual url for privacy
> reasons. If anyone could help it would be greatly appreciated.
>
> <project name="xpress WS Test" basedir="." default="xpressWSTest">
>
>
>  <target name="xpressWSTest">
>    <webtest name="xpress WS Production Test">
>      <invoke
>        url="http://url.com"
>        description="xpress WS Test Production" />
>
>        <verifyXPath description="CID" text="CID-0000002184319"
> XPath="/ref:ONIXMessage/ref:Product//ref:ProductIdentifier/ref:IDValue"/>
>    </webtest>
>
>    <webtest name="xpressWSProcessingTest">
>      <invoke
>        url="http://url.com"
>        description="xpress WS Test Processing" />
>
>        <verifyXPath description="CID" text="CID-0000002184319"
> XPath="/ref:ONIXMessage/ref:Product/ref:ProductIdentifier/ref:IDValue"/>
>    </webtest>
>
>  </target>
> </project>_______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.