Skip to main content

Posts

Showing posts with the label dataprovider

TestNG DataProvider–Phew!!!

It took me some time to get a hang of what the TestNG DataProvider could do…Once I got to know about how it functions believe me I created wonders with it   What is a TestNG DataProvider? There are loads of definitions on the web for it but if you are an average-but-wanting-to-learn software engineer then in simple words, a TestNG DataProvider is a Test Data Provider class…Simple! It is powerful enough to provide data according to the method which is initiating or rather calling it…   When/Why do I need a TestNG DataProvider? Of course, most of us would agree that we provide the test data through various forms like an xml, excel, csv etc…The reason I found this feature useful when I knew the input before hand and it varied based on the test case…For example, if I am testing buying of a product on a retail website…I want to test buying of a new product, buying of a used product, buying of multiple products…I have the test data in all the three cases but then the test data...