//
archives

Confusions Personified

Confusions Personified has written 40 posts for Misadventures of a castaway coder!

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 class with parallel=”methods” we would be expecting that TestNG would run the method a() and c() on the same thread. But TestNG doesn’t do that. It guarantees that … Continue reading

Executing multiple Cucumber scenarios in parallel

To the best of my knowledge, so far there’s no support within cucumber-jvm so as to support concurrent executions of scenarios that are part of a particular feature file. I have attempted at taking a jab at this problem and am glad to announce a Proof Of Concept in that direction. I have named it … Continue reading

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 injection is a technique whereby one object supplies the dependencies of another object. A dependency is an object that can be used (a service). An injection is the passing of a dependency to a dependent object (a client) … Continue reading

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

Routing tests directly to Selenium Nodes

As and when the size of a Grid farm starts increasing, you will start having to worry about a lot of things. Since the Hub is the single point of interaction for a test with an actual node on which all the browser interactions are carried out, all tests end up bumping up the network … Continue reading

Just-Ask.. An On-Demand Docker Grid

A static Grid (i.e., a hub and a fixed number of nodes) is a good start for setting up a remote execution infrastructure. But once the usage of the hub starts going up, problems start creeping up. Nodes go stale and start causing false failures for the tests and require constant maintenance (restart). Some of … Continue reading

Talk to the Grid

Today I released talk2Grid which is a simple java library that lets you do the following : Find out to which node was a test routed to ? Provide access to the Grid Hub configuration. Provide access to the Grid node configuration to which the hub routed a test to. You can start using it … Continue reading

Simple Se – Page Objects – My first OSS contribution

Its been quite a while since I have been doing bits and pieces of deliveries here and there, contributing to TestNG both via pull requests and also on the mailer list and the same with Selenium as well (although I must admit I dont have too many contributions on Selenium), I have always wanted to … Continue reading