{"modulePath":"github.com/AlaudaDevops/pkg","version":"v0.14.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package framework\n\n## Types\n\n```go\ntype CaseBuilder struct {\n\tTestCaseBuilder\n}\n```\nCaseBuilder builder for TestCases\n\n```go\nfunc P0Case(name string) *CaseBuilder\n```\nP0Case builds a P0 case\n\n```go\nfunc P1Case(name string) *CaseBuilder\n```\nP1Case builds a P1 case\n\n```go\nfunc P2Case(name string) *CaseBuilder\n```\nP2Case builds a P1 case\n\n```go\nfunc P3Case(name string) *CaseBuilder\n```\nP3Case builds a P1 case\n\n```go\nfunc (b *CaseBuilder) AllowSkip() *CaseBuilder\n```\nAllowSkip set the test case to skip when condition check failed\n\n```go\nfunc (b *CaseBuilder) Cluster() *cluster.TestCaseBuilder\n```\nCluster convert to cluster test case builder\n\n```go\nfunc (b *CaseBuilder) Do() bool\n```\nDo build and return the test case\n\n```go\nfunc (b *CaseBuilder) DoFunc(f TestSpecFunc) bool\n```\nDoFunc build and return the test case, just like the Do function\n\n```go\nfunc (b *CaseBuilder) DoNotSkip() *CaseBuilder\n```\nDoNotSkip set the test case to not skip when condition check failed\n\n```go\nfunc (b *CaseBuilder) DoWithContext(ctx context.Context) bool\n```\nDoWithContext run a test case with special context The context can be used for construct case layouts\n\n```go\nfunc (b *CaseBuilder) P0() *CaseBuilder\n```\nP0 sets as P0\n\n```go\nfunc (b *CaseBuilder) P1() *CaseBuilder\n```\nP1 sets as P1\n\n```go\nfunc (b *CaseBuilder) P2() *CaseBuilder\n```\nP2 sets as P2\n\n```go\nfunc (b *CaseBuilder) P3() *CaseBuilder\n```\nP3 sets as P3\n\n```go\nfunc (b *CaseBuilder) WithCondition(funcs ...Condition) *CaseBuilder\n```\nWithCondition sets conditions\n\n```go\nfunc (b *CaseBuilder) WithFunc(tc TestSpecFunc) *CaseBuilder\n```\nWithFunc replaces the function with another given function\n\n```go\nfunc (b *CaseBuilder) WithLabels(labels ...interface{}) *CaseBuilder\n```\nWithLabels sets labels\n\n```go\nfunc (b *CaseBuilder) WithPriority(prior TestCasePriority) *CaseBuilder\n```\nWithPriority sets priorities\n\n```go\ntype Framework struct {\n\tName string\n\n\tTestContext\n\t// contains filtered or unexported fields\n}\n```\nFramework base framework for running automated test cases\n\n```go\nfunc New(name string) *Framework\n```\nNew sets a name to framework\n\n```go\nfunc (f *Framework) Config(configures ...Configure) *Framework\n```\nConfig register configuration mutators which executed before case running\n\n```go\nfunc (f *Framework) Extensions(extensions ...SharedExtension) *Framework\n```\nRun start tests\n\n```go\nfunc (f *Framework) MRun(m *testing.M)\n```\nMRun main testing.M run\n\n```go\nfunc (f *Framework) Run(t *testing.T)\n```\nRun start tests\n\n```go\nfunc (f *Framework) SynchronizedAfterSuite(destroyFunc func()) *Framework\n```\nSynchronizedAfterSuite destroys the whole environment\n\n```go\nfunc (f *Framework) SynchronizedBeforeSuite(initFunc func()) *Framework\n```\nSynchronizedBeforeSuite basic before suite initialization\n\n```go\nfunc (f *Framework) WithContext(ctx context.Context) *Framework\n```\n\n","path":"github.com/AlaudaDevops/pkg/testing/framework","name":"framework","synopsis":"","isRedistributable":true}
