Writing Java Code and Unit Tests Faster with GitHub Copilot Header image - explains the blog post intent - Learn how to use GitHub Copilot to generate Java code and unit tests—using a real mortgage calculator example—with practical tips on retaining quality code using AI-assisted development tools.

Writing Java Code and Unit Tests Faster with GitHub Copilot

Jonny Hackett AI, Articles, Java, Testing Leave a Comment

In this post, we’ll explore how to use GitHub Copilot to generate Java code and unit tests with minimal manual input. Using a real-world example—a mortgage calculator service—you’ll see how Copilot can help write both the core logic and the corresponding unit tests. Whether you’re new to AI-assisted development or curious about Copilot’s capabilities in a Java environment, this tutorial will give you practical insight into how it works—and where human oversight still matters.

Testing Spring Boot APIs with Rest-Assured Header image

Testing Spring Boot Rest APIs with Rest-Assured

Jonny Hackett API Development, Articles, Development Technologies & Tools, Java, REST, Spring Boot, Testing Leave a Comment

Creating RESTful APIs with Spring Boot is a straightforward process, making it a popular choice for a variety of applications, from UI to batch processing. The same API created can be used anywhere, whether it’s called from a UI application or batch applications. However, testing these APIs to ensure they work correctly can be challenging. In this article, I’ll introduce …

Using Equivalence Class Partition and Boundary Value Analysis while Unit Testing

Joseph Pasmore Articles, Programming, Testing Leave a Comment

The value of writing tests for code, especially unit tests, is clearly evident. Testing enhances software quality, improves security, inspires customer satisfaction, and most of all, saves the company money. Catching errors in the development phase before they reach production can save a company thousands.

I wanted to share a couple of the strategies I’ve followed in my career when it comes to writing unit tests. We’ll start with Equivalence Class Partitioning and finish with Boundary Value Analysis. While they are different, they can be used together to help make sure you’re writing the best unit tests you can write.

JASMINE SPIES UNIT TESTING

Unit Testing Using Jasmine Spies

Todd Leininger Articles, Development Technologies & Tools, Programming, Testing, Tutorial Leave a Comment

Unit testing is an important part of the development process. It gives us the ability to know that our code is working as intended and can also let us know if we may have broken something that we didn’t even think of.

With the help of Jasmine Spies, we can make our test setup easier, and we can give ourselves more options for what we can test against. Hopefully, this will give you a good starting point for all your Jasmine spying needs!

Comments in Code

Comments In Our Code: Necessary or Not?

Robert Rice Articles, Development Technologies & Tools, Programming 1 Comment

No matter what your opinion is on comments, one thing is universally true: developers should create code that the next developer can understand.

Sometimes, comments are a safe, simple way to leave the code better than how you found it. Sometimes, extracting sections of code into a well-named method can be an alternative way of doing this, with the added benefit that (a) you can test this method individually and (b) it may help you to spot smells in your code or see places for further refactoring or simplification.

Each situation you encounter will require different treatment, but I hope this post has given you a starting place for creating clean, readable code in your own life!