Skip to main content

Posts

Featured

Solution :ant build successful even if some testng tests failed

ant build successful even if some testng tests failed Some time you might have seen that even though your testNG test is failing but still ant shows it as build successful. If you want to make your build run as failed if any of TestNG tests fails, then you need to add following testNG failure property in your build.xml <target name="seleniumTestNG" >                 <testng outputdir="${testoutput}" classpathref="classpath.test" failureProperty="testFailed ">     </testng>   <fail if="testFailed" message="A test has failed, Please check the logs" />  </target> After adding the above lines in build.xml, run you scripts, now you will see if your test fails it will show build failed with message "A test has failed, Please check the logs"

Latest posts

How to pass class Object through Dataprovider TestNG

Reading CSV file using Java Code

Selenium WebDriver

Test Automation with VSTS

Testing using PERL

How to schedule task using Crontab- UNIX

Frequently used Unix commands

How to increase core size in HPUX/LINUX

6 Important Testing Areas in Web Portals