Blog

Articles in category Selenium

I T.A.K.E. Unconference 2018

2018-05-20 · BDD Presentation Selenium · Thomas Sundberg

In june 2018 I will return to I T.A.K.E. Unconference in Bucharest, Romania. I run two sessions there:

These two sessions combine something I think is very important. They combine clean and understandable code with discovering what to implement. Understanding what to do is often more valuable than to know how to implement something. Implementing the wrong solution may even be harmful and is just as much waste as implementing something wrong.

Read more →

Testing stage 2018

2018-03-26 · Cucumber Executable specification Presentation Selenium · Thomas Sundberg

In April I will be talking at Testing stage in Kiev, Ukraine

I have two sessions:

  • Test automation - the supporting architecture
  • Why is good design important for test automation?

They are connected in the sense that they are both about how to implement the support code you need for your test automation initiative. As a developer, I know that how you implement code is really important. It is ultimately a matter of maintainability. And maintainability is probably the most important property a piece of code can have after being correct. Code that can't be maintained will create problems for you during the entire lifetime of your product.

Read more →

Test automation and Selenium: 4 rules for keeping your tests simple

2017-09-28 · Java Public speaking Selenium Technical debt Test automation · Thomas Sundberg

To support ever shorter release cycles you need to automate testing, and to do that, you need to use a program that can verify your desired behavior. One option is to use tools that can record and replay a scenario, but those are a nightmare to maintain, and you'll probably end up writing the code needed for automating the tests yourself.

For automating the testing of a web application, Selenium is a better way. It takes some programming skills, however, and you must take care to ensure that your tests are easy to understand and maintainable.

Writing maintainable, easy to understand tests might seem hard, but not if you follow these four, simple rules of design.

Read more →

Separation of concern when using Selenium

2016-01-14 · Java Selenium Test automation · Thomas Sundberg

A lot of people want to automate testing of their web applications. This is definitely a good thing. But it happens that they focus more on the tooling than the testing.

Read more →

Selenium WebDriver - the simplest possible start?

2012-10-29 · Java Maven Selenium Test automation · Thomas Sundberg

Getting started with Selenium WebDriver may be an issue. You must write some code and get the code running. I have created what I think is the smallest possible solution that could work. It consists of two files, a project definition and the actual test.

You will need to have Java and Maven installed. I will not tell you how this should be done, it depends on your environment and operating system.

Read more →

Performing an action when a test fails

2012-07-08 · Java Selenium TDD Test automation · Thomas Sundberg

JUnit supports annotations so a method can be executed first in a test class or before each test method is executed. It also has annotations that supports methods to be executed after each test method or after the test class. This is very good if you need a common setup and a common tear down.

The after methods don't give you access to the test result. You cannot know if a test method failed or not. This may pose a problem if you have a need to perform some specific actions after a failed test. A solution could be to implement an onError() method. But JUnit doesn't support it.

A solution is to employ a @Rule annotation.

Read more →

Testing a web application with Selenium 2

2011-10-18 · Automation Cucumber Maven Selenium Software development Test automation · Thomas Sundberg

Selenium a great tool for testing web applications. The current version, Selenium 2, is a merge between Selenium and WebDriver. I will walk you through an example where we test a web site using Selenium in a few different ways. This is the same example as I demonstrated at Scandev on tour in Stockholm 18 October 2011.

Read more →

Parameterized JUnits tests

2010-07-11 · JUnit Java Selenium · Thomas Sundberg

We want to run the same test more than once and only vary the parameters. The solution is to use JUnit and run our tests with the Parameterized JUnit runner.

Read more →

Integration test a web application with Selenium

2009-04-17 · Java Selenium Test automation · Thomas Sundberg

We want to build a web application and we want to test it automatically.

Read more →