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"




Comments

  1. These musings just knocked my socks off. I am happy you have posted this.
    data science course malaysia

    ReplyDelete
  2. I think this is the minimum value to earn more than just commit
    hrdf training course

    ReplyDelete
  3. It was worthy experience to get some answers concerning hazardous complement. Valuable for everyone looking with respect to the issue.

    data science course in noida

    ReplyDelete
  4. Plumbing & HVAC Services San Diego
    Air Star Heating guarantees reliability and quality for all equipment and services.
    Air Star Heating is specializing in providing top-quality heating, ventilating, air conditioning, and plumbing services to our customers and clients.
    Our company is leading the market right now. By using our seamless and huge array of services. Our customers can now have the privilege of taking benefit from our services very easily and swiftly. To cope up with the desires and needs of our clients we have built an excellent reputation. We are already having a huge list of satisfied customers that seem to be very pleased with our services.

    Plumbing & HVAC Services in San Diego. Call now (858) 900-9977 ✓Licensed & Insured ✓Certified Experts ✓Same Day Appointment ✓Original Parts Only ✓Warranty On Every Job.
    Visit:- https://airstarheating.com

    ReplyDelete
  5. I have been searching to find a comfort or effective procedure to complete this process and I think this is the most suitable way to do it effectively.
    cyber security course in malaysia

    ReplyDelete
  6. Winstar Social Casino at the Hard Rock Hotel & Casino - Jackson
    Enjoy a luxurious stay at 밀양 출장마사지 the Hard Rock Hotel & Casino in 보령 출장안마 Jackson, MS. We have restaurants, a bar/lounge, 파주 출장안마 and 서귀포 출장샵 an 바카라 게임 사이트 outdoor pool.

    ReplyDelete

Post a Comment

Popular Posts