Interested in sponsoring the site? [find out more]
Learn Test Automation By Taking Short Practical Steps
TLDR; If you are lucky enough to already be working in testing, and want to learn to automate, then I recommend gradually automating to add value in your existing work. Focus on a few tools and approaches that add value to you. Then build on that.
Can we use JUnit and TDD for Testing?
TLDR; JUnit is an execution framework. The principles of TDD are about writing code, seeing it fail, writing code to make it pass, seeing it pass and making it better. All applies when writing automated execution code for Testing
Using Code Coverage As a Review Tool
TLDR: Code Coverage can help with code review when we focus the coverage metrics on the code we want to review and format it to support coverage metric analysis.
Unit Testing FAQs and Lessons Learned
TLDR; Unit Testing and Code Coverage can lead to emotive discussions. These are personal lessons learned around Unit Testing and TDD. Keep things simple. Keep refactoring. View Test and Main as symbiotic.
Data Driven Tests in JUnit 4 with Parameterized Tests
JUnit 4 supports parameterizing a Test class to run the test methods in the class with multiple data values.
Using Static Analysis to improve your Java Coding
I’m always looking for simple ways that I can improve my Java programming. And SpotBugs, CheckStyle and PMD can help me do that.
Basic Differences Between JUnit 4 and Junit 5
There are many differences between JUnit 4 and 5, in terms of JUnit 5 having more capabilities and different ways of doing stuff.
But there are some very obvious differences between 4 and 5 in terms of: ignoring tests, running methods before and after methods and test classes, and exception asserting.
Generating JUnit HTML Reports
To generate JUnit HTML reports from maven builds we need to add the surefire plugin to generate the xml files and then the site and reporting plugins to create the html report.
Using Both JUnit 4 and Junit 5
I prefer to use either JUnit 4 or JUnit 5, but there may be moments when we want to use both. We can do that with JUnit 5 dependencies.