InfoQ Homepage Unit Testing Content on InfoQ
-
Experimenting with LLMs for Developer Productivity
This article describes an experiment that sought to determine if no-cost LLM-based code generation tools can improve developer productivity. The experiment evaluated several LLMs by generating unit tests for some open-source code and measuring the code coverage as well as the manual rework necessary to make the tests work.
-
Is Your Test Suite Brittle? Maybe It’s Too DRY
One important design principle in software development is DRY – Don’t Repeat Yourself. However, when DRY is applied to test code, it can cause the test suite to become brittle — difficult to understand, maintain, and change. In this article, I will present some indications that a test suite is brittle, guidelines to follow when reducing duplication in tests, and better ways to DRY up tests.
-
Modernizing Testing Practices for Jakarta EE Projects
This article focuses on the increasing adoption of data-driven testing in Java enterprise applications and sheds light on the Data and NoSQL Jakarta specifications. It highlights the significance of modern testing libraries such as JUnit Jupiter and AssertJ and emphasizes the importance of container-based frameworks like Testcontainers in enhancing testing practices.
-
Efficiently Arranging Test Data: Streamlining Setup with Instancio
The need to ensure code quality is ubiquitous, regardless of the development paradigm. Continuous Deployment and Continuous Delivery indicate that reliable test suites are directly connected to the speed of development and quicker customer feedback loop. Instancio automates the data setup step - the A in Arrange-Act-Assert. So, it allows you to put more emphasis on the business feature tested.
-
A Simpler Testing Pyramid: Getting the Most out of Your Tests
Overcomplicating your test structure can lead to slow, brittle tests. A focus on test speed as the primary labeling mechanism maximizes your test investment.
-
The Unit in Unit Testing
In this article, we will focus on how developers should consider using fake objects instead of mock objects, as fake objects offer similar isolation benefits while driving high confidence, clear documentation, and loose coupling between implementation and test code.
-
How Practicing TCR (Test && Commit || Revert) Reduces Batch Size
The practice of test && commit || revert teaches how to write code in smaller chunks, further reducing batch size. TCR yields high coverage by design, which smooths the downstream testing pipeline.
-
An Ode to Unit Tests: in Defense of the Testing Pyramid
The switch to the testing diamond approach has not effectively addressed issues caused by the testing pyramid. Instead, the focus should be on using unit tests correctly within a testable architecture.
-
The Current and Future State of Testing: a Conversation with Lisa Crispin
Lisa Crispin talks about the current and future state of testing, how testing works in agile environments, the value testers bring to DevOps, testing machine learning and where testing is headed. Testing is a communication activity and communication skills are vital to successfully leveraging testing skills and knowledge in modern software development.
-
Unlocking Continuous Testing: The Four Best Practices Necessary for Success
While the majority of organizations have enthusiastically embraced agile planning and development, most still find themselves unable to effectively implement continuous testing throughout the software development lifecycle. There are four best practices to help overcome this: focus on test quality, keep your tests short and atomic, test across multiple platforms, and leverage parallelization.
-
Java InfoQ Trends Report - July 2019
The InfoQ Java trend report provides an overview of technology adoption and commentary on how we see the Java and JVM-related space evolving in 2019. Key developments include the release of Java 13, the rise of non-HotSpot JVMs and the evolution of GraalVM, and the changing landscape of Java microservice frameworks.
-
Test-Driven Development: Really, It’s a Design Technique
Using a step-by-step example in Java, this article provides a practical example of how to use test-driven development (TDD) to divide, test, and conquer larger problems when coding.