英文: Golang testing of functions declared as variable (testify) 问题 我在使用testify库时遇到了一个问题,无法调用以变量形式声明的函...
我可以在测试套件中运行单个测试吗?
英文: Can I run a single test in a suite? 问题 我为我的结构体设置了一个测试套件(https://github.com/stretchr/testify#suit...
为失败的 XML/字符串测试自定义测试输出
英文: Custom testify output for failing test of xml / strings 问题 我正在测试使用testify进行XML编组,并使用strings.Cont...
来自golang包的模拟方法
英文: Mocking method from golang package 问题 我一直无法找到一种解决办法来对golang包中的方法进行模拟。 例如,我的项目中有一段代码,当Os.Getwd()返...
使用gorilla/mux URL参数的函数的单元测试
英文: Unit testing for functions that use gorilla/mux URL parameters 问题 TLDR:gorilla/mux以前不提供设置URL变量的可...
Go:使用数据库初始化运行多个包的测试
英文: Go: Run test from multiple package with DB initialization 问题 我有一个GO项目,具有以下项目结构(每个包中有多个这种文件对)。 - ...
Testify似乎同时运行测试套件吗?
英文: Testify is seemingly running test suites concurrrently? 问题 基本上,我在特定的包中创建了一个新的测试文件,其中包含一些基本的测试结构 ...
在Go中分离单元测试和集成测试
英文: Separating unit tests and integration tests in Go 问题 在Go语言(使用testify框架)中,是否有一种已经确立的最佳实践来区分单元测试和集...
如何测试 Golang 的通道(channels)/ Go 协程(go-routines)?
英文: How to test Golang channels / go-routines 问题 我有一个包含一个字节数据的类型,并且接受一个通道来发布新数据。其他代码可以使用Read函数读取最后写入...
3