Categorygithub.com/OpenTestSolar/testtool-golang-ginkgo
modulepackage
0.2.49
Repository: https://github.com/opentestsolar/testtool-golang-ginkgo.git
Documentation: pkg.go.dev

# README

testtool-golang-ginkgo

用例属性

用例标签

参考ginkgo文档,插件支持加载用例中声明的标签Label并以键值对的格式设置在用例属性Attributes内,键值对格式为label: "[label01, label02]",其中键为固定的label,值为一个json序列化的字符串列表,列表中每个元素表示用例的一个标签。

例如,存在用例声明如下:

It("is labelled", Label("first label"), Label("second label"), func() { ... })

则用例对应的用例属性为:

label: "[first label, second label]"

加载或执行时可以在TestSelector中声明对应的标签以实现过滤,例如:

# 加载当前用例库中标签中包含label01的用例
solarctl load -t ".?label=label01"

# 执行当前用例库中标签中包含label01的用例
solarctl run -t ".?label=label01"

# Packages

No description provided by the author
No description provided by the author