# go test

Published articles for go test.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Catch Go bugs that fuzzing misses with Gemini and a constraint solver

DevFeed: [Catch Go bugs that fuzzing misses with Gemini and a constraint solver](<https://devfeed.tech/articles/catch-go-bugs-that-fuzzing-misses-with-gemini-and-a-constraint-solver-131279.md>)

Original publisher: [Read original article](<https://developers.googleblog.com/catch-go-bugs-that-fuzzing-misses-with-gemini-and-a-constraint-solver/>)

Author: Karl Weinmeister

Published: 2026-11-13T06:38:11.586756Z

Content type: article

Language: en

Sources: [Google Developers Blog](<https://devfeed.tech/sources/google-developers-blog.md>)

Topics: [Fuzzing/Fuzz testing](<https://devfeed.tech/topics/fuzzing.md>), [Go Language](<https://devfeed.tech/topics/go-language.md>), [Static code analysis](<https://devfeed.tech/topics/static-code-analysis.md>)

Tags: [argon](<https://devfeed.tech/tags/argon.md>), [bugs](<https://devfeed.tech/tags/bugs.md>), [capacity](<https://devfeed.tech/tags/capacity.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [constraint](<https://devfeed.tech/tags/constraint.md>), [fuzzing](<https://devfeed.tech/tags/fuzzing.md>), [gemini](<https://devfeed.tech/tags/gemini.md>), [gemini-4](<https://devfeed.tech/tags/gemini-4.md>), [gemini-4-argon](<https://devfeed.tech/tags/gemini-4-argon.md>), [go](<https://devfeed.tech/tags/go.md>), [go-test](<https://devfeed.tech/tags/go-test.md>), [pairing](<https://devfeed.tech/tags/pairing.md>), [slice](<https://devfeed.tech/tags/slice.md>), [surviving](<https://devfeed.tech/tags/surviving.md>), [test](<https://devfeed.tech/tags/test.md>), [z3](<https://devfeed.tech/tags/z3.md>)

### AI overview

The article describes a Go bug-finding workflow that compiles functions for RISC-V, identifies bounds-check traps left after compiler optimization, and has Gemini 4 Argon translate their paths into Z3 constraints. Z3 can generate concrete crashing inputs, which `go test` replays against the real code; a `sat` result was reliable in the reported cases, while `unsat` is only suggestive, not a correctness proof. The approach found three planted parser bugs and three latent `skill-lint` bugs. It also exposed why ordinary Go fuzzing missed two panics: slice expressions check capacity, and fuzz inputs often have spare capacity. Clipping fuzz input capacity to length made the fuzzer find both bugs quickly. The solver is best suited to pure functions and helpers; fuzzing and race detection remain useful for broader behavior, and the described single-threaded models do not detect races or deadlocks.

### Source excerpt

How pairing Go's surviving compiler bounds-check traps with Gemini 4 Argon and the Z3 constraint solver catches latent out-of-bounds panics in Go code and uncovers a slice-capacity blind spot in go test -fuzz.

## Building Maintainable E2E Tests for Backend APIs with Go's go test

DevFeed: [Building Maintainable E2E Tests for Backend APIs with Go's go test](<https://devfeed.tech/articles/e2e-tests-every-developer-can-write-test-platform-built-with-plain-go-test-56774.md>)

Original publisher: [Read original article](<https://engineering.mercari.com/en/blog/entry/20251016-e2e-tests/>)

Author: Ryotarai

Published: 2025-10-17T11:19:28Z

Content type: article

Language: en

Sources: [Mercari Engineering](<https://devfeed.tech/sources/mercari-engineering.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Back end](<https://devfeed.tech/topics/backend.md>), [test](<https://devfeed.tech/topics/test.md>), [API](<https://devfeed.tech/topics/api.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [apis](<https://devfeed.tech/tags/apis.md>), [backend](<https://devfeed.tech/tags/backend.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [developer](<https://devfeed.tech/tags/developer.md>), [e2e](<https://devfeed.tech/tags/e2e.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [go](<https://devfeed.tech/tags/go.md>), [go-test](<https://devfeed.tech/tags/go-test.md>), [ide](<https://devfeed.tech/tags/ide.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

This article explains how Mercari built an end-to-end testing foundation for backend APIs in its Global App project. It describes the challenges of conventional E2E testing and the goal of enabling all developers to maintain tests, then outlines the choice to write tests as ordinary Go code using go test for low learning cost, type safety, and IDE support.

### Source excerpt

Introduction Hi! My name is @ryotarai, and I'm responsible for SRE & Enabling for Crossborder (XB) Engineering. As part of the series, Behind the Scenes of Developing Mercari's First Global App, "Mercari Global App," this post takes a deep dive into end-to-end (E2E) testing for the project's backend APIs. Specifically, I'll share how we built [...]

## Testing only changed Go packages

DevFeed: [Testing only changed Go packages](<https://devfeed.tech/articles/testing-only-changed-go-packages-37735.md>)

Original publisher: [Read original article](<https://carlosbecker.com/posts/go-test-changed/>)

Author: Carlos Alexandro Becker

Published: 2024-12-30T00:00:00Z

Content type: tutorial

Language: en

Sources: [Carlos Becker](<https://devfeed.tech/sources/carlos-becker.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Software Testing](<https://devfeed.tech/topics/software-testing.md>), [Shell](<https://devfeed.tech/topics/shell.md>), [Cache](<https://devfeed.tech/topics/cache.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>)

Tags: [caching](<https://devfeed.tech/tags/caching.md>), [go](<https://devfeed.tech/tags/go.md>), [go-test](<https://devfeed.tech/tags/go-test.md>), [shell-script](<https://devfeed.tech/tags/shell-script.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

A practical shell script tip for running tests only in changed Go packages, with an additional file-watching workflow for rerunning tests when files change. The article explains that this approach can be faster but is less correct than running the full test suite, which should always run in CI.

### Source excerpt

Sometimes, working on big projects, running all tests locally take too much time.

## How Invisible Unicode Characters Can Hide Malicious Go Code in Test Files

DevFeed: [How Invisible Unicode Characters Can Hide Malicious Go Code in Test Files](<https://devfeed.tech/articles/jia-tanning-go-code-53015.md>)

Original publisher: [Read original article](<https://www.arp242.net/jia-tan-go.html>)

Author: Martin Tournoij

Published: 2024-10-28T00:00:00Z

Content type: article

Language: en

Sources: [arp242.net](<https://devfeed.tech/sources/arp242-net.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Software Testing](<https://devfeed.tech/topics/software-testing.md>), [backdoor](<https://devfeed.tech/topics/backdoor.md>), [Security](<https://devfeed.tech/topics/security.md>), [passwords](<https://devfeed.tech/topics/passwords.md>)

Tags: [backdoor](<https://devfeed.tech/tags/backdoor.md>), [github](<https://devfeed.tech/tags/github.md>), [gitlab](<https://devfeed.tech/tags/gitlab.md>), [go](<https://devfeed.tech/tags/go.md>), [go-test](<https://devfeed.tech/tags/go-test.md>), [security](<https://devfeed.tech/tags/security.md>), [testing](<https://devfeed.tech/tags/testing.md>), [vscode](<https://devfeed.tech/tags/vscode.md>)

### AI overview

This article explains how invisible Unicode variation selectors, homoglyphs, and zero-width characters can make a Go filename appear to end in _test.go without actually doing so. Such a file may be compiled into regular builds, allowing seemingly harmless test-related code to weaken password security or introduce a backdoor.

### Source excerpt

The Go compiler skips files ending with _test.go during normal compilation. They are compiled with go test command (together will all other .go files), which also inserts some chutney to run the test functions. The standard way to do testing is to have a foo.go and foo_test.go file next to each other. If you have a file that appears to end with _test.go but doesn't actually end with _test.go, then it will get compiled for a regular build. For example: a_test\uFE0E.go U+FE0E is a variation selector. These are typically very invisible. Or more traditional homoglyph trickery: b_t\u0435\u0455t.go" Those Cyrillic letters appear virtually identical on my machine: b_tеѕt.go / b_test.go, or as monospace: b_tеѕt.go / b_test.go. This can also be done with zero-width space, zero-width joiner, and perhaps a few other codepoints, but variation selectors tend to be the "most invisible" of them. This is pretty sneaky, something like this: // user.go var bcryptCost = bcrypt.DefaultCost func hashPassword(pwd []byte) []byte { pwd, _ := bcrypt.GenerateFromPassword(pwd, bcryptCost) return pwd } // user_test.go func init() { // The special "init" function gets run on import. // Lower bcrypt cost in tests, because otherwise any test will take // well over a second as it's so slow. bcryptCost = bcrypt.MinCost } Is perfectly valid, but with a doctored "non-test" user_test.go it will now lower the security of all passwords, and effectively inserts a backdoor. There are many variants one can think of: code that looks innocent and would probably pass many reviews, but will backdoor the codebase by weakening the security, or adds in "test users", "test keys", "default passwords", and things like that. Who is carefully auditing tests for security in the first place? I've audited a bunch of packages over the years, but I've never paid much attention to the test files. Most tools don't display this: Vim, VSCode, macOS finder, Windows Explorer, /bin/ls, GitHub, GitLab, etc. - they all just display

## Contextual logging in Kubernetes 1.29: Better troubleshooting and enhanced logging

DevFeed: [Contextual logging in Kubernetes 1.29: Better troubleshooting and enhanced logging](<https://devfeed.tech/articles/contextual-logging-in-kubernetes-1-29-better-troubleshooting-and-enhanced-logging-17570.md>)

Original publisher: [Read original article](<https://www.kubernetes.dev/blog/2023/12/20/contextual-logging/>)

Author: The Kubernetes Authors

Published: 2023-12-20T17:30:00Z

Content type: release

Language: en

Sources: [Kubernetes Contributors Blog](<https://devfeed.tech/sources/kubernetes-contributors-blog.md>)

Topics: [Kubernetes](<https://devfeed.tech/topics/kubernetes.md>), [Logging](<https://devfeed.tech/topics/logging.md>), [Instrumentation](<https://devfeed.tech/topics/instrumentation.md>), [telemetry](<https://devfeed.tech/topics/telemetry.md>)

Tags: [go-test](<https://devfeed.tech/tags/go-test.md>), [instrumentation](<https://devfeed.tech/tags/instrumentation.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [logging](<https://devfeed.tech/tags/logging.md>), [logs](<https://devfeed.tech/tags/logs.md>), [tests](<https://devfeed.tech/tags/tests.md>), [troubleshooting](<https://devfeed.tech/tags/troubleshooting.md>), [unit-tests](<https://devfeed.tech/tags/unit-tests.md>)

### AI overview

The article announces that Kubernetes contextual logging, introduced in Kubernetes v1.24, has been migrated to kube-scheduler, kube-controller-manager, and some directories. Based on the go-logr API, the feature passes logger instances through callers to support structured logs with additional context, improving troubleshooting and test output in parallel applications.

### Source excerpt

On behalf of the Structured Logging Working Group and SIG Instrumentation , we are pleased to announce that the contextual logging feature introduced in Kubernetes v1.24 has now been successfully migrated to two components (kube-scheduler and kube-controller-manager) as well as some directories. This feature aims to provide more useful logs for better troubleshooting of Kubernetes and to empower developers to enhance Kubernetes. What is contextual logging? Contextual logging is based on the go-logr API. The key idea is that libraries are passed a logger instance by their caller and use that for logging instead of accessing a global logger. The binary decides the logging implementation, not the libraries. The go-logr API is designed around structured logging and supports attaching additional information to a logger. This enables additional use cases: The caller can attach additional information to a logger: WithName adds a "logger" key with the names concatenated by a dot as value WithValues adds key/value pairs When passing this extended logger into a function, and the function uses it instead of the global logger, the additional information is then included in all log entries, without having to modify the code that generates the log entries. This is useful in highly parallel applications where it can become hard to identify all log entries for a certain operation, because the output from different operations gets interleaved. When running unit tests, log output can be associated with the current test. Then, when a test fails, only the log output of the failed test gets shown by go test. That output can also be more verbose by default because it will not get shown for successful tests. Tests can be run in parallel without interleaving their output. One of the design decisions for contextual logging was to allow attaching a logger as value to a context.Context. Since the logger encapsulates all aspects of the intended logging for the call, it is part of the context,

## Table driven tests in Go

DevFeed: [Table driven tests in Go](<https://devfeed.tech/articles/table-driven-tests-in-go-22198.md>)

Original publisher: [Read original article](<https://www.ardanlabs.com/blog/2023/01/table-driven-tests-in-go.html>)

Published: 2023-01-19T00:00:00Z

Content type: tutorial

Language: en

Sources: [William Kennedy](<https://devfeed.tech/sources/william-kennedy.md>)

Topics: [table driven tests](<https://devfeed.tech/topics/table-driven-tests.md>)

Tags: [documentation](<https://devfeed.tech/tags/documentation.md>), [go](<https://devfeed.tech/tags/go.md>), [go-test](<https://devfeed.tech/tags/go-test.md>), [golang](<https://devfeed.tech/tags/golang.md>), [table-driven-tests](<https://devfeed.tech/tags/table-driven-tests.md>), [tests](<https://devfeed.tech/tags/tests.md>), [unit-tests](<https://devfeed.tech/tags/unit-tests.md>)

### AI overview

Go table-driven tests store input cases and expected outcomes in a slice, then run the function against each case. As the case set grows, locating a failure becomes harder. The excerpt describes using sub-tests: each test function receives a name and test logic, and the Go test output shows that name when the case fails, making it easier to identify the failing case.

### Source excerpt

Introduction Table tests are a great way to test different inputs and associated outputs for a function in Go. To write a table test, you define a slice of some data struct with fields of the input data you'll need and the expected outcome. Then you can loop through this slice and pass the data stored for each element to your function. One disadvantage of table tests is as the data set in your slice grows, the harder it is to find the failing case. Luckily, Miki will share some tips to manage this with the Go test suite.

## go test -v streaming output

DevFeed: [go test -v streaming output](<https://devfeed.tech/articles/go-test-v-streaming-output-20828.md>)

Original publisher: [Read original article](<https://dave.cheney.net/2020/03/10/go-test-v-streaming-output>)

Author: Dave Cheney

Published: 2020-03-10T07:03:03Z

Content type: article

Language: en

Sources: [Dave Cheney](<https://devfeed.tech/sources/dave-cheney.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Streaming](<https://devfeed.tech/topics/streaming.md>), [Software Testing](<https://devfeed.tech/topics/software-testing.md>), [Unit testing](<https://devfeed.tech/topics/unit-testing.md>)

Tags: [go](<https://devfeed.tech/tags/go.md>), [go-test](<https://devfeed.tech/tags/go-test.md>), [integration](<https://devfeed.tech/tags/integration.md>), [programming](<https://devfeed.tech/tags/programming.md>), [retry](<https://devfeed.tech/tags/retry.md>), [standard-library](<https://devfeed.tech/tags/standard-library.md>), [streaming](<https://devfeed.tech/tags/streaming.md>), [testing](<https://devfeed.tech/tags/testing.md>), [unit-test](<https://devfeed.tech/tags/unit-test.md>), [unit-testing](<https://devfeed.tech/tags/unit-testing.md>)

### AI overview

The article explains that Go 1.14 streams test output as it is produced when using -v, instead of buffering output until the test finishes. This improves visibility when debugging long-running or retrying integration tests.

### Source excerpt

The testing package is one of my favourite packages in the Go standard library, not just because of its low noise approach to unit testing, but, over the lifetime of Go, it has received a steady stream of quality of life improvements driven by real world usage. The most recent example of this is, in [...]

## Why Not Go (Golang) There?

DevFeed: [Why Not Go (Golang) There?](<https://devfeed.tech/articles/why-not-go-golang-there-32200.md>)

Original publisher: [Read original article](<https://bruceeckel.com/2015/02/15/why-not-go-there/>)

Author: Bruce Eckel

Published: 2015-02-15T00:00:00Z

Content type: opinion

Language: en

Sources: [Bruce Eckel - Computing Thoughts](<https://devfeed.tech/sources/bruce-eckel-computing-thoughts.md>)

Topics: [Go Language](<https://devfeed.tech/topics/go-language.md>), [Python](<https://devfeed.tech/topics/python.md>), [Fortran](<https://devfeed.tech/topics/fortran.md>), [Groovy](<https://devfeed.tech/topics/groovy.md>), [Mercury](<https://devfeed.tech/topics/mercury-lang.md>), [Erlang](<https://devfeed.tech/topics/erlang.md>), [Test-driven development](<https://devfeed.tech/topics/tdd.md>)

Tags: [build-tool](<https://devfeed.tech/tags/build-tool.md>), [built-in](<https://devfeed.tech/tags/built-in.md>), [c](<https://devfeed.tech/tags/c.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [design](<https://devfeed.tech/tags/design.md>), [features](<https://devfeed.tech/tags/features.md>), [fmt](<https://devfeed.tech/tags/fmt.md>), [formatting](<https://devfeed.tech/tags/formatting.md>), [framework](<https://devfeed.tech/tags/framework.md>), [go](<https://devfeed.tech/tags/go.md>), [go-test](<https://devfeed.tech/tags/go-test.md>), [golang](<https://devfeed.tech/tags/golang.md>), [language](<https://devfeed.tech/tags/language.md>), [languages](<https://devfeed.tech/tags/languages.md>), [libraries](<https://devfeed.tech/tags/libraries.md>), [parallelism](<https://devfeed.tech/tags/parallelism.md>), [python](<https://devfeed.tech/tags/python.md>), [standard](<https://devfeed.tech/tags/standard.md>), [test](<https://devfeed.tech/tags/test.md>), [tool](<https://devfeed.tech/tags/tool.md>)

### AI overview

The author likes Go's built-in build tooling, go fmt, go test, and native concurrency, but does not find enough reason to leave Python. In the client team's experience, Go fit neither prototyping nor high-performance work: R, Mathematica, and Python remained attractive for prototyping, while C++ with Qt and later C# served heavier applications. The account cites weak scientific-library and data-frame support, and a perception that Go lacked sustained investment and momentum. Prototypes often met performance needs, further reducing the incentive to move work to C#. The author says a simple Python-Go interface for low-level or parallel tasks, or a distinctive library, could change their view. These are the author's and client's impressions, not a general comparison.

### Source excerpt

While there are a LOT of things I really like about the Go language, the bottom line is that I don't use it (mostly because when I studied it the libraries were kind of scarce, something that's apparently changed a lot). It attracted me, but not enough for me to change over from Python. Go has made some brilliant design decisions. I especially like the built-in features that in most other languages you must go figure out for yourself -- like the build tool, standard formatting (enforced with go fmt) a test framework (which you run with go test), and natively-supported concurrency/parallelism.