Adds CLI based test engine#533
Merged
Merged
Conversation
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a CLI-driven “test engine” to run infrastructure integration tests against configurable endpoints (local or external) and refactors several integration test suites to derive their base URLs from environment variables (with localhost defaults), improving flexibility in local development and CI.
Changes:
- Added
scripts/test-engine.mjsCLI to run a selected integration suite + OpenAPI coverage validation and emit reports (console/json/junit/markdown). - Introduced
getIntegrationBasePathto resolve component base URLs from env vars (with normalized trailing slashes) and updated multiple infra integration test suites to use it. - Updated CI global setup/teardown to optionally skip Docker lifecycle management when running in “test engine” mode (or when explicitly configured).
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/integration-tests/testEngineConfig.ts | New helper to resolve per-component base URLs from env vars with localhost defaults. |
| src/integration-tests/aasRepo.integration.test.ts | Uses getIntegrationBasePath('aasRepository') instead of hard-coded localhost basePath. |
| src/integration-tests/submodelRepo.integration.test.ts | Uses getIntegrationBasePath('submodelRepository') instead of hard-coded localhost basePath. |
| src/integration-tests/conceptDescriptionRepo.integration.test.ts | Uses getIntegrationBasePath('conceptDescriptionRepository') instead of hard-coded localhost basePath. |
| src/integration-tests/aasRegistry.integration.test.ts | Uses getIntegrationBasePath('aasRegistry') instead of hard-coded localhost basePath. |
| src/integration-tests/submodelRegistry.integration.test.ts | Uses getIntegrationBasePath('submodelRegistry') instead of hard-coded localhost basePath. |
| src/integration-tests/aasDiscovery.integration.test.ts | Uses getIntegrationBasePath('aasDiscovery') instead of hard-coded localhost basePath. |
| src/integration-tests/aasxFile.integration.test.ts | Uses getIntegrationBasePath('aasxFileServer') instead of hard-coded localhost basePath. |
| scripts/test-engine.mjs | New CLI runner to execute a component’s integration test file + OpenAPI coverage and emit reports. |
| README.md | Documents the new test engine usage, options, and report behavior. |
| package.json | Adds test:engine and test:engine:list-components scripts. |
| ci/globalSetup.ts | Skips docker lifecycle when test engine mode / skip flag is set. |
| ci/globalTeardown.ts | Skips docker lifecycle when test engine mode / skip flag is set. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <copilot@github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new CLI test engine for infrastructure integration tests and refactors the integration test configuration to support flexible endpoint targeting. The changes improve how integration tests determine their target endpoints, allowing for easier local and CI usage, and add scripts and documentation for the new test engine. Additionally, the CI setup and teardown scripts are updated to optionally skip Docker lifecycle management when using the test engine.
Integration Test Engine and Related Scripts:
README.md, and scripts are added topackage.jsonfor running and listing components. [1] [2]Integration Test Configuration Refactor:
getIntegrationBasePathandInfrastructureComponentin the newsrc/integration-tests/testEngineConfig.ts, allowing integration tests to dynamically determine their endpoint URLs from environment variables or defaults.getIntegrationBasePathfor endpoint configuration, enabling flexible targeting without code changes. [1] [2] [3] [4] [5] [6] [7] [8] [9]CI and Docker Lifecycle Improvements:
ci/globalSetup.tsandci/globalTeardown.tsto skip Docker setup/teardown when running in test engine mode or when explicitly configured, improving compatibility with external endpoints and CI environments. [1] [2] [3]