Browsed by
Tag: Gradle

Going multi-platform: Running the tests from MacOs and Linux

Going multi-platform: Running the tests from MacOs and Linux

Just a quickie tonight. Part of the reason for writing anything in Java is its ability to run on many devices. Before I move on from Java to dotnet and C# there are a couple of things to complete. In principle it should be no problem to call gradle to run my tests on both Linux and Macos. I’m going to cheat a little with Linux by running on Ubuntu on the Windows Subsystem for Linux. While we are at…

Read More Read More

Finally JUnit 5 has native support in Gradle

Finally JUnit 5 has native support in Gradle

As promised, this time I am taking a look at the support that is offered for JUnit 5 now that we are more than 6 months past the official release of JUnit 5. If you have read through the process of developing this test suite, you will be aware that I had to use JUnit’s own JUnitPlatform Gradle plugin to run my test suite. This works just fine, but it is clunky, requires a LOT of code and most frustratingly…

Read More Read More

CheckStyle – Enforcing a coding style: part 4

CheckStyle – Enforcing a coding style: part 4

This entry is part 4 of 4 in the series Implementing a Java code style with CheckStyle

Final Thoughts After struggling to get the last few posts out I have adopted a more agile approach to my blog. Now, whatever state the post is in it, will be published on Monday evening. I didn’t quite get everything finished off last week so here goes with my final thoughts about implementing CheckStyle into a new project. The last changes in my CheckStyle implementation Having set the Javadoc rules to ignore in my ruleset, I of course remembered that…

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