Author Archives: hedleyproctor

Automating Selenium testing with TestNG, Ant and CruiseControl

If you are using Selenium for web testing, most likely you’ll want to make your tests as automated as possible so that they can be run automatically on a regular basis. You can do this by using a few additional … Continue reading

Posted in Ant, Selenium, Testing | Tagged , | 2 Comments

Using jQuery in bookmarklets

Writing a javascript bookmarklet is a great way to add functionality to a web page that you don’t control. But if you use jQuery, wouldn’t it be neat to be able to use that in your bookmarklet? You can do … Continue reading

Posted in Javascript, jQuery | Tagged , | 2 Comments

Multiple test configurations with TestNG

I use TestNG for automated testing as it has a number of features that JUnit doesn’t have. One of its strengths is the power and flexibility of configuring tests and supplying parameters to them, for which there are two methods: … Continue reading

Posted in Groovy, Testing | Tagged , | Leave a comment

Cool Groovy features 6 – XML parsing

Groovy offers a number of features to make XML processing easier: Building XML using a concise syntax and the MarkupBuilder class. XMLSlurper – allows you to read XML and use GPath, similar to XPath, to query the document. XMLParser – … Continue reading

Posted in Groovy | Tagged | Leave a comment

Against Helper classes

An interesting blog post: http://www.carlopescio.com/2011/04/your-coding-conventions-are-hurting-you.html For me, the most important point is that when a class is starting to get too large, you shouldn’t just cut and paste a load of methods to a similarly named helper class. Rather, you … Continue reading

Posted in Architecture and Design | Tagged , | Leave a comment

Tutorial: Writing XPath selectors for Selenium tests

Selenium is the most commonly used web testing framework. It allows you to write tests in Java that can perform standard “web” actions such as filling in forms, clicking buttons etc. Usually, a test will take the following form: Open … Continue reading

Posted in Selenium, Testing | Tagged , | 53 Comments

Cool Groovy features 5 – integration with Ant

The Ant build tool provides a number of really useful features, but when coding in Java it isn’t particularly easy to invoke Ant from your code. Groovy includes Ant and an AntBuilder class that allows you to access it, which … Continue reading

Posted in Groovy | Tagged | Leave a comment

NoSQL databases, scaling and Project Voldemort

At the moment there is a lot of discussion of NoSQL databases. Rather than referring to a single thing, this term is more of a catch-all that refers to a number of different non-relational database designs. In fact, it is … Continue reading

Posted in Databases and SQL | Tagged | Leave a comment

Cool Groovy features 4 – Mixins

A mixin is a way of inheriting methods from a class without the problems associated with multiple inheritance. Groovy supports both compile time and runtime mixins. Compile time mixins Supported with the @Mixin annotation. First define the class that will … Continue reading

Posted in Groovy | Tagged | Leave a comment

Closures in Java?

There has been discussion about including closures in Java for a few years now. They are already in languages like Groovy, Ruby and Scala, so the lack of Java closures makes Java look a bit tired. However, I didn’t realize … Continue reading

Posted in Java | Tagged | Leave a comment