Browsed by
Tag: JUnit 5

Creating AbstractTest classes to reuse our startup code

Creating AbstractTest classes to reuse our startup code

So where were we? Oh yes, last week I was investigating JUnit 5 asserts and deciding that generally I don’t like them. It is safe to assume then that I will mainly be using Assertj for my assertions. We also got our first test passing in a way that won’t fail if I decide to change my WordPress theme again. One test is all very well, but what if I want to write many tests. As I demonstrated last week…

Read More Read More

Investigating JUnit 5 asserts

Investigating JUnit 5 asserts

Pesky asserts! Testing tests. Of course if your tests are going to be informative, it is not enough that they pass when everything is right and fail when everything is wrong. It is vital that when a test does fail, it gives an informative error message to help identify the problem. Ideally, your well designed test will fail at an assert that gives a clear description of the problem. That requires some effort to find out what your test will…

Read More Read More

Firing up a WebDriver in a JUnit test

Firing up a WebDriver in a JUnit test

There are plenty of good examples of how to fire up a Java WebDriver out there and one I often referenced is toolsqa.com. This, like many others, starts off by describing the processes using standard java main() methods. I want to write tests, not applications, so my goal here is to start straight away writing tests in a test framework so that I can view the results visually in an IDE. My hope is to achieve this using JUnit 5…

Read More Read More