<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>SUT on Tony Bai</title><link>https://tonybai.com/tags/sut/</link><description>Recent content in SUT on Tony Bai</description><generator>Hugo</generator><language>zh-cn</language><copyright>2004-2026 Tony Bai. 版权所有.</copyright><lastBuildDate>Mon, 08 Jan 2024 00:00:00 +0800</lastBuildDate><atom:link href="https://tonybai.com/tags/sut/index.xml" rel="self" type="application/rss+xml"/><item><title>依赖Kafka的Go单元测试例解</title><link>https://tonybai.com/2024/01/08/go-unit-testing-deps-on-kafka/</link><pubDate>Mon, 08 Jan 2024 00:00:00 +0800</pubDate><guid>https://tonybai.com/2024/01/08/go-unit-testing-deps-on-kafka/</guid><description>本文永久链接 – https://tonybai.com/2024/01/08/go-unit-testing-deps-on-kafka Kafka是Apache基金会开源的一个分布式事件流处理平台，是Java阵营(最初为Scala)中的一款杀手级应用，其提供的高可靠性、高吞吐量和低延迟的数据传输能力，让其到目前为止依旧是现代企业级应用系统以及云原生应用系统中使用的重要中间件。 在日常开发Go程...</description></item><item><title>Go语言gRPC服务Handler单元测试详解</title><link>https://tonybai.com/2023/11/25/grpc-handler-unit-testing-in-go/</link><pubDate>Sat, 25 Nov 2023 00:00:00 +0800</pubDate><guid>https://tonybai.com/2023/11/25/grpc-handler-unit-testing-in-go/</guid><description>本文永久链接 – https://tonybai.com/2023/11/25/grpc-handler-unit-testing-in-go 在云原生时代和微服务架构背景下，HTTP和RPC协议成为服务间通信和与客户端交互的两种主要方式。对于Go语言而言，标准库提供了net/http/httptest包，为开发人员提供了便捷的方式来构建服务端HTTP Handler单元测试的测试脚手架代码，而无...</description></item><item><title>单测时尽量用fake object</title><link>https://tonybai.com/2023/04/20/provide-fake-object-for-external-collaborators/</link><pubDate>Thu, 20 Apr 2023 00:00:00 +0800</pubDate><guid>https://tonybai.com/2023/04/20/provide-fake-object-for-external-collaborators/</guid><description>本文永久链接 – https://tonybai.com/2023/04/20/provide-fake-object-for-external-collaborators 1\. 单元测试的难点：外部协作者(external collaborators)的存在 -------------------------------------------- 单元测试是软件开发的一个重要部分，它有助于在开...</description></item></channel></rss>