TestNG Tutorial

testng tutorials

TestNG (Next Generation) is a testing framework which, inspired by JUnit and NUnit, but introducing many new innovative functionality like dependency testing, grouping concept to make testing more powerful and easier to do. It is designed to cover all categories of tests: unit, functional, end-to-end, integration, etc…

1. TestNG Tutorials

References

  1. TestNG Official Website

About the Author

author image
mkyong
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter, or befriend him on Facebook or Google Plus. If you like my tutorials, consider make a donation to these charities.

Comments

Leave a Reply

avatar
newest oldest most voted
Tom
Guest
Tom

Thank you for this tutorial – quick and effective. This is exactly what I was looking for.

Anda
Guest
Anda

Thanks. This is very helpful.

Domang
Guest
Domang

I just want to test file read class with buffered reader. How can I do that?

Azeemuddin
Guest
Azeemuddin
Hi MKYong, Here is my scenario In My frame work i have “N” Number of test cases. i have one driver class which will controls all the test scripts. I need to loop through all these testcases until the last test case(Data driven Frame Work using POI). My condition is : in my driver script if i am clicking on run then it need to go to the loop and check for the first test case and need to navigate to the first test script and need to execute the first script. once the 1st script completed it need to… Read more »
Sanghamitra
Guest
Sanghamitra

How to proceed for API testing using TestNG ?

mohanapriya
Guest
mohanapriya

hai..this Tutorial very helpful for me..but i dn know how to do compatibility testing in testNG so pls help me..

Rafael
Guest
Rafael

That said: TestNG has so many bugs and few of them are getting fixed. I generally recommend to not use TestNG if it is not absolutely required.

mkyong
Guest
mkyong

What kind of bugs? I’m implemented in my projects, don’t find any major flaws.

saurabh shukla
Guest
saurabh shukla

Can you please explain the working of TestNG with Listeners & Reporters and XSLT Reports.

gowtham
Guest
gowtham

Hi mkyong, how to mock database with testng .. Am using struts2 framework .. Really got stuck .. Please do guide me ..

venkatesh
Guest
venkatesh

can u send the webdriver testcase for validation of registration page.(contains dropdown,editbox,radiobuttons,listbox,buttons.)

mktyagi
Guest
mktyagi

Hi yong,

what is the best api for mock testing with testNG?

Thanks,
Manoj

Venkata
Guest
Venkata

Thank you. This is very helpful!

Sumith
Guest
Sumith

I was using TestNG for running my Silk4J tests. I was able to run the individual tests, but while running as a suit i am facing some issues.

While running as a suit, the methods in the @BeforeMethod and @AfterMethod sections are not working… What might be the reason for this…

Asha
Guest
Asha

Can testNG provide the output of on an ANDROID EMulator connected to Eclipse?

zain
Guest
zain

Yes