testmanagerd

package
v1.0.155 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2024 License: MIT Imports: 22 Imported by: 3

Documentation

Index

Constants

View Source
const (
	StatusFailed          = TestCaseStatus("failed")           // Defined by Apple
	StatusPassed          = TestCaseStatus("passed")           // Defined by Apple
	StatusExpectedFailure = TestCaseStatus("expected failure") // Defined by Apple
	StatusStalled         = TestCaseStatus("stalled")          // Defined by us

)

Variables

This section is empty.

Functions

This section is empty.

Types

type TestAttachment added in v1.0.122

type TestAttachment struct {
	Name                  string
	Path                  string
	Type                  string
	Timestamp             float64
	Activity              string
	UniformTypeIdentifier string
}

type TestCase added in v1.0.122

type TestCase struct {
	ClassName   string
	MethodName  string
	Status      TestCaseStatus
	Err         TestError
	Duration    time.Duration
	Attachments []TestAttachment
}

type TestCaseStatus added in v1.0.122

type TestCaseStatus string

type TestConfig added in v1.0.154

type TestConfig struct {
	// The identifier of the app under test
	BundleId string
	// The identifier of the test runner. For unit tests (non-UI tests) this is also the
	// app under test (BundleId can be left empty) as the .xctest bundle is packaged into the app under test
	TestRunnerBundleId string
	// XctestConfigName is the name of the
	XctestConfigName string
	// Env is passed as environment variables to the test runner
	Env map[string]any
	// Args are passed to the test runner as launch arguments
	Args []string
	// TestsToRun specifies a list of tests that should be executed. All other tests are ignored. To execute all tests
	// pass nil.
	// The format of the values is {PRODUCT_MODULE_NAME}.{CLASS}/{METHOD} where {PRODUCT_MODULE_NAME} and {METHOD} are
	// optional. If {METHOD} is omitted, all tests of {CLASS} are executed
	TestsToRun []string
	// TestsToSkip specifies a list of tests that should be skipped. See TestsToRun for the format
	TestsToSkip []string
	// XcTest needs to be set to true if the TestRunnerBundleId is a unit test and not a UI test
	XcTest bool
	// The device on which the test is executed
	Device ios.DeviceEntry
	// The listener for receiving results
	Listener *TestListener
}

TestConfig specifies the parameters of a test execution

type TestError added in v1.0.122

type TestError struct {
	Message string
	File    string
	Line    uint64
}

type TestListener added in v1.0.122

type TestListener struct {
	TestSuites []TestSuite
	// contains filtered or unexported fields
}

TestListener collects test results from the test execution

func NewTestListener added in v1.0.122

func NewTestListener(logWriter io.Writer, debugLogWriter io.Writer, attachmentsDirectory string) *TestListener

func (*TestListener) Done added in v1.0.122

func (t *TestListener) Done() <-chan struct{}

func (*TestListener) FinishWithError added in v1.0.133

func (t *TestListener) FinishWithError(err error)

func (*TestListener) LogDebugMessage added in v1.0.122

func (t *TestListener) LogDebugMessage(msg string)

func (*TestListener) LogMessage added in v1.0.122

func (t *TestListener) LogMessage(msg string)

func (*TestListener) TestRunnerKilled added in v1.0.122

func (t *TestListener) TestRunnerKilled()

type TestSuite added in v1.0.122

type TestSuite struct {
	Name          string
	StartDate     time.Time
	EndDate       time.Time
	TestDuration  time.Duration
	TotalDuration time.Duration
	TestCases     []TestCase
}

func RunTestWithConfig added in v1.0.154

func RunTestWithConfig(ctx context.Context, testConfig TestConfig) ([]TestSuite, error)

type XCTestManager_DaemonConnectionInterface

type XCTestManager_DaemonConnectionInterface struct {
	IDEDaemonProxy *dtx.Channel
}

type XCTestManager_IDEInterface

type XCTestManager_IDEInterface struct {
	IDEDaemonProxy *dtx.Channel
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL