You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Antonio Zippo <re...@yahoo.it> on 2006/03/02 16:12:18 UTC

How to fail a test?

Hi all,
i'm using jmeter from ant with ant-jmeter.jar task
i created from the gui a testplan based on an http request.
I need the test fails when the Response Assertion fails (for example on a response code 404)
I tried using the forceBuildFailure attribute in the ant task, but without success...

It seems that the TestPlan does not fails even if the response assertions are not verified...
The log result shows this:
  <assertionResult>
    <failure>true</failure>
    <error>false</error>
    <failureMessage>Test failed, code expected to contain /200/</failureMessage>
  </assertionResult>

Could you help me?

thanks in advance, 
    Revenge
		
---------------------------------
Yahoo! Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3

Re: How to fail a test?

Posted by Antonio Zippo <re...@yahoo.it>.
The user manual says:

"The HTML Assertion allows the user to check the HTML syntax of the response data using JTidy"

so it checks only if the result is a correct HTML (or XML, or XHTML).

i tried it, but the problem is the same.... :-(

I think that i must set something to say jmeter to consider failed the test when the assert fails.....



Raffaele Viola <ra...@gmail.com> ha scritto:  Ciao,

Have you try to use HTML assertion ?

Let me know ;-)

-Raffo


		
---------------------------------
Yahoo! Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3

Re: How to fail a test?

Posted by Raffaele Viola <ra...@gmail.com>.
Ciao,

Have you try to use HTML assertion ?

Let me know ;-)

-Raffo


2006/3/2, Antonio Zippo <re...@yahoo.it>:
>
> Hi all,
> i'm using jmeter from ant with ant-jmeter.jar task
> i created from the gui a testplan based on an http request.
> I need the test fails when the Response Assertion fails (for example on a
> response code 404)
> I tried using the forceBuildFailure attribute in the ant task, but without
> success...
>
> It seems that the TestPlan does not fails even if the response assertions
> are not verified...
> The log result shows this:
>   <assertionResult>
>     <failure>true</failure>
>     <error>false</error>
>     <failureMessage>Test failed, code expected to contain
> /200/</failureMessage>
>   </assertionResult>
>
> Could you help me?
>
> thanks in advance,
>     Revenge
>
> ---------------------------------
> Yahoo! Mail: gratis 1GB per i messaggi, antispam, antivirus, POP3
>