February 11, 2011

Create Reports Using TestNG



Creating Report.....It is easy with TestNG...it will create default reports....in HTML format.


The Default feature in TestNG is it will create reports automatically..you need not to write any code...

Just run the Script with TestNG...it will automatically create a report...

First Setup the TestNg
Please go through link if you dont know how to set up...

Setting up Selenium RC & TestNG using Eclipse


Observe the screen shot before running the test...


Before Running the Test


Run the script --Run as -->TestNG --see the below screen shot...Report is generated.










Screen Shot after running the Test

After Running the Test


NOTE: You need to download the testng-5.14.10.jar file................it should be in your referenced library..

Hope it will be helpful .......




7 comments:

  1. Hello Nagarjuna,

    How to check form validations in selenium, i am unable to find it, please give me one example like if a form contains username,password,email fields then how to check mandatory fileds & email validation.
    Thank you in advance.. please help me
    Prasanna

    ReplyDelete
  2. Hi Nagraju,

    I like your post and the way you have set this blog up wrt selenium is really cool...

    This surely makes it a candidate on my blog which has the best articles and posts across the web.

    Do mail me at aditya_kalra@ymail.com and let me know if it is fine i add this to my blog.

    My blog: http://go-gaga-over-testing.blogspot.com/

    Best Regards,
    Aditya Kalra

    ReplyDelete
  3. Hi naga I am impressed from your posts, your posts are really best on the web. THanks a lot
    ---vikasgarg.mgl@gmail.com

    ReplyDelete
  4. Hi nagaraju i am running the script but the test output folder is not getting generated can you tell me what will be the cause my id is y.p.thanvi@gmail.com
    waiting for ur reply

    ReplyDelete
  5. Hi Naga

    Apart from using testng reports, how do we generate reports in our own style? When I searched the documentation for testng, it says we have to override generateReport() method. But I am stuck on this part. How do we get the test method name and result? Can we add expected result and actual result to the report?

    You help would be appreciated.

    Thanks

    ReplyDelete