Skip to content
On this page

测试

编写测试文件

新建一个.go文件,结尾以_test命名即可,例如 just_test.go

go
package test

import (
	"context"
	"fmt"
	"github.com/bndr/gojenkins"
	"testing"
)

func TestJust(t *testing.T) {
	// 失败
	t.Failed()
}

go test 单元测试

go
go test