Skip to content

Enhance TestPlugin and Playwright Tests to Replace Submodel Template #85

Merged
mm-hsh merged 4 commits intodevelopfrom
feature/600-Same-SemanticId-TestPlugin
Mar 26, 2026
Merged

Enhance TestPlugin and Playwright Tests to Replace Submodel Template #85
mm-hsh merged 4 commits intodevelopfrom
feature/600-Same-SemanticId-TestPlugin

Conversation

@mm-hsh
Copy link
Contributor

@mm-hsh mm-hsh commented Mar 25, 2026

Summary
This pull request completes a full migration from the legacy Nameplate and Reliability submodels to the new HandoverDocumentation and CustomSubmodel structures. It updates the TestPlugin, example folder, Playwright tests, configurations, and all related assets to support the new, hierarchical submodel definitions.


Key Changes

  • Replaced the Nameplate and Reliability submodels with:

    • HandoverDocumentation
    • CustomSubmodel
  • Refactored TestPlugin to handle the new submodel types and nested hierarchical structures.

  • Updated the example folder, including:

    • Mock test data
    • AAS XML files
    • Expected JSON outputs
    • API definition updates
  • Updated Playwright tests to reflect new API responses, UI expectations, and validation logic.

  • Refactored all unit tests to align with the new submodel definitions and structural changes.

  • Updated environment and configuration files to support the new model behavior and relationships.

  • Removed all remaining references to the deprecated Nameplate and Reliability submodels across the codebase, data files, and configs.

… Test

Refactored all code, tests, data, and configs to remove the "Nameplate" and "Reliability" submodels, replacing them with "HandoverDocumentation" and "CustomSubmodel". Updated mock data, AAS XML, test cases, expected JSON, API definitions, and environment/configuration files to use the new, more complex and hierarchical submodel structures. This migration enables richer documentation, multilingual support, and flexible asset relationships, and removes all legacy references to the old submodels.
Copilot AI review requested due to automatic review settings March 25, 2026 06:52
@github-actions
Copy link

github-actions bot commented Mar 25, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copy link

Copilot AI left a comment

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 migrates the TestPlugin example assets and Playwright API tests away from the legacy Nameplate and Reliability submodels to the new HandoverDocumentation and CustomSubmodel structures (including hierarchical/nested data).

Changes:

  • Updated example docker-compose + Bruno API collection to use HandoverDocumentation/CustomSubmodel identifiers and requests.
  • Replaced legacy example AAS XML assets (removed Reliability.xml, added CustomAas.xml using CustomSubmodel template semantics).
  • Refactored Playwright tests + expected fixtures and updated DataEngine template mapping configuration.

Reviewed changes

Copilot reviewed 33 out of 35 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
source/AAS.TwinEngine.Plugin.TestPlugin/Example/docker-compose.yml Updates template mappings and shell creation payload to new submodels
source/AAS.TwinEngine.Plugin.TestPlugin/Example/apiCollection/collection.bru Renames variables for new submodel identifiers
source/AAS.TwinEngine.Plugin.TestPlugin/Example/apiCollection/Submodel Repository/Submodel/Get Submodel - Reliability.bru Repurposes Reliability request to CustomSubmodel
source/AAS.TwinEngine.Plugin.TestPlugin/Example/apiCollection/Submodel Repository/Submodel/Get Submodel - Nameplate.bru Removes legacy Nameplate request
source/AAS.TwinEngine.Plugin.TestPlugin/Example/apiCollection/Submodel Repository/Submodel/Get Submodel - HandoverDocumentation.bru Adds HandoverDocumentation request
source/AAS.TwinEngine.Plugin.TestPlugin/Example/apiCollection/Submodel Repository/Submodel Element/Get Submodel Element - Reliability.bru Repurposes Reliability submodel-element request to CustomSubmodel
source/AAS.TwinEngine.Plugin.TestPlugin/Example/apiCollection/Submodel Repository/Submodel Element/Get Submodel Element - Nameplate.bru Repurposes Nameplate submodel-element request to HandoverDocumentation
source/AAS.TwinEngine.Plugin.TestPlugin/Example/apiCollection/Submodel Repository/Submodel Element/Get Submodel Element - Markings.bru Removes legacy Markings request
source/AAS.TwinEngine.Plugin.TestPlugin/Example/apiCollection/Submodel Repository/Serialization/Get appropriate serialization.bru Updates serialization query to new submodel ids
source/AAS.TwinEngine.Plugin.TestPlugin/Example/apiCollection/Submodel Registry/Get Submodel Descriptor By Id.bru Adds timeout setting
source/AAS.TwinEngine.Plugin.TestPlugin/Example/aas/Reliability.xml Removes legacy Reliability example AAS
source/AAS.TwinEngine.Plugin.TestPlugin/Example/aas/CustomAas.xml Adds new CustomSubmodel hierarchical example AAS
source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodel_Reliability_Expected.json Removes Reliability expected fixture
source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodel_Nameplate_Expected.json Updates fixture content (now reflects new model)
source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodelElement_Reliability_ReliabilityCharacteristics_MTTF.json Removes Reliability submodel-element expected fixture
source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodelElement_Nameplate_Markings_Expected.json Removes Nameplate Markings expected fixture
source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodelElement_Nameplate_ManufacturerName_Expected.json Removes Nameplate ManufacturerName expected fixture
source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodelElement_HandoverDocumentation_Documents0_DocumentVersions0_Language0.json Adds HandoverDocumentation nested element expected fixture
source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/TestData/GetSubmodelElement_CustomSubmodel_OperatingConditionsOfReliabilityCharacteristics.json Adds CustomSubmodel collection expected fixture
source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/SubmodelTests.cs Updates tests to target ContactInfo/HandoverDocumentation/CustomSubmodel
source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/SubmodelElementTests.cs Updates element tests to new nested paths and new submodel
source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRepository/SerializationTests.cs Updates serialization test to expect new submodel ids
source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRegistry/TestData/GetSubmodelDescriptorById_Reliability_Expected.json Updates descriptor expected fixture (now reflects new model)
source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRegistry/TestData/GetSubmodelDescriptorById_Nameplate_Expected.json Updates descriptor expected fixture (now reflects new model)
source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/SubmodelRegistry/SubmodelRegistryTests.cs Updates descriptor tests to new submodels
source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/ApiTestBase.cs Updates base64 identifiers to new submodel ids
source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AasRepository/TestData/GetSubmodelRefById_Expected.json Updates expected shell submodel references
source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AasRepository/TestData/GetShellById_Expected.json Updates expected shell submodel references
source/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests/AAS.TwinEngine.Plugin.TestPlugin.PlaywrightTests.csproj Updates copied test fixtures to new filenames
source/AAS.TwinEngine.DataEngine/appsettings.development.json Updates template mapping rules for new submodels
Comments suppressed due to low confidence (2)

source/AAS.TwinEngine.Plugin.TestPlugin/Example/docker-compose.yml:1

  • The SubModel registry host name looks misspelled (sm-template-regisry). If this is intended to point at the submodel template registry service, the typo will prevent the plugin from reaching the registry at runtime. Rename it to the correct service name (e.g., sm-template-registry) to match the declared docker service/network alias.
    source/AAS.TwinEngine.DataEngine/appsettings.development.json:47
  • The PR description says all references to deprecated Nameplate were removed, but the development configuration still maps a template pattern containing \"Nameplate\". If Nameplate is truly deprecated, update/remove this mapping (or rename the pattern to the new submodel name) to keep configuration consistent with the migration.
      {
        "templateId": "https://admin-shell.io/idta/SubmodelTemplate/DigitalNameplate/3/0",
        "pattern": [ "Nameplate" ]
      },

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Replaced empty "IsPartOf" and "HasPart" objects with nested structures providing explicit relationship data for submodels 000-001, 000-002, and 000-003. This enhances the representation of hierarchical links between submodels and their elements.
mm-asha
mm-asha previously approved these changes Mar 26, 2026
@mm-hsh mm-hsh requested a review from mcn-mm March 26, 2026 06:33
Updated "ModelReference" key values in GetSubmodel_CustomSubmodel_Expected.json to reference submodels with version 000-003, replacing previous references to 000-001 and 000-002. This ensures the JSON structure points to the latest submodel versions.
@sonarqubecloud
Copy link

@github-actions
Copy link

Test & Coverage Report

Test Results Summary

Metric Count
✅ Passed 1019
❌ Failed 0
⏭️ Skipped 0

View Detailed Test Results


Code Coverage

Unit Tests Coverage

Package Line Rate Branch Rate Complexity Health
AAS.TwinEngine.DataEngine 91% 83% 1504
Summary 91% (2551 / 2801) 83% (1075 / 1295) 1504

Minimum allowed line rate is 80%

Module Tests Coverage

Package Line Rate Branch Rate Complexity Health
AAS.TwinEngine.DataEngine 56% 42% 1504
Summary 56% (1566 / 2801) 42% (542 / 1295) 1504

@mm-hsh mm-hsh merged commit aceebeb into develop Mar 26, 2026
10 checks passed
@mm-hsh mm-hsh deleted the feature/600-Same-SemanticId-TestPlugin branch March 26, 2026 11:24
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.

4 participants