InfoQ Homepage Unit Testing Content on InfoQ
-
How Amazon Uses Guardrails in Software Development
Carlos Arguelles spoke about Amazon’s inflection points in engineering productivity at QCon San Francisco, where he explained that shift testing left can help catch issues early. He suggested using guardrails such as code reviews and coverage checks. Your repo strategy, monorepo or multirepo, will impact the guardrails that need to be in place.
-
How to Use Property-Based Testing as Fuzzy Unit Testing
According to Eivind Jahren, property-based testing is an invaluable tool for its ease of use and effectiveness. It is flexible in what requirements one can formulate and is simple and lightweight enough to put in the hands of software developers to perform iterative testing on a daily basis, less test code is required, and it’s easier to reuse test data generators for complex structured data.
-
Swift Testing is a New Framework from Apple to Modernize Testing for Swift across Platforms
While XCTest remains the preferred way to create tests in Xcode, the new Swift Testing framework attempts to introduce an expressive and intuitive API for the definition of tests that applies to all platforms where Swift is supported. The framework also enables parallelizing, categorizing and associating tests with bugs.
-
Slack Combines ASTs with Large Language Models to Automatically Convert 80% of 15,000 Unit Tests
Slack's engineering team recently published how it used a large language model (LLM) to automatically convert 15,000 unit and integration tests from Enzyme to React Testing Library (RTL). By combining Abstract Syntax Tree (AST) transformations and AI-powered automation, Slack's innovative approach resulted in an 80% conversion success rate, significantly reducing the manual effort required.
-
Production Comes First - an Outside-In Approach to Building Microservices by Martin Thwaites
Martin Thwaites, an observability evangelist, developer, and developer advocate at honeycomb.io, presented on Production Comes First - an Outside-In Approach to Building Microservices. The session was part of the "Connecting Systems: APIs, Protocols, Observability" track.
-
How to Prevent and Repay Technical Debt: What Teams, Tech Leads and Managers Can Do
Tech leads, project managers, and managers can prevent technical debt by giving software developers more time; in addition, they can plan for spare time and refactoring sprints to allow teams to improve code. To prioritise technical debt, development teams can show how much time we can save if we invest, and how complicated the software will become in the future if we don’t repay technical debt.
-
Jacoco Agent Measures Code Coverage for Any Test
Jacoco is an open-source code coverage library for Java distributed under the Eclipse Public License. The library is often used in Java projects to measure the coverage of unit or integration tests. But it's also possible to measure the coverage of any test, which uses a running application, with the Jacoco agent.
-
Testing across a Large Number of Inputs with Property-Based Testing
Property-based testing is an approach that involves specifying statements that should always be true, rather than relying on specific examples. It enables you to test functions across a large number of inputs with fewer tests. Every run of a property-based test will use different inputs, which can give you confidence your code works in a general case.
-
AI-Based Code-Completion Tool Tabnine Now Offers Automatic Unit Test Generation
One of the pioneers in the field, Tabnine is a code completion assistant that uses generative AI to predict and suggest the next lines of code based on its surrounding context. Tabnine is now opening beta access to new capabilities aimed at generating unit tests.
-
JetBrains Previews Aqua, New Test Automation-Oriented IDE
JetBrains Aqua, now available in preview, is a new IDE focusing on test automation and integrating a number of distinct tools that are at the core of an automation engineer's daily routine, says JetBrains. Its features include multi-language support, an HTTP client and a Web inspector, database management, integrated Docker support, and more.
-
JUnit 5.9 Supports GraalVM Native Image
JUnit 5.9 resolves various bugs and introduces a number of new features such as the ability to keep temporary files after executing a test. New annotations provide the ability to either enable or disable specific tests when running in a GraalVM Native Image. XML reports are now stored in the Open Testing Reporting format.
-
Shifting Quality Left with the Test Pyramid
Shifting quality left means building in quality much earlier in the software development cycle, rather than testing for quality after completion of development. Using the test pyramid model, a project was able to move testing towards earlier stages, thereby finding defects that caused integration issues earlier in development.
-
Ebay Open-Sources Package to Reduce Test Flakiness Using Swift and Xcode
Targeted Auto Retry is Ebay's approach to dealing with test flakiness that aims to make a continuous integration pipeline more resilient to flaky test steps. To make this approach straightforward to use, Ebay has open sourced a lightweight framework for the Swift language that can be used with Xcode unit testing framework.
-
Cypress 5.x Adds Test Retries and Shadow DOM Support
Cypress, a browser-based test runner and dashboard, recently introduced native support for test retries in the Cypress 5.0 release, helping developers avoid intermittent test failures. Other recent Cypress advances include networking stubbing and shadow DOM support.
-
JUnit Project Moves to Azure Pipelines for Builds
JUnit, a unit testing framework for Java, is one of the most popular libraries used by Java developers. The JUnit team recently announced they've adopted Azure Pipelines for continuous integration (CI).