> For the complete documentation index, see [llms.txt](https://rainbowmango.gitbook.io/go/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://rainbowmango.gitbook.io/go/di-qi-zhang-ce-shi.md).

# 第七章：测试

- [7.1 快速开始](https://rainbowmango.gitbook.io/go/di-qi-zhang-ce-shi/7.1-kuai-su-kai-shi.md)
- [7.1.1 单元测试](https://rainbowmango.gitbook.io/go/di-qi-zhang-ce-shi/7.1-kuai-su-kai-shi/7.1.1-dan-yuan-ce-shi.md)
- [7.1.2 性能测试](https://rainbowmango.gitbook.io/go/di-qi-zhang-ce-shi/7.1-kuai-su-kai-shi/7.1.2-xing-neng-ce-shi.md)
- [7.1.3 示例测试](https://rainbowmango.gitbook.io/go/di-qi-zhang-ce-shi/7.1-kuai-su-kai-shi/7.1.3-shi-li-ce-shi.md)
- [7.2 进阶测试](https://rainbowmango.gitbook.io/go/di-qi-zhang-ce-shi/7.2-jin-jie-ce-shi.md)
- [7.2.1 子测试](https://rainbowmango.gitbook.io/go/di-qi-zhang-ce-shi/7.2-jin-jie-ce-shi/7.2.1-zi-ce-shi.md)
- [7.2.2 Main测试](https://rainbowmango.gitbook.io/go/di-qi-zhang-ce-shi/7.2-jin-jie-ce-shi/7.2.2-main-ce-shi.md)
- [7.3 实现原理](https://rainbowmango.gitbook.io/go/di-qi-zhang-ce-shi/7.3-shi-xian-yuan-li.md)
- [7.3.1 testing.common公共类](https://rainbowmango.gitbook.io/go/di-qi-zhang-ce-shi/7.3-shi-xian-yuan-li/7.3.1-testing.common-gong-gong-lei.md)
- [7.3.2 testing.TB接口](https://rainbowmango.gitbook.io/go/di-qi-zhang-ce-shi/7.3-shi-xian-yuan-li/7.3.2-testing.tb-jie-kou.md)
- [7.3.3 单元测试实现原理](https://rainbowmango.gitbook.io/go/di-qi-zhang-ce-shi/7.3-shi-xian-yuan-li/7.3.3-dan-yuan-ce-shi-shi-xian-yuan-li.md)
- [7.3.4 性能测试实现原理](https://rainbowmango.gitbook.io/go/di-qi-zhang-ce-shi/7.3-shi-xian-yuan-li/7.3.4-xing-neng-ce-shi-shi-xian-yuan-li.md)
- [7.3.5 示例测试实现原理](https://rainbowmango.gitbook.io/go/di-qi-zhang-ce-shi/7.3-shi-xian-yuan-li/7.3.5-shi-li-ce-shi-shi-xian-yuan-li.md)
- [7.3.6 Main测试实现原理](https://rainbowmango.gitbook.io/go/di-qi-zhang-ce-shi/7.3-shi-xian-yuan-li/7.3.6-main-ce-shi-shi-xian-yuan-li.md)
- [7.3.7 go test工作机制](https://rainbowmango.gitbook.io/go/di-qi-zhang-ce-shi/7.3-shi-xian-yuan-li/7.3.7-go-test-gong-zuo-ji-zhi.md)
- [7.4 扩展阅读](https://rainbowmango.gitbook.io/go/di-qi-zhang-ce-shi/7.4-kuo-zhan-yue-du.md)
- [7.4.1 测试参数](https://rainbowmango.gitbook.io/go/di-qi-zhang-ce-shi/7.4-kuo-zhan-yue-du/7.4.1-ce-shi-can-shu.md)
- [7.4.2 基准测试分析](https://rainbowmango.gitbook.io/go/di-qi-zhang-ce-shi/7.4-kuo-zhan-yue-du/7.4.2-ji-zhun-ce-shi-fen-xi.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://rainbowmango.gitbook.io/go/di-qi-zhang-ce-shi.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
