Documentation
¶
Overview ¶
Package stablekarate reproduces the legacy DIA component tool's launch_tests step: it runs the test-launcher-back (Karate) STABLE image on the host network against the already-running app and mocks, mounting the feature files and writing the HTML report to the host, and can open that report in a browser.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DockerClient ¶
type DockerClient interface {
EnsureImage(ctx context.Context, image string) error
CreateContainer(ctx context.Context, cfg *docker.ContainerConfig) (string, error)
StartContainer(ctx context.Context, id string) error
WaitForContainer(ctx context.Context, id string, condition container.WaitCondition) error
InspectContainer(ctx context.Context, id string) (*dockertypes.ContainerJSON, error)
GetContainerLogs(ctx context.Context, id string, tail int) (string, error)
RemoveContainer(ctx context.Context, id string, force bool) error
}
DockerClient is the subset of *docker.Client used by the runner.
type Options ¶
type Options struct {
Image string // defaults to the STABLE test-launcher-back image
Tags string
UrlsToBlock string
FeaturesPath string // defaults to test/component/features
ReportsPath string // defaults to test/component/reports
Open bool // open the HTML report when the run finishes
}
Options configures a Karate run.
type Result ¶
type Result struct {
Passed bool
ExitCode int
ReportPath string // path to the HTML summary, if generated
Duration time.Duration
}
Result is the outcome of a Karate run.
Click to show internal directories.
Click to hide internal directories.