pk-testkit

module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: Apache-2.0

README

pk-testkit

Go Reference CI

Composable, adapter-neutral conformance contracts for the OSS PlatformKit family. pk-testkit lets module authors and app teams prove public claims, run API flows, and validate requirement-to-flow coverage without binding to a specific browser, database, container runtime, or hosted CI service. Downstream distributions can adapt the same contracts to Playwright, Kubernetes, SaaS smoke tests, or private E2E harnesses.

Install

go get github.com/septagon-oss/pk-testkit@v0.1.0

Usage

package main

import (
	"context"
	"fmt"

	"github.com/septagon-oss/pk-testkit/pkg/conformance"
)

func main() {
	suite, err := conformance.NewSuite(conformance.Check{
		ID:            "runtime.ready",
		RequirementID: "REQ-READY",
		Description:   "runtime reports ready",
		Run: func(context.Context) (conformance.Result, error) {
			return conformance.Pass("runtime is ready"), nil
		},
	})
	if err != nil {
		panic(err)
	}

	report := suite.Run(context.Background())
	fmt.Println(report.Status, report.OK())
}

Current Surface

  • pkg/conformance: deterministic checks and reports for runtime/module conformance.
  • pkg/flowtest: requirement-to-flow coverage validation using pk-shared flow definitions.
  • pkg/apitest: standard-library API flow runner over an http.Handler.

Verify

make verify   # go test + go vet + staticcheck + race

License

Apache-2.0. See LICENSE.

Directories

Path Synopsis
pkg
apitest
Package apitest executes API flow definitions against an http.Handler.
Package apitest executes API flow definitions against an http.Handler.
conformance
Package conformance runs deterministic platform conformance checks.
Package conformance runs deterministic platform conformance checks.
flowtest
Package flowtest validates requirement-to-flow coverage.
Package flowtest validates requirement-to-flow coverage.

Jump to

Keyboard shortcuts

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