Archive for

Building Dynamic TestNG Suites

We have all at some point wished that we had a way wherein we could dynamically build the TestNG suite xml file based upon some parameters and still make use of built in test execution mechanisms such as maven surefire plugin to run our tests. Its very easy to build these sort of customizations if … Continue reading

Dynamic parameterization in TestNG

TestNG provides us users with two  ways in you can achieve data driven tests. You make use of the @DataProvider annotation wherein you bind your @Test method with a data source. You make use of the @Parameters annotation and have your @Test method read values from a suite xml file. There are enough blogs and documentation pages that … Continue reading

Running setup only once per Test/Suite Without Using @BeforeSuite/@BeforeTest

This is a common question that I am noticing asked by many users in the TestNG google forums and also on StackOverFlow. So instead of constantly repeating myself in all these places, I thought I should just blog it as a solution for others to refer to it. Lets say you have a scenario wherein … Continue reading