VOOZH about

URL: https://rationaleemotions.com/tags/TestNG

⇱ Rationale Emotions


Rationale Emotions

šŸ‘ Krishnan Mahadevan
Krishnan Mahadevan

Posts about TestNG

20 April, 2020

Repeating a test invocation by time period in TestNG

Problem statement As a user, I would like to be able to repeat a test n times but for a particular time duration. The approach On a high…


19 April, 2020

Retrying configuration methods in TestNG

Problem statement Build a capability such that configuration methods can be retried if there's a failure in a previous attempt. Pre…


13 January, 2019

Reporting consolidated TestNG result for tests that use data providers

Problem statement: I use data provider for parameterized tests. I understand that the test method execute once for every instance in the…


23 November, 2018 Java,

Thread Affinity in TestNG

Most of us would have at some point or the other built a Selenium based TestNG test that kind of looks like below: When running this above…


27 September, 2018

Dynamic parameterization in TestNG

TestNG provides us users with two ways in you can achieve data driven tests. You make use of the annotation wherein you bind your method…


20 January, 2018

Automatically wire-in a parent Guice-module into your TestNG test

What is dependency injection ? Quoting WikiPedia, here’s the definition of dependency injection: In software engineering, dependency…


27 September, 2017

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…


25 September, 2017

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

Running setup only once per Test/Suite Without Using @BeforeSuite/@BeforeTest This is a common question that I am noticing asked by many…


26 December, 2016

Dears Listeners…stand in Q please

Dears Listeners…stand in Q please Yes, you read the title right.. but I was not hinting at you the readers.. but I was referring to the…


18 November, 2016 , WebDriver

Testcase specific logs for a Selenium project

Testcase specific logs for a Selenium project Problem statement: You would like to have a separate log file for every testcase so that if…


17 August, 2016

How to run test methods in parallel but test classes in sequence

How to run test methods in parallel but test classes in sequence This question came up recently on the TestNG forum. Since when solving this…


06 June, 2016

Working with @TestInstance annotation

Working with @TestInstance annotation Sometimes one would need to gain access to the test class instance to which an annotated test method…


29 March, 2016

Parallel execution of multiple TestNG suites

Parallel execution of multiple TestNG suites If we would like to run more than one TestNG suite in parallel, here’s how to go about doing it…


17 February, 2016

Running tests which don’t have TestNG annotations

Running tests which don’t have TestNG annotations This question came up very recently on the TestNG forum and I found it to be quite…


24 August, 2015

What are data providers in TestNG

What are data providers in TestNG Data providers is a very common need when you are building tests that are data driven in nature. TestNG…


13 February, 2014

Sharing data across Tests in different TestClasses

Sharing data across Tests in different TestClasses So today I saw another interesting question posted on the TestNG-Users google forum. How…


06 February, 2014

Sharing parameters among different TestNG suites

Sharing parameters among different TestNG suites Off late I have been seeing a couple of queries every now and then which asks How do I…


21 August, 2013

BeanShell and TestNG

BeanShell and TestNG Very recently someone asked a question if I could have the luxury of referring to VM arguments in the TestNG Suite XML…


31 July, 2013 , WebDriver

Parallel WebDriver executions using TestNG

Parallel WebDriver executions using TestNG In this post, we will see how does one make use of TestNG to kick off parallel UI tests using…


31 July, 2013

Pretty Printing with TestNG

We all at some point or the other have had to deal with tests that are data driven. One of the frequently asked question that I have seen on…


10 February, 2013

Using the listener factory in TestNG

Using the listener factory in TestNG Sometime back I stumbled into a in TestNG. I have tried hunting for information about it, but so far…


06 July, 2012

Working with Threads in TestNG

Working with Threads in TestNG Sometime back, me and my friend were trying to play around with Threads in annotated TestNG methods and we…


27 January, 2012

Listen to what I have to say about ā€œTestNGā€ Listeners

ā€œListenā€ to what I have to say about ā€œTestNGā€ Listeners What are these listeners ? What does TestNG stand to offer to us with them ? This…