If in your tests you need to generate date values representing, let’s say, today’s date, or yesterday’s, or one year from today, or the last day of the current month, this post will help you do just that. Using Java’s LocalDate, you will be able to generate the date (meaning year, month, day) your tests… Read More
Read my new article on tips for clean code
Read the article i wrote for the TestProject blog on general tips for why and how we can achieve clean code in our automation: https://blog.testproject.io/2020/04/22/clean-code-in-tests-what-why-and-how/
Why using branches is good for your tests
Branches are beautiful, on trees. Branches in the code are not what many testers like to work with. The whole branching process appears to be very cumbersome: creating the branch, keeping it up to date with the main branch, deleting it once the work is done, these all seem to take a lot of time… Read More
Useful type conversions
Some of our test data needs to be transformed from its original type to something else. For example, we might need to convert a String to a numeric value, or vice versa. Or we might need to generate date values in a certain format. Examples for all of these can be found below.
Better Test Code Principles: #6 Don’t create a new variable for a value you will only use once
If you are an automation tester, you will need to write a lot of code to cover the required test scenarios and test cases. Your code base will grow and grow, but some of the code will not be really needed and thorough code reviews should be done, to avoid unnecessary code. Such unneeded code… Read More
Create a Proof of Concept before going full throttle with your automation
Starting an automation effort for a project that has no automation whatsoever is always a fun and challenging experience. But you need to clearly understand what the goal and specifics of your project are, to achieve success in the automation effort. Before jumping into writing the first automated tests, you need to gather some information,… Read More
Refactoring is allowed
Writing automated tests means writing code. It means going through processes that regular code goes through. Like code review, and refactoring. I see a lot of hesitation when it comes to refactoring one’s own code, possibly because we feel that if our code needs correction, we did a crappy job writing it the first time.… Read More
The tester and the code review
Code review, although very important and frequent in the software development world, is not as frequent in the automation testing world. Normally, it would be part of the whole process: someone writes code, reviews it, makes it available to the rest of the team, they review it, and if changes are needed they will be… Read More
Test design: write tests with proper console output to easily identify failure reasons
When automated test are running, they are either running on your own machine (when you write them or run them to check something), or in your CI. When you run the test on your machine, if there are failures, it might be easy for you to look at what is running (if you have some… Read More
Using Maven checkstyle in your project to help adhere to coding standards
Coding standards are something both automating testers and developers should adhere to. Pretty obvious right? Maybe not that obvious might be some of the rules you should follow when writing the code for your tests. Checkstyle is here to help in standardizing your code, so that you can get an early feedback regarding code improvements (earlier than… Read More