Skip to content

Adds CLI based test engine#533

Merged
aaronzi merged 5 commits into
eclipse-basyx:mainfrom
aaronzi:main
May 5, 2026
Merged

Adds CLI based test engine#533
aaronzi merged 5 commits into
eclipse-basyx:mainfrom
aaronzi:main

Conversation

@aaronzi

@aaronzi aaronzi commented May 5, 2026

Copy link
Copy Markdown
Member

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:

  • Added a CLI test engine for infrastructure integration tests, supporting multiple output formats, strict known-issues mode, and custom artifact directories. Usage and behavior are documented in README.md, and scripts are added to package.json for running and listing components. [1] [2]

Integration Test Configuration Refactor:

  • Introduced getIntegrationBasePath and InfrastructureComponent in the new src/integration-tests/testEngineConfig.ts, allowing integration tests to dynamically determine their endpoint URLs from environment variables or defaults.
  • Refactored all integration test suites to use getIntegrationBasePath for endpoint configuration, enabling flexible targeting without code changes. [1] [2] [3] [4] [5] [6] [7] [8] [9]

CI and Docker Lifecycle Improvements:

  • Updated ci/globalSetup.ts and ci/globalTeardown.ts to 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]

aaronzi and others added 4 commits May 5, 2026 10:05
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.mjs CLI to run a selected integration suite + OpenAPI coverage validation and emit reports (console/json/junit/markdown).
  • Introduced getIntegrationBasePath to 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.

Comment thread scripts/test-engine.mjs
Comment thread ci/globalSetup.ts Outdated
Comment thread ci/globalTeardown.ts Outdated
Comment thread src/integration-tests/testEngineConfig.ts
Comment thread scripts/test-engine.mjs
Co-authored-by: Copilot <copilot@github.com>
@aaronzi aaronzi merged commit 1245b8c into eclipse-basyx:main May 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants