UnitAuto Go 库,可通过 GitHub 仓库等远程依赖。
UnitAuto Go Library for remote dependencies with GitHub repo, etc.
require (
github.com/TommyLemon/unitauto-go v1.0.0
)
go get github.com/TommyLemon/unitauto-go@v1.0.0
https://github.com/TommyLemon/UnitAuto
由于 Go 的反射限制,目前做不到像 Java, Kotlin 版几乎绝对零代码,还需要注册 func 和 struct 的实例,
不过注册代码可以通过 UnitAuto-Admin 前端管理网页设置项 [查看、同步方法文档] 来生成,复制粘贴到被测项目中:
Due to the limitation of Go, it's not almost absolutely coding free like Java and Kotlin,
and you need to write few code to register the funcs and structs to be tested.
However, the code can be generated by clicking the setting item [View/Sync doc] of UnitAuto-Admin,
then you can copy and pasted the "ginCode" into the project under test instead of coding: