提交 71307e37 编写于 作者: aaronchen2k2k's avatar aaronchen2k2k

plugin communication sample

上级 eb3c7dc9
package main
import (
"github.com/ozontech/allure-go/pkg/framework/provider"
"github.com/ozontech/allure-go/pkg/framework/suite"
"testing"
)
type AllSuite struct {
suite.Suite
}
func TestRestApiSet(t *testing.T) {
suite.RunSuite(t, new(ProductApiSuite))
}
func (s *AllSuite) BeforeEach(t provider.T) {
t.ID("0")
t.AddSubSuite("TestProductApi")
}
......@@ -3,17 +3,24 @@ package main
import (
"github.com/ozontech/allure-go/pkg/framework/provider"
"github.com/ozontech/allure-go/pkg/framework/suite"
"testing"
)
func TestProductApi(t *testing.T) {
suite.RunSuite(t, new(ProductApiSuite))
}
type ProductApiSuite struct {
suite.Suite
}
func (s *ProductApiSuite) BeforeEach(t provider.T) {
t.ID("1")
t.AddSubSuite("ProductApi")
}
func (s *ProductApiSuite) TestMe(t provider.T) {
t.Require().Equal("Success", "Success")
}
type ProductApiSuite struct {
suite.Suite
func (s *ProductApiSuite) TestProductApiTest(t provider.T) {
t.WithNewStep("My Second Step!", func(sCtx provider.StepCtx) {
sCtx.NewStep("My First SubStep!")
})
}
......@@ -41,8 +41,8 @@ func main() {
flagSet.StringVar(&version, "version", "latest", "")
flagSet.StringVar(&version, "v", "latest", "")
flagSet.StringVar(&testToRun, "testToRun", "all_test.go", "")
flagSet.StringVar(&testToRun, "t", "all_test.go", "")
flagSet.StringVar(&testToRun, "testToRun", "", "")
flagSet.StringVar(&testToRun, "t", "", "")
testing.Init()
flagSet.Parse(os.Args[1:])
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册