This is going to be a rather complex post, that will show how to easily check for values of similar UI elements. By similar i mean elements that share some kind of properties: whether they have the same CSS selector, or are part of the same group of elements. Some examples will be shown below. Performing the testing part will imply the use of @FindBy (of Selenium WebDriver) and List (of Java). Read on to get an idea of where this approach can be used, how @FindBy is ideal for such a task, what the basics of working with List are, and what an actual test looks like. Continue reading @FindBy, Lists and using them to check for similar UI elements
A considerable amount of tests will need some test data to be generated previous to them running. Some people prefer to put all the data creation for all the tests in a class into the @BeforeClass method, some others prefer to keep the prerequisite data creation inside the tests themselves. Continue reading Better Test Code Principles: #2 Don’t generate ALL your test data in @BeforeClass
When starting to learn Java, one of the first things you are taught is that a class consists of several things, among which are the ‘methods’. A method is nothing more than grouping of several code lines. Since tests are code, the same principle applies to writing your Java based tests. Especially if you are dealing with duplicate code (code you keep copy/pasting all across your test project).
So what would be the reasons for not wanting to duplicate your code, but instead grouping it into methods: Continue reading Better Test Code Principles: #1 Don’t copy/paste the code. Reuse it.
This is going to be a follow-up post in regards to the approach i showed at my SeleniumConf talk, on doing Selenium tests by using an Object Oriented approach.
I will have a series of such posts, to show more examples and to make it easier to understand how to use it. All the code presented here will be available in GitHub under this location: https://github.com/iamalittletester/learning-project. Continue reading Selenium tests, the Object Oriented way – example 1 (with code)
Here’s a new and (possibly) cool feature regarding the blog: there are now code examples to be checked out and tried that you can download from Github.
The code location is: https://github.com/iamalittletester/learning-project.
Here are some details and how to run the test project: Continue reading GitHub project available with code examples
Yey, the program for the 2017 edition of the Nordic Testing Days conference has been published, and i am glad to be among the people speaking. More specifically, i will be running a two-hour hands-on, coding workshop on Selenium tests, the Object Oriented way. It will be a very practical workshop, where one can learn how to think in an OO fashion when it comes to testing complex modules or modules that appear in several areas of the page to be tested.
Check out the full program of the conference here: http://nordictestingdays.eu/schedule and don’t forget to get your tickets! It will be great.
I am back from the SeleniumConf UK 2016 event which took place in London, and i have to say, it was a fantastic experience. I have seen some really great talks, got plenty of takeaways, and as an added bonus, as a speaker, i managed to get a sneak peak ‘backstage’.
All the talks are freely available, which is a major plus for this conference, so have a look Continue reading Lessons learned at SeleniumConf 2016