{"id":50194545,"url":"https://github.com/openmcp-project/platform-service-test-runner","last_synced_at":"2026-05-25T16:30:57.514Z","repository":{"id":354152956,"uuid":"1155194467","full_name":"openmcp-project/platform-service-test-runner","owner":"openmcp-project","description":"Platform-service-testrunner allows to define and run in-cluster tests on the openMCP clusters","archived":false,"fork":false,"pushed_at":"2026-05-22T10:38:14.000Z","size":171,"stargazers_count":0,"open_issues_count":11,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-22T16:53:03.806Z","etag":null,"topics":["apeirora","opencontrolplane","platform-service"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openmcp-project.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-11T08:27:20.000Z","updated_at":"2026-05-20T08:03:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/openmcp-project/platform-service-test-runner","commit_stats":null,"previous_names":["openmcp-project/platform-service-test-runner"],"tags_count":6,"template":false,"template_full_name":"openmcp-project/repository-template","purl":"pkg:github/openmcp-project/platform-service-test-runner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openmcp-project%2Fplatform-service-test-runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openmcp-project%2Fplatform-service-test-runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openmcp-project%2Fplatform-service-test-runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openmcp-project%2Fplatform-service-test-runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openmcp-project","download_url":"https://codeload.github.com/openmcp-project/platform-service-test-runner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openmcp-project%2Fplatform-service-test-runner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33483728,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-25T14:31:05.219Z","status":"ssl_error","status_checked_at":"2026-05-25T14:31:02.878Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apeirora","opencontrolplane","platform-service"],"created_at":"2026-05-25T16:30:56.641Z","updated_at":"2026-05-25T16:30:57.508Z","avatar_url":"https://github.com/openmcp-project.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![REUSE status](https://api.reuse.software/badge/github.com/openmcp-project/platform-service-test-runner)](https://api.reuse.software/info/github.com/openmcp-project/platform-service-test-runner)\n\n# platform-service-test-runner\n\n## About this project\n\nPlatform-service-test-runner allows to define and run in-cluster tests on the openMCP clusters. It provides a framework for creating end-to-end tests that can be executed as Kubernetes resources.\n\n## Architecture\n\n### E2ETestSpecification\nThe `E2ETestSpecification` custom resource defines a set of test cases and its configuration. It creates an `E2ETestRun` resource to execute the tests defined in the specification. \n```yaml\napiVersion: test-runner.openmcp.cloud/v1alpha1\nkind: E2ETestSpecification\nmetadata:\n  name: test-spec\nspec:\n  # optional cron schedule for periodic test execution. \n  # Defaults to @daily if not specified.\n  schedule: \"0 0 * * *\" \n  testCases:\n    - name: createProject\n      config: {}\n    - name: createWorkspace\n      config: {}\n    - name: createManagedControlPlaneV2\n      config: {}\n```\n\n#### Test case configuration\nEach test case in the `E2ETestSpecification` can have its own configuration, which is passed to the test case implementation when it is executed.\n\nCurrently, the following configuration keys exist:\n\n| Key | Used by | Description |\n| --- | --- | --- |\n| `chargingTarget` | `createProject` | Specifies the charging target for the project. Value should be a UUID. |\n| `chargingTargetType` | `createProject` | Specifies the type of the charging target for the project. |\n| `identity` | All test cases | Automatically added by the controller, contains the username retrieved via `authenticationv1.SelfSubjectReview{}`. |\n| `pollInterval` | All test cases | Polling interval for waiting for conditions. Duration string (e.g., \"30s\"). Defaults to 10 seconds if not specified. |\n| `pollTimeout` | All test cases | Polling timeout for waiting for conditions. Duration string (e.g., \"5m\"). Defaults to 5 minutes if not specified. |\n\n\n\n### E2ETestRun\nThe `E2ETestRun` custom resource represents a test execution. \nIt is created by the `e2etestspecification_controller.go` controller when an `E2ETestSpecification` is created and a new test run needs to be started (based on the schedule).\nIt contains the status of the test execution, including which test cases have been executed, their results, and any exports they produced for subsequent test cases.\nThis resource is not deleted after the test execution, but remains in the cluster for inspection and debugging purposes. \nExample:\n```yaml\napiVersion: test-runner.openmcp.cloud/v1alpha1\nkind: E2ETestRun\nmetadata:\n  labels:\n    test-runner.openmcp.cloud/specification: test-create-p-w-m\n  name: run-1772628360009\nspec:\n  runner:\n    version: 0.0.1-dev\n  testcases:\n    - config:\n        chargingTarget: 12345678-1234-1234-1234-123456789012\n        chargingTargetType: btp\n      name: createProject\n    - name: createWorkspace\n    - config:\n        pollInterval: 20s\n        pollTimeout: 15m\n      name: createManagedControlPlaneV2\n      \nstatus:\n  testCases:\n    - conditions:\n        - lastTransitionTime: \"2026-03-04T13:01:04Z\"\n          message: Test case cleanup completed successfully\n          reason: CleanupSuccess\n          status: \"True\"\n          type: CleanupCompleted\n        - lastTransitionTime: \"2026-03-04T12:59:54Z\"\n          message: Test case run completed successfully\n          reason: TestPassed\n          status: \"True\"\n          type: RunCompleted\n      exports:\n        project.name: run-1772628360009-p\n        project.status.namespace: project-run-1772628360009-p\n      name: createProject\n    - conditions:\n        - lastTransitionTime: \"2026-03-04T13:00:54Z\"\n          message: Test case cleanup completed successfully\n          reason: CleanupSuccess\n          status: \"True\"\n          type: CleanupCompleted\n        - lastTransitionTime: \"2026-03-04T13:00:04Z\"\n          message: Test case run completed successfully\n          reason: TestPassed\n          status: \"True\"\n          type: RunCompleted\n      exports:\n        workspace.name: run-1772628360009-ws\n        workspace.namespace: project-run-1772628360009-p\n        workspace.status.namespace: project-run-1772628360009-p--ws-run-1772628360009-ws\n      name: createWorkspace\n    - conditions:\n        - lastTransitionTime: \"2026-03-04T13:00:44Z\"\n          message: Test case cleanup completed successfully\n          reason: CleanupSuccess\n          status: \"True\"\n          type: CleanupCompleted\n        - lastTransitionTime: \"2026-03-04T13:00:14Z\"\n          message: Test case run completed successfully\n          reason: TestPassed\n          status: \"True\"\n          type: RunCompleted\n      exports:\n        mcp.name: run-1772628360009-mcpv2\n        mcp.namespace: project-run-1772628360009-p--ws-run-1772628360009-ws\n      name: createManagedControlPlaneV2\n```\n\n## Implementing New Test Cases\n\n### TestCase Interface\n\nAll test cases must implement the `TestCase` interface defined in `internal/runner/testcase.go`:\n\n```go\ntype TestCase interface {\n  Run(ctx context.Context, testRun *v1alpha1.E2ETestRun, config Config) (Exports, DebugInfo, error)\n  Cleanup(ctx context.Context, testRun *v1alpha1.E2ETestRun, config Config) error\n}\n```\n\n- **Run**: Executes the test case. Returns exports (key-value pairs for subsequent tests), error details, and error.\n- **Cleanup**: Performs cleanup after the test (e.g., delete created resources).\n\n### Example Implementation\n\n```go\ntype MyTestCase struct {\n    // Add any dependencies or clients needed for the test case here, e.g. Kubernetes client, specific service clients, etc.\n    Client client.Client\n}\n\nfunc (t *MyTestCase) Run(ctx context.Context, testRun *v1alpha1.E2ETestRun, config Config (Exports, DebugInfo, error) {\n    // Use testRun to access status and exports from previous test cases. \n    status := util.GetStatus(testRun, \"previousTestCaseName\")\n    exports := status.Exports\n    // Use config to access test case specific configuration.\n    // By default, the controller is adding a key `identity` to the config, which is its own username retrieved via authenticationv1.SelfSubjectReview{}\n    // Implement the test logic here, e.g. create resources, wait for conditions, etc.\n    // Create own Exports to be used by subsequent test cases.\n    return Exports{}, DebugInfo{}, nil\n}\n\nfunc (t *MyTestCase) Cleanup(ctx context.Context, testRun *v1alpha1.E2ETestRun, config Config) error {\n    // Clean up any resources created during Run()\n    return nil\n}\n```\n\n## Registering Test Cases\n\nTest cases must be registered with the `TestRegistry` to be discoverable by the controller. Use `NewTestRegistry()` to create a registry instance.\nCurrently, test cases are registered in `cmd/plaform-service-test-runner/app/run.go`:\n```go\ntestRegistry := runner.NewTestRegistry()\n// register test cases here\ntestRegistry.RegisterTestCase(\"createProject\", \u0026runner.CreateProjectTest{OnboardingClient: onboardingCluster.Client()})\ntestRegistry.RegisterTestCase(\"createWorkspace\", \u0026runner.CreateWorkspaceTest{OnboardingClient: onboardingCluster.Client()})\ntestRegistry.RegisterTestCase(\"createManagedControlPlaneV2\", \u0026runner.CreateMcpTest{OnboardingClient: onboardingCluster.Client()})\n```\n\n## Requirements and Setup\n\nIn combination with the openMCP Operator, this controller can be deployed via a simple k8s resource:\n\n```yaml\napiVersion: openmcp.cloud/v1alpha1\nkind: PlatformService\nmetadata:\n  name: test-runner\nspec:\n  image: ghcr.io/openmcp-project/images/platform-service-test-runner:v0.0.1\n```\n\nTo run it locally, run\n```shell\ngo run ./cmd/platform-service-test-runner/main.go init --environment default --provider-name test-runner --kubeconfig path/to/kubeconfig\n```\nto deploy the CRDs that are required for the controller and then\n```shell\ngo run ./cmd/platform-service-test-runner/main.go run --environment default --provider-name test-runner --kubeconfig path/to/kubeconfig\n```\n\n## Support, Feedback, Contributing\n\nThis project is open to feature requests/suggestions, bug reports etc. via [GitHub issues](https://github.com/openmcp-project/platform-service-test-runner/issues). Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our [Contribution Guidelines](CONTRIBUTING.md).\n\n## Security / Disclosure\nIf you find any bug that may be a security problem, please follow our instructions at [in our security policy](https://github.com/openmcp-project/platform-service-test-runner/security/policy) on how to report it. Please do not create GitHub issues for security-related doubts or problems.\n\n## Code of Conduct\n\nWe as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its [Code of Conduct](https://github.com/SAP/.github/blob/main/CODE_OF_CONDUCT.md) at all times.\n\n## Licensing\n\nCopyright 2026 SAP SE or an SAP affiliate company and platform-service-test-runner contributors. Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available [via the REUSE tool](https://api.reuse.software/info/github.com/openmcp-project/platform-service-test-runner).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenmcp-project%2Fplatform-service-test-runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenmcp-project%2Fplatform-service-test-runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenmcp-project%2Fplatform-service-test-runner/lists"}