Generating Test Result Report using Ant from Java eclipse

Always Reporting is the most important thing in testing, here described is the steps to configure and generate the test result from java eclipse using Ant.
this post is for users who have already familiar with java and eclipse. There is another post you can find in the name of "Selenium RC using Java with eclipse" for the beginners.
Generating the ANT build:
Right click on the project and select Export --> Ant Buildfiles.-->Next-->Select the project-->Finish.
Configuring jar:
Select Windows menu-->Preference -->Global Entries -->Add External JARs-->Select the folder where the eclipse is installed. eclipse -->Plugin -->Currently its located in "org.junit_4.8.1.v4_8_1_v20100427-1100"-->"junit.jar"-->OK.
Run the Ant Build:
Create a folder "junit" in side the project folder. Right click on the AntBuildfile-->RunAs -->AntBuild 
Return to java project and run as junit test. End of test run you will find the test result in a html file named as index.html it will be stored inside the junit folder.

You will get the report as below

26 comments:

  1. i am going to your process but when i run ant Build it is showing message that build failed.

    ReplyDelete
  2. Hi Vijay Prasath

    I did follow your instruction below but when execute my result has not information in report file.

    Seems it not count my testcase. In Summary part. very columns has value equal 0
    Did you see this problem?

    ReplyDelete
  3. Its not working for me too.. its giving Build Failed error..

    ReplyDelete
  4. i have something unusual. Everything is going fine at my end but when i open index.html its showing zero test run, although i was hoping to see 2 test run with different detail.

    Please let me know where i doing wrong and if you need any more detail from my side.
    Any help would be appreciated.

    ReplyDelete
  5. Am using TestNG.. can you please guide me on that.. I don't know to configure the JARS..

    ReplyDelete
  6. Before running in cmd. install JDK 7.

    ReplyDelete
  7. Hi ,
    my ant buaild got success but i am getting so many extaernal datas in my xml.not getting as above table format. please suggest.



    - - - junit.framework.AssertionFailedError at com.bt.TestJunit2.testAdd1(TestJunit2.java:17) -

    -

    ReplyDelete
  8. Thanks for a great information in your blog.I have read all the post of your blog.Great work on Selenium

    ReplyDelete
  9. Selenium Testing Real Time Hands on Training in Chennai…

    Don’t always Depend on Training Institute alone.Please aware of Best Trainers too..

    http://thecreatingexperts.com/selenium-training-in-chennai/

    If You need a Best Trainer in Selenium Testing??? Then be ready for a DEMO From the Trainer MR.Karthick
    CONTACT:8122241286

    Both Classroom/Online Training is Available!!!!!!

    ReplyDelete
  10. Looking for best training in SELENIUM, take a glance at http://thecreatingexperts.com/selenium-training-in-chennai/

    ReplyDelete
  11. I was looking for Selenium and Appium training in Chennai and got a link,it was the CREATING EXPERTS awesome training with real-time scenarios,got a good exposure to learn things best.If you are looking for one click the link below and contact 8122241286.

    http://thecreatingexperts.com/appium-training-in-chennai/
    http://thecreatingexperts.com/selenium-training-in-chennai/

    ReplyDelete
  12. Few months back i was searching for SELENIUM training, and i attended demo session with some of the trainers in CHENNAI, but did not get a clear picture of whom to get trained with?

    Later i came across THE CREATING EXPERTS.The demo class was up-to the mark with satisfying my needs and requirements and here i got placed in a concern.

    Thanks to their in-depth hands on training with real time scenarios.For training inquiries

    http://thecreatingexperts.com/selenium-training-in-chennai/

    contact info - Mr.Karthick 8122241286

    ReplyDelete
  13. very informative blog with chapters covering SELENIUM, take a look at the link provided below to get hands on training with real time scenarios

    http://thecreatingexperts.com/selenium-training-in-chennai/

    contact info - 8122241286

    ReplyDelete
  14. Thanks for sharing great information in your blog.

    Selenium training institute which provides Real Time Hands on Training…THE CREATING EXPERTS

    http://thecreatingexperts.com/selenium-training-in-chennai/


    contact-8122241286

    ReplyDelete
  15. nice blog...The leading training concern THE CREATING EXPERTS are providing SELENIUM training and here is the link

    http://thecreatingexperts.com/selenium-training-in-chennai/

    contact 8122241286

    ReplyDelete
  16. Thanks for sharing this blog.Creating Experts provides Best training in selenium

    http://thecreatingexperts.com/selenium-training-in-chennai/

    contact 8122241286

    ReplyDelete
  17. I was looking for Selenium and Appium training in Chennai and got a link,it was the CREATING EXPERTS.

    If you are looking for one click the link below and contact 8122241286.

    http://thecreatingexperts.com/appium-training-in-chennai/
    http://thecreatingexperts.com/selenium-training-in-chennai/

    ReplyDelete
  18. THE CREATING EXPERTS is one of the leading training provider in SELENIUM they provide hands on training with real time scenario

    http://thecreatingexperts.com/selenium-training-in-chennai/

    contact +91-08122241286

    ReplyDelete
  19. The Creating Experts provides training in SELENIUM

    http://thecreatingexperts.com/selenium-training-in-chennai/

    contact +91-08122241286

    ReplyDelete
  20. SELENIUM Training in Chennai is provided by

    THE CREATING EXPERTS they provide hands on training with real time scenarios

    http://thecreatingexperts.com/selenium-training-in-chennai/

    contact 8122241286 for more info

    ReplyDelete
  21. Nice blog...

    Selenium training institute which provides Real Time Hands on Training…THE CREATING EXPERTS

    http://thecreatingexperts.com/selenium-training-in-chennai/


    contact-8122241286

    ReplyDelete
  22. SELENIUM training in Chennai

    http://thecreatingexperts.com/selenium-training-in-chennai/

    SELENIUM training in Chennai by THE CREATING EXPERTS ,

    They provide you hands on training with real time scenarios

    contact 8122241286

    ReplyDelete
  23. Hi, all nice blog for a long time i was searching for a real time trainer and landed with my trainer in selenium
    SELENIUM training is provided by THE CREATING EXPERTS in CHENNAI

    http://thecreatingexperts.com/selenium-training-in-chennai/

    Contact 8122241286 for more info

    ReplyDelete
  24. Nice blog...

    Selenium training institute which provides Real Time Hands on Training…THE CREATING EXPERTS

    http://thecreatingexperts.com/selenium-training-in-chennai/


    contact-8122241286

    ReplyDelete
  25. The Creating Experts is the leading trainer in selenium so, if you are looking for one here is the link

    http://thecreatingexperts.com/selenium-in-chennai/

    contact +91-08122241286

    ReplyDelete
  26. NICE BLOG...Selenium training in CHENNAI provided by THE CREATING EXPERTS

    http://thecreatingexperts.com/selenium-training-in-chennai/

    CONTACT 8122241286.

    ReplyDelete