From 025699e30221d4defbe5a3458f9540e784ddb3ac Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Thu, 6 Jun 2024 16:32:55 +0200 Subject: [PATCH 01/26] chore(tests):[#529] Correct typo in javadoc --- .../tractusx/irs/data/LocalTestDataConfiguration.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/irs-models/src/main/java/org/eclipse/tractusx/irs/data/LocalTestDataConfiguration.java b/irs-models/src/main/java/org/eclipse/tractusx/irs/data/LocalTestDataConfiguration.java index 0d1c64d635..053954ff4f 100644 --- a/irs-models/src/main/java/org/eclipse/tractusx/irs/data/LocalTestDataConfiguration.java +++ b/irs-models/src/main/java/org/eclipse/tractusx/irs/data/LocalTestDataConfiguration.java @@ -33,9 +33,11 @@ import org.springframework.context.annotation.Profile; /** - * Local spring configuration for loading test data from resrouces. + * Local spring configuration for loading test data from resources. */ -@Profile({ "local", "stubtest" }) +@Profile({ "local", + "stubtest" +}) @Configuration @RequiredArgsConstructor public class LocalTestDataConfiguration { From ec5b48fdce82ac2ccc74299d10b7e2eea1a269b5 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Mon, 10 Jun 2024 12:34:12 +0200 Subject: [PATCH 02/26] chore(tests):[#529] Add cucumber test file --- .../529-e2e-version-compatibility.feature | 191 ++++++++++++++++++ 1 file changed, 191 insertions(+) create mode 100644 irs-cucumber-tests/src/test/resources/features_new/529-e2e-version-compatibility.feature diff --git a/irs-cucumber-tests/src/test/resources/features_new/529-e2e-version-compatibility.feature b/irs-cucumber-tests/src/test/resources/features_new/529-e2e-version-compatibility.feature new file mode 100644 index 0000000000..0e02d27119 --- /dev/null +++ b/irs-cucumber-tests/src/test/resources/features_new/529-e2e-version-compatibility.feature @@ -0,0 +1,191 @@ +Feature: [TESTING] Integration E2E Tests for backward compatibility (Happy + Unhappy Path) #529 (copied from TRI-891) + + Background: + Given the IRS URL "https://irs.dev.demo.catena-x.net" + And the admin user api key + + + ###################################################################################################################### + ## SingleLevelBomAsPlanned + ###################################################################################################################### + + # SINGLE_LEVEL_BOM_AS_PLANNED("SingleLevelBomAsPlanned", SingleLevelBomAsPlanned.class, BomLifecycle.AS_PLANNED, +# Direction.DOWNWARD), +# SingleLevelBomAsPlanned [ 2.0.0; 3.0.0 ] - Model version + + Scenario: SingleLevelBomAsPlanned current version (3.0.0) + Given I register an IRS job for globalAssetId "urn:uuid:68904173-ad59-4a77-8412-3e73fcafbd8b" and BPN "BPNL00000003AVTH" + And collectAspects "true" + And depth 10 + + # SingleLevelBomAsPlanned (see RelationshipAspect) + And direction "downward" + And bomLifecycle "asPlanned" + + When I get the job-id + Then I check, if the job has status "COMPLETED" within 20 minutes + And I check, if "relationships" are equal to "529-single-level-bom-as-planned-3-0-0-expected-relationships.json" + And I check, if "submodels" are equal to "529-single-level-bom-as-planned-3-0-0-expected-submodels.json" + + + Scenario: SingleLevelBomAsPlanned old version (2.0.0) + Given I register an IRS job for globalAssetId "urn:uuid:4c1c49a2-3692-4977-aa46-352e668eee3c" and BPN "BPNL00000003AVTH" + And collectAspects "true" + And depth 10 + + # SingleLevelBomAsPlanned (see RelationshipAspect) + And direction "downward" + And bomLifecycle "asPlanned" + + When I get the job-id + Then I check, if the job has status "COMPLETED" within 20 minutes + And I check, if "relationships" are equal to "529-single-level-bom-as-planned-2-0-0-expected-relationships.json" + And I check, if "submodels" are equal to "529-single-level-bom-as-planned-2-0-0-expected-submodels.json" + + + Scenario: SingleLevelBomAsPlanned future version (3.1.0) + Given I register an IRS job for globalAssetId "urn:uuid:4e1b052b-4514-4ebe-a440-fc2728c07944" and BPN "BPNL00000003AVTH" + And collectAspects "true" + And depth 10 + + # SingleLevelBomAsPlanned (see RelationshipAspect) + And direction "downward" + And bomLifecycle "asPlanned" + + When I get the job-id + Then I check, if the job has status "COMPLETED" within 20 minutes + And I check, if "relationships" are equal to "529-single-level-bom-as-planned-3-1-0-expected-relationships.json" + And I check, if "submodels" are equal to "529-single-level-bom-as-planned-3-1-0-expected-submodels.json" + + + ###################################################################################################################### + ## SingleLevelBomAsBuilt + ###################################################################################################################### + + # SINGLE_LEVEL_BOM_AS_BUILT("SingleLevelBomAsBuilt", SingleLevelBomAsBuilt.class, BomLifecycle.AS_BUILT, + # Direction.DOWNWARD), + # SingleLevelBomAsBuilt [ 2.0.0; 3.0.0 ] - Model version + + Scenario: SingleLevelBomAsBuilt current version (3.0.0) + Given I register an IRS job for globalAssetId "urn:uuid:15cf842e-b20e-4219-a61b-99c01cec42ea" and BPN "BPNL00000003AVTH" + And collectAspects "true" + And depth 10 + + # SingleLevelBomAsBuilt (see RelationshipAspect) + And direction "downward" + And bomLifecycle "asBuilt" + + When I get the job-id + Then I check, if the job has status "COMPLETED" within 20 minutes + And I check, if "relationships" are equal to "529-single-level-bom-as-built-3-0-0-expected-relationships.json" + And I check, if "submodels" are equal to "529-single-level-bom-as-built-3-0-0-expected-submodels.json" + + + Scenario: SingleLevelBomAsBuilt old version (2.0.0) + Given I register an IRS job for globalAssetId "urn:uuid:15cf842e-b20e-4219-a61b-99c01cec42ea" and BPN "BPNL00000003AVTH" + And collectAspects "true" + And depth 10 + + # SingleLevelBomAsBuilt (see RelationshipAspect) + And direction "downward" + And bomLifecycle "asBuilt" + + When I get the job-id + Then I check, if the job has status "COMPLETED" within 20 minutes + And I check, if "relationships" are equal to "529-single-level-bom-as-built-2-0-0-expected-relationships.json" + And I check, if "submodels" are equal to "529-single-level-bom-as-built-2-0-0-expected-submodels.json" + + + Scenario: SingleLevelBomAsBuilt future version (3.1.0) + Given I register an IRS job for globalAssetId "urn:uuid:a660bcd7-3f27-4a89-a2ef-bf90006e6b68" and BPN "BPNL00000003AVTH" + And collectAspects "true" + And depth 10 + + # SingleLevelBomAsBuilt (see RelationshipAspect) + And direction "downward" + And bomLifecycle "asBuilt" + + When I get the job-id + Then I check, if the job has status "COMPLETED" within 20 minutes + And I check, if "relationships" are equal to "529-single-level-bom-as-built-3-1-0-expected-relationships.json" + And I check, if "submodels" are equal to "529-single-level-bom-as-built-3-1-0-expected-submodels.json" + + + + ###################################################################################################################### + ## SingleLevelUsageAsBuilt + ###################################################################################################################### + +# SINGLE_LEVEL_USAGE_AS_BUILT("SingleLevelUsageAsBuilt", SingleLevelUsageAsBuilt.class, BomLifecycle.AS_BUILT, +# Direction.UPWARD); +# SingleLevelUsageAsBuilt 3.0.0 - Model version + + Scenario: SingleLevelUsageAsBuilt current version (3.0.0) + Given I register an IRS job for globalAssetId "urn:uuid:15cf842e-b20e-4219-a61b-99c01cec42ea" and BPN "BPNL00000003AVTH" + And collectAspects "true" + And depth 10 + + # SingleLevelUsageAsBuilt (see RelationshipAspect) + And direction "upward" + And bomLifecycle "asBuilt" + + When I get the job-id + Then I check, if the job has status "COMPLETED" within 20 minutes + And I check, if "relationships" are equal to "529-single-level-usage-as-built-3-0-0-expected-relationships.json" + And I check, if "submodels" are equal to "529-single-level-usage-as-built-3-0-0-expected-submodels.json" + + + Scenario: SingleLevelUsageAsBuilt future version (3.1.0) + Given I register an IRS job for globalAssetId "urn:uuid:a660bcd7-3f27-4a89-a2ef-bf90006e6b68" and BPN "BPNL00000003AVTH" + And collectAspects "true" + And depth 10 + + # SingleLevelUsageAsBuilt (see RelationshipAspect) + And direction "upward" + And bomLifecycle "asBuilt" + + When I get the job-id + Then I check, if the job has status "COMPLETED" within 20 minutes + And I check, if "relationships" are equal to "529-single-level-usage-as-built-3-1-0-expected-relationships.json" + And I check, if "submodels" are equal to "529-single-level-usage-as-built-3-1-0-expected-submodels.json" + + + + ###################################################################################################################### + ## SingleLevelBomAsSpecified + ###################################################################################################################### + +# SINGLE_LEVEL_BOM_AS_SPECIFIED("SingleLevelBomAsSpecified", SingleLevelBomAsSpecified.class, BomLifecycle.AS_SPECIFIED, +# Direction.DOWNWARD) +# SingleLevelBomAsSpecified 1.0.0 - Model version + + + Scenario: SingleLevelBomAsSpecified current version (1.0.0) + Given I register an IRS job for globalAssetId "urn:uuid:15cf842e-b20e-4219-a61b-99c01cec42ea" and BPN "BPNL00000003AVTH" + And collectAspects "true" + And depth 10 + + # SingleLevelBomAsSpecified (see RelationshipAspect) + And direction "downward" + And bomLifecycle "asSpecified" + + When I get the job-id + Then I check, if the job has status "COMPLETED" within 20 minutes + And I check, if "relationships" are equal to "529-single-level-bom-as-specified-3-0-0-expected-relationships.json" + And I check, if "submodels" are equal to "529-single-level-bom-as-specified-3-0-0-expected-submodels.json" + + + Scenario: SingleLevelBomAsSpecified future version (1.1.0) + Given I register an IRS job for globalAssetId "urn:uuid:a660bcd7-3f27-4a89-a2ef-bf90006e6b68" and BPN "BPNL00000003AVTH" + And collectAspects "true" + And depth 10 + + # SingleLevelBomAsSpecified (see RelationshipAspect) + And direction "downward" + And bomLifecycle "asSpecified" + + When I get the job-id + Then I check, if the job has status "COMPLETED" within 20 minutes + And I check, if "relationships" are equal to "529-single-level-bom-as-specified-3-1-0-expected-relationships.json" + And I check, if "submodels" are equal to "529-single-level-bom-as-specified-3-1-0-expected-submodels.json" + From 34a05fd6fbb54dce03556b444149c7f05b8b93e1 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 12 Jun 2024 13:53:28 +0200 Subject: [PATCH 03/26] chore(docs):[#529] Add semantic model links to documentation --- COMPATIBILITY_MATRIX.md | 28 +++++++++---------- ...#212-Update-SingleLevelBomAsBuilt-2-0-0.md | 2 +- docs/src/docs/arc42/glossary.adoc | 2 +- .../introduction-goals/requirements.adoc | 2 +- .../irs-iterative/scenario-2.adoc | 2 +- .../scope-context/technical-context.adoc | 2 +- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/COMPATIBILITY_MATRIX.md b/COMPATIBILITY_MATRIX.md index 89a9fdce32..a420848fe8 100644 --- a/COMPATIBILITY_MATRIX.md +++ b/COMPATIBILITY_MATRIX.md @@ -4,20 +4,20 @@ Full changelog of IRS: [changelog](CHANGELOG.md) ## [Unreleased] -| Dependency | Version | Helm | Comments | -|---------------------------|------------------------------|-------|-----------------| -| EDC | 0.7.0 | 0.7.0 | | -| Semantics Hub | 0.3.1 | 0.2.1 | REST connection | -| DTR | 0.4.1 | 0.4.9 | REST connection | -| Discovery Finder | 0.2.5 | - | REST connection | -| Minio | RELEASE.2022-11-11T03-44-20Z | 5.0.1 | | -| Helm | 3.9.3 | - | - | -| Kubernetes | 1.29 | - | - | -| SingleLevelBomAsBuilt | [ 2.0.0; 3.0.0 ] | - | Model version | -| SingleLevelBomAsPlanned | [ 2.0.0; 3.0.0 ] | - | Model version | -| SingleLevelBomAsSpecified | 2.0.0 | - | Model version | -| SingleLevelUsageAsBuilt | 3.0.0 | - | Model version | -| SingleLevelUsageAsPlanned | 2.0.0 | - | Model version | +| Dependency | Version | Helm | Comments | +|-----------------------------------------------------------------------------------------------------------------------------------------------|------------------------------|-------|-----------------| +| EDC | 0.7.0 | 0.7.0 | | +| Semantics Hub | 0.3.1 | 0.2.1 | REST connection | +| DTR | 0.4.1 | 0.4.9 | REST connection | +| Discovery Finder | 0.2.5 | - | REST connection | +| Minio | RELEASE.2022-11-11T03-44-20Z | 5.0.1 | | +| Helm | 3.9.3 | - | - | +| Kubernetes | 1.29 | - | - | +| [SingleLevelBomAsBuilt](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_bom_as_built) | [ 2.0.0; 3.0.0 ] | - | Model version | +| [SingleLevelBomAsPlanned](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_bom_as_planned) | [ 2.0.0; 3.0.0 ] | - | Model version | +| [SingleLevelBomAsSpecified](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_bom_as_specified) | 2.0.0 | - | Model version | +| [SingleLevelUsageAsBuilt](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_usage_as_built) | 3.0.0 | - | Model version | +| [SingleLevelUsageAsPlanned](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_usage_as_planned) | 2.0.0 | - | Model version | ## [CATENA-X Release 24.05](https://eclipse-tractusx.github.io/CHANGELOG/) - [5.1.3](https://github.com/eclipse-tractusx/item-relationship-service/releases/tag/5.1.3) - 2024-05-17 diff --git a/docs/concept/#212-Update-of-aspect-model-SingleLevelBomAsBuilt-2_0_0/#212-Update-SingleLevelBomAsBuilt-2-0-0.md b/docs/concept/#212-Update-of-aspect-model-SingleLevelBomAsBuilt-2_0_0/#212-Update-SingleLevelBomAsBuilt-2-0-0.md index b2f4a4389a..13afd8ad7a 100644 --- a/docs/concept/#212-Update-of-aspect-model-SingleLevelBomAsBuilt-2_0_0/#212-Update-SingleLevelBomAsBuilt-2-0-0.md +++ b/docs/concept/#212-Update-of-aspect-model-SingleLevelBomAsBuilt-2_0_0/#212-Update-SingleLevelBomAsBuilt-2-0-0.md @@ -2,7 +2,7 @@ # Problem Statement -SingleLevelBomAsBuilt 2.0.0 introduces a new boolean property `hasAlternatives`. +[SingleLevelBomAsBuilt 2.0.0](https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_bom_as_built/2.0.0) introduces a new boolean property `hasAlternatives`. The model now allows to reference items that are not available as AsBuilt Twins - (e.g. Serial items or batches) but as AsPlanned twins. Sometimes, however, it is not known what exact AsPlanned twin is needed to build the BoM asBuilt because there are different alternative twins to choose from. In that case, all potential alternatives have to be referenced. To indicate that ambiguity, the property "hasAlternative" has been added to the aspect model. diff --git a/docs/src/docs/arc42/glossary.adoc b/docs/src/docs/arc42/glossary.adoc index a1753da1e1..d23ffbf1a9 100644 --- a/docs/src/docs/arc42/glossary.adoc +++ b/docs/src/docs/arc42/glossary.adoc @@ -35,6 +35,6 @@ https://github.com/eclipse-tractusx/ssi-docu/blob/main/docs/architecture/cx-3-2/ |Shell | | see "Asset Administration Shell" |Traversal Aspect | | aka Edge: Aspect which the IRS uses for traversal through the data chain. Identified by a parent-child or a child-parent relationship. -Samples: SingleLevelBomAsPlanned, SingleLevelBomAsBuilt and SingleLevelUsageAsBuilt +Samples: https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_bom_as_planned[SingleLevelBomAsPlanned], https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_bom_as_built[SingleLevelBomAsBuilt] and https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_usage_as_built[SingleLevelUsageAsBuilt] |Verifiable Credential | VC | For more information see: https://github.com/eclipse-tractusx/ssi-docu/tree/main/docs/architecture/cx-3-2/3.%20Verifiable%20Credentials[Verifiable Credentials] |=== \ No newline at end of file diff --git a/docs/src/docs/arc42/introduction-goals/requirements.adoc b/docs/src/docs/arc42/introduction-goals/requirements.adoc index 141c95eeb8..bd87ab0682 100644 --- a/docs/src/docs/arc42/introduction-goals/requirements.adoc +++ b/docs/src/docs/arc42/introduction-goals/requirements.adoc @@ -9,7 +9,7 @@ The IRS is a: - Data chain provider == Substantial Features -- provide a top-down BoM asBuilt tree structure along the submodel "SingleLevelBomAsBuilt" +- provide a top-down BoM asBuilt tree structure along the submodel https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_bom_as_built["SingleLevelBomAsBuilt"] - usage of EDC consumer for communicating with the Catena-X network - functionality of IRS provider will be handled by providers submodel servers - federated IRS service diff --git a/docs/src/docs/arc42/runtime-view/irs-iterative/scenario-2.adoc b/docs/src/docs/arc42/runtime-view/irs-iterative/scenario-2.adoc index 07164adb6a..8cfdf270f1 100644 --- a/docs/src/docs/arc42/runtime-view/irs-iterative/scenario-2.adoc +++ b/docs/src/docs/arc42/runtime-view/irs-iterative/scenario-2.adoc @@ -12,7 +12,7 @@ include::../../../../uml-diagrams/runtime-view/job-execution.puml[] After a job has been created (see Scenario 1: Create Job), the first transfer containing the root item ID is passed to the ExecutorService. The transfer is then started asynchronously and retrieves the necessary information from the Catena-X network, first by fetching the AAS information from the DigitalTwin registry and then calling the SubmodelProviders for the submodel payload. -At least the aspect SingleLevelBomAsBuilt is required for the tree to be built. If the customer that started the job provided more aspects to be fetched, they will be retrieved here too. +At least the aspect https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_bom_as_built[SingleLevelBomAsBuilt] is required for the tree to be built. If the customer that started the job provided more aspects to be fetched, they will be retrieved here too. The result of each transfer is stored in the BlobStore. After the transfer process has finished, any subsequent child IDs will be extracted and new transfer processes will be scheduled for those via the ExecutorService. This cycle repeats until all leafs were reached, the specified max depth has been reached, or the job was canceled externally. diff --git a/docs/src/docs/arc42/scope-context/technical-context.adoc b/docs/src/docs/arc42/scope-context/technical-context.adoc index cfb65d299f..1656f83cb9 100644 --- a/docs/src/docs/arc42/scope-context/technical-context.adoc +++ b/docs/src/docs/arc42/scope-context/technical-context.adoc @@ -13,7 +13,7 @@ We provide a REST API that can be consumed by any system registered in the Caten In order to consume the Restful application IRS, the security aspect should be taken in consideration. IRS is a Spring Boot based application and is secured with the OpenID connector provider with OAuth2 protocol. This means for the consumers (users) that they need to authenticate themselves in order to be authorized to get access to the IRS. They generate a bearer token that they get from OAuth2 provider and attach it to the HTTP header parameter Authorization. === Registry API -The IRS acts as a consumer of the component Asset Administration Shell Registry. The IRS contains a Restful client (REST template) that build a REST call to the mentioned Digital Twin Registry API based on its known URL (the AAS registry URL is configured in the IRS Restful API). The request contains the given "globalAssetId" by the consumer. Like described in the above section, the security aspect is required in order to achieve a REST call against the AAS Registry. As a response, the IRS gets the corresponding asset administration shell descriptor. The last one contains a list of submodel descriptors which can be filtered by the aspect type entered by the consumer. An aspect type like SingleLevelBomAsBuilt, SerialPart etc. And as mentioned above, the transport protocol HTTP(S) is used for the REST call communication. +The IRS acts as a consumer of the component Asset Administration Shell Registry. The IRS contains a Restful client (REST template) that build a REST call to the mentioned Digital Twin Registry API based on its known URL (the AAS registry URL is configured in the IRS Restful API). The request contains the given "globalAssetId" by the consumer. Like described in the above section, the security aspect is required in order to achieve a REST call against the AAS Registry. As a response, the IRS gets the corresponding asset administration shell descriptor. The last one contains a list of submodel descriptors which can be filtered by the aspect type entered by the consumer. An aspect type like https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.single_level_bom_as_built[SingleLevelBomAsBuilt], https://github.com/eclipse-tractusx/sldt-semantic-models/tree/main/io.catenax.serial_part[SerialPart] etc. And as mentioned above, the transport protocol HTTP(S) is used for the REST call communication. ==== Discovery Service In a decentralized system, the digital twin registry is moved behind an EDC. To access the registry of a data provider, a new set of central services was introduces. These discovery services consist of BPN Discovery, Discovery Finder and EDC Discovery. From 5abf46b144263de7d1da1ddf83cdbab0e990051b Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 12 Jun 2024 14:01:20 +0200 Subject: [PATCH 04/26] chore(docs):[#529] Add documentation for the tests --- ...-E2E-tests-aspect-version-compatibility.md | 63 +++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md diff --git a/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md new file mode 100644 index 0000000000..6e9bb9f607 --- /dev/null +++ b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md @@ -0,0 +1,63 @@ + +# #529 E2E Tests for Aspect Version Compatibility + +- [The cucumber test](../../../irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature) + - checks for compatibility of [supported model versions](../../../COMPATIBILITY_MATRIX.md) + + +## SingleLevelBomAsPlanned + +Test data: +- [CX_Testdata_529_compatibility_SingleLevelBomAsPlanned.json](../../../local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsPlanned.json) + +Structure of test data: +- SingleLevelBomAsPlanned 3.0.0, BPNL00E2EASPCPT1, db884234-9266-4c4a-a5f7-de87d95d0cb5 + - SingleLevelBomAsPlanned 3.1.0, BPNL00E2EASPCP11, cb5fdf70-9ddd-42cd-b8c1-0e09bc561601 + - futureAddedField + - PartAsPlanned 2.0.0, 4bf0acbc-fd1c-46f3-a4df-6da98be2ee8d + - SingleLevelBomAsPlanned 2.0.0, BPNL00E2EASPCP12, 8acc354c-5ca3-4cd7-83bf-a28681e99f28 + - PartAsPlanned 2.0.0, urn:uuid:1ddca474-2fd6-48c4-aa16-54a03fe40cd7 + +Test: + +- [Cucumber test - scenario "SingleLevelBomAsPlanned"](../../../irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature) + - [529-single-level-bom-as-planned-expected-relationships.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-relationships.json) + - [529-single-level-bom-as-planned-expected-submodels.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-submodels.json) + + +## SingleLevelBomAsBuilt + + +Test data: +- [CX_Testdata_529_compatibility_SingleLevelBomAsBuilt.json](../../../local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsBuilt.json) + + +todo prüfen ob schema passt +Structure of test data: +- SingleLevelBomAsBuilt 3.0.0, BPNL00E2EASPCPT1, a0589022-a790-4560-aad1-5e8f7939fe92 + - SerialPart 1.0.1, todo + - SingleLevelBomAsBuilt 3.1.0, BPNL00E2EASPCP11, 4b1b50f7-686d-4c3a-b81a-5f6fc6ae5c42 + - futureAddedField + - SerialPart 2.0.0, todo + - SerialPart 3.0.0, todo + - SingleLevelBomAsBuilt 2.0.0, BPNL00E2EASPCP12, 62aa5c23-780c-4036-8416-97922e3f71a4 + - SerialPart 2.0.0, todo + +Test: + +- [Cucumber test - scenario "SingleLevelBomAsBuilt"](../../../irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature) + - [529-single-level-bom-as-built-expected-relationships.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-relationships.json) + - [529-single-level-bom-as-built-expected-submodels.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-submodels.json) + + + +## SingleLevelUsageAsBuilt + +SingleLevelBomAsBuilt +SingleLevelUsageAsPlanned +SingleLevelUsageAsBuilt + +## SingleLevelBomAsSpecified + +SingleLevelBomAsSpecified + From 5bc917a0fd13d596ac7ad39189c17266ae908fc4 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 12 Jun 2024 15:47:45 +0200 Subject: [PATCH 05/26] chore(docs):[#529] Test data for SingleLevelBomAsPlanned --- ...bom-as-planned-expected-relationships.json | 5 + ...vel-bom-as-planned-expected-submodels.json | 5 + ...compatibility_SingleLevelBomAsPlanned.json | 180 ++++++++++++++++++ 3 files changed, 190 insertions(+) create mode 100644 irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-relationships.json create mode 100644 irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-submodels.json create mode 100644 local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsPlanned.json diff --git a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-relationships.json b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-relationships.json new file mode 100644 index 0000000000..036cdf99b4 --- /dev/null +++ b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-relationships.json @@ -0,0 +1,5 @@ +{ + "_todo": "todo #529 execute test, check if result is ok, add relationships here", + "relationships": [ + ] +} \ No newline at end of file diff --git a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-submodels.json b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-submodels.json new file mode 100644 index 0000000000..6171a4a6d2 --- /dev/null +++ b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-submodels.json @@ -0,0 +1,5 @@ +{ + "_todo": "todo #529 execute test, check if result is ok, add submodels here", + "submodels": [ + ] +} \ No newline at end of file diff --git a/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsPlanned.json b/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsPlanned.json new file mode 100644 index 0000000000..34b9345998 --- /dev/null +++ b/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsPlanned.json @@ -0,0 +1,180 @@ +{ + "policies": { + "traceability-core": { + "@context": { + "odrl": "http://www.w3.org/ns/odrl/2/", + "cx-policy": "https://w3id.org/catenax/policy/" + }, + "@type": "PolicyDefinitionRequestDto", + "@id": "traceability-core", + "policy": { + "@type": "odrl:Set", + "odrl:permission": [ + { + "odrl:action": "use", + "odrl:constraint": { + "@type": "AtomicConstraint", + "odrl:and": [ + { + "@type": "Constraint", + "odrl:leftOperand": "cx-policy:FrameworkAgreement", + "odrl:operator": { + "@id": "odrl:eq" + }, + "odrl:rightOperand": "traceability:1.0" + }, + { + "@type": "Constraint", + "odrl:leftOperand": "cx-policy:UsagePurpose", + "odrl:operator": { + "@id": "odrl:eq" + }, + "odrl:rightOperand": "cx.core.industrycore:1" + } + ] + } + } + ] + } + } + }, + "https://catenax.io/schema/TestDataContainer/1.0.0": [ + { + "catenaXId": "urn:uuid:db884234-9266-4c4a-a5f7-de87d95d0cb5", + "bpnl": "BPNL00E2EASPCPT1", + "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned": [ + { + "catenaXId": "urn:uuid:db884234-9266-4c4a-a5f7-de87d95d0cb5", + "childItems": [ + { + "catenaXId": "urn:uuid:cb5fdf70-9ddd-42cd-b8c1-0e09bc561601", + "businessPartner": "BPNL00E2EASPCP11", + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "quantity": { + "value": 20.0, + "unit": "unit:piece" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:8acc354c-5ca3-4cd7-83bf-a28681e99f28", + "businessPartner": "BPNL00E2EASPCP12", + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "quantity": { + "value": 20.0, + "unit": "unit:piece" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ] + }, + { + "catenaXId": "urn:uuid:cb5fdf70-9ddd-42cd-b8c1-0e09bc561601", + "bpnl": "BPNL00E2EASPCP11", + "urn:samm:io.catenax.single_level_bom_as_planned:3.1.0#SingleLevelBomAsPlanned": [ + { + "catenaXId": "urn:uuid:cb5fdf70-9ddd-42cd-b8c1-0e09bc561601", + "childItems": [], + "futureAddedField": "test" + } + ], + "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ + { + "catenaXId": "urn:uuid:4bf0acbc-fd1c-46f3-a4df-6da98be2ee8d", + "partTypeInformation": { + "classification": "product", + "manufacturerPartId": "123-4.567-8901-A", + "nameAtManufacturer": "Test part 1" + }, + "partSitesInformationAsPlanned": [ + { + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNS1234567890ZZ", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" + } + ] + } + ] + }, + { + "catenaXId": "urn:uuid:8acc354c-5ca3-4cd7-83bf-a28681e99f28", + "bpnl": "BPNL00E2EASPCP12", + "urn:samm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned": [ + { + "catenaXId": "urn:uuid:8acc354c-5ca3-4cd7-83bf-a28681e99f28", + "childItems" : [ { + "catenaXId" : "urn:uuid:3161de8c-923a-415a-9a6b-0b902e3153b9", + "businessPartner" : "BPNL00E2EASPC121", + "validityPeriod" : { + "validFrom" : "2023-03-21T08:17:29.187+01:00", + "validTo" : "2024-07-01T16:10:00.000+01:00" + }, + "quantity" : { + "quantityNumber" : 2.5, + "measurementUnit" : "unit:litre" + }, + "createdOn" : "2022-02-03T14:48:54.709Z", + "lastModifiedOn" : "2022-02-03T14:48:54.709Z" + } ] + } + ], + "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ + { + "catenaXId": "urn:uuid:1ddca474-2fd6-48c4-aa16-54a03fe40cd7", + "partTypeInformation": { + "classification": "product", + "manufacturerPartId": "345-6.789-0123-A", + "nameAtManufacturer": "Test part 3" + }, + "partSitesInformationAsPlanned": [ + { + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNS1234567890ZZ", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" + } + ] + } + ] + }, + { + "catenaXId": "urn:uuid:3161de8c-923a-415a-9a6b-0b902e3153b9", + "bpnl": "BPNL00E2EASPC121", + "urn:samm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned": [ + { + "catenaXId": "urn:uuid:3161de8c-923a-415a-9a6b-0b902e3153b9", + "childItems" : [ ] + } + ], + "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ + { + "catenaXId": "urn:uuid:b091ce38-22dc-4f79-bb3b-7e1af648b176", + "partTypeInformation": { + "classification": "product", + "manufacturerPartId": "234-5.678-9012-A", + "nameAtManufacturer": "Test part 2" + }, + "partSitesInformationAsPlanned": [ + { + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNS1234567890ZZ", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" + } + ] + } + ] + } + ] +} \ No newline at end of file From 8326b0b35f699201d749f65517372ae57a625433 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 12 Jun 2024 15:49:27 +0200 Subject: [PATCH 06/26] chore(docs):[#529] Adjust and rename test --- .../529-e2e-version-compatibility.feature | 191 ------------------ .../529-version-compatibility.feature | 87 ++++++++ 2 files changed, 87 insertions(+), 191 deletions(-) delete mode 100644 irs-cucumber-tests/src/test/resources/features_new/529-e2e-version-compatibility.feature create mode 100644 irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature diff --git a/irs-cucumber-tests/src/test/resources/features_new/529-e2e-version-compatibility.feature b/irs-cucumber-tests/src/test/resources/features_new/529-e2e-version-compatibility.feature deleted file mode 100644 index 0e02d27119..0000000000 --- a/irs-cucumber-tests/src/test/resources/features_new/529-e2e-version-compatibility.feature +++ /dev/null @@ -1,191 +0,0 @@ -Feature: [TESTING] Integration E2E Tests for backward compatibility (Happy + Unhappy Path) #529 (copied from TRI-891) - - Background: - Given the IRS URL "https://irs.dev.demo.catena-x.net" - And the admin user api key - - - ###################################################################################################################### - ## SingleLevelBomAsPlanned - ###################################################################################################################### - - # SINGLE_LEVEL_BOM_AS_PLANNED("SingleLevelBomAsPlanned", SingleLevelBomAsPlanned.class, BomLifecycle.AS_PLANNED, -# Direction.DOWNWARD), -# SingleLevelBomAsPlanned [ 2.0.0; 3.0.0 ] - Model version - - Scenario: SingleLevelBomAsPlanned current version (3.0.0) - Given I register an IRS job for globalAssetId "urn:uuid:68904173-ad59-4a77-8412-3e73fcafbd8b" and BPN "BPNL00000003AVTH" - And collectAspects "true" - And depth 10 - - # SingleLevelBomAsPlanned (see RelationshipAspect) - And direction "downward" - And bomLifecycle "asPlanned" - - When I get the job-id - Then I check, if the job has status "COMPLETED" within 20 minutes - And I check, if "relationships" are equal to "529-single-level-bom-as-planned-3-0-0-expected-relationships.json" - And I check, if "submodels" are equal to "529-single-level-bom-as-planned-3-0-0-expected-submodels.json" - - - Scenario: SingleLevelBomAsPlanned old version (2.0.0) - Given I register an IRS job for globalAssetId "urn:uuid:4c1c49a2-3692-4977-aa46-352e668eee3c" and BPN "BPNL00000003AVTH" - And collectAspects "true" - And depth 10 - - # SingleLevelBomAsPlanned (see RelationshipAspect) - And direction "downward" - And bomLifecycle "asPlanned" - - When I get the job-id - Then I check, if the job has status "COMPLETED" within 20 minutes - And I check, if "relationships" are equal to "529-single-level-bom-as-planned-2-0-0-expected-relationships.json" - And I check, if "submodels" are equal to "529-single-level-bom-as-planned-2-0-0-expected-submodels.json" - - - Scenario: SingleLevelBomAsPlanned future version (3.1.0) - Given I register an IRS job for globalAssetId "urn:uuid:4e1b052b-4514-4ebe-a440-fc2728c07944" and BPN "BPNL00000003AVTH" - And collectAspects "true" - And depth 10 - - # SingleLevelBomAsPlanned (see RelationshipAspect) - And direction "downward" - And bomLifecycle "asPlanned" - - When I get the job-id - Then I check, if the job has status "COMPLETED" within 20 minutes - And I check, if "relationships" are equal to "529-single-level-bom-as-planned-3-1-0-expected-relationships.json" - And I check, if "submodels" are equal to "529-single-level-bom-as-planned-3-1-0-expected-submodels.json" - - - ###################################################################################################################### - ## SingleLevelBomAsBuilt - ###################################################################################################################### - - # SINGLE_LEVEL_BOM_AS_BUILT("SingleLevelBomAsBuilt", SingleLevelBomAsBuilt.class, BomLifecycle.AS_BUILT, - # Direction.DOWNWARD), - # SingleLevelBomAsBuilt [ 2.0.0; 3.0.0 ] - Model version - - Scenario: SingleLevelBomAsBuilt current version (3.0.0) - Given I register an IRS job for globalAssetId "urn:uuid:15cf842e-b20e-4219-a61b-99c01cec42ea" and BPN "BPNL00000003AVTH" - And collectAspects "true" - And depth 10 - - # SingleLevelBomAsBuilt (see RelationshipAspect) - And direction "downward" - And bomLifecycle "asBuilt" - - When I get the job-id - Then I check, if the job has status "COMPLETED" within 20 minutes - And I check, if "relationships" are equal to "529-single-level-bom-as-built-3-0-0-expected-relationships.json" - And I check, if "submodels" are equal to "529-single-level-bom-as-built-3-0-0-expected-submodels.json" - - - Scenario: SingleLevelBomAsBuilt old version (2.0.0) - Given I register an IRS job for globalAssetId "urn:uuid:15cf842e-b20e-4219-a61b-99c01cec42ea" and BPN "BPNL00000003AVTH" - And collectAspects "true" - And depth 10 - - # SingleLevelBomAsBuilt (see RelationshipAspect) - And direction "downward" - And bomLifecycle "asBuilt" - - When I get the job-id - Then I check, if the job has status "COMPLETED" within 20 minutes - And I check, if "relationships" are equal to "529-single-level-bom-as-built-2-0-0-expected-relationships.json" - And I check, if "submodels" are equal to "529-single-level-bom-as-built-2-0-0-expected-submodels.json" - - - Scenario: SingleLevelBomAsBuilt future version (3.1.0) - Given I register an IRS job for globalAssetId "urn:uuid:a660bcd7-3f27-4a89-a2ef-bf90006e6b68" and BPN "BPNL00000003AVTH" - And collectAspects "true" - And depth 10 - - # SingleLevelBomAsBuilt (see RelationshipAspect) - And direction "downward" - And bomLifecycle "asBuilt" - - When I get the job-id - Then I check, if the job has status "COMPLETED" within 20 minutes - And I check, if "relationships" are equal to "529-single-level-bom-as-built-3-1-0-expected-relationships.json" - And I check, if "submodels" are equal to "529-single-level-bom-as-built-3-1-0-expected-submodels.json" - - - - ###################################################################################################################### - ## SingleLevelUsageAsBuilt - ###################################################################################################################### - -# SINGLE_LEVEL_USAGE_AS_BUILT("SingleLevelUsageAsBuilt", SingleLevelUsageAsBuilt.class, BomLifecycle.AS_BUILT, -# Direction.UPWARD); -# SingleLevelUsageAsBuilt 3.0.0 - Model version - - Scenario: SingleLevelUsageAsBuilt current version (3.0.0) - Given I register an IRS job for globalAssetId "urn:uuid:15cf842e-b20e-4219-a61b-99c01cec42ea" and BPN "BPNL00000003AVTH" - And collectAspects "true" - And depth 10 - - # SingleLevelUsageAsBuilt (see RelationshipAspect) - And direction "upward" - And bomLifecycle "asBuilt" - - When I get the job-id - Then I check, if the job has status "COMPLETED" within 20 minutes - And I check, if "relationships" are equal to "529-single-level-usage-as-built-3-0-0-expected-relationships.json" - And I check, if "submodels" are equal to "529-single-level-usage-as-built-3-0-0-expected-submodels.json" - - - Scenario: SingleLevelUsageAsBuilt future version (3.1.0) - Given I register an IRS job for globalAssetId "urn:uuid:a660bcd7-3f27-4a89-a2ef-bf90006e6b68" and BPN "BPNL00000003AVTH" - And collectAspects "true" - And depth 10 - - # SingleLevelUsageAsBuilt (see RelationshipAspect) - And direction "upward" - And bomLifecycle "asBuilt" - - When I get the job-id - Then I check, if the job has status "COMPLETED" within 20 minutes - And I check, if "relationships" are equal to "529-single-level-usage-as-built-3-1-0-expected-relationships.json" - And I check, if "submodels" are equal to "529-single-level-usage-as-built-3-1-0-expected-submodels.json" - - - - ###################################################################################################################### - ## SingleLevelBomAsSpecified - ###################################################################################################################### - -# SINGLE_LEVEL_BOM_AS_SPECIFIED("SingleLevelBomAsSpecified", SingleLevelBomAsSpecified.class, BomLifecycle.AS_SPECIFIED, -# Direction.DOWNWARD) -# SingleLevelBomAsSpecified 1.0.0 - Model version - - - Scenario: SingleLevelBomAsSpecified current version (1.0.0) - Given I register an IRS job for globalAssetId "urn:uuid:15cf842e-b20e-4219-a61b-99c01cec42ea" and BPN "BPNL00000003AVTH" - And collectAspects "true" - And depth 10 - - # SingleLevelBomAsSpecified (see RelationshipAspect) - And direction "downward" - And bomLifecycle "asSpecified" - - When I get the job-id - Then I check, if the job has status "COMPLETED" within 20 minutes - And I check, if "relationships" are equal to "529-single-level-bom-as-specified-3-0-0-expected-relationships.json" - And I check, if "submodels" are equal to "529-single-level-bom-as-specified-3-0-0-expected-submodels.json" - - - Scenario: SingleLevelBomAsSpecified future version (1.1.0) - Given I register an IRS job for globalAssetId "urn:uuid:a660bcd7-3f27-4a89-a2ef-bf90006e6b68" and BPN "BPNL00000003AVTH" - And collectAspects "true" - And depth 10 - - # SingleLevelBomAsSpecified (see RelationshipAspect) - And direction "downward" - And bomLifecycle "asSpecified" - - When I get the job-id - Then I check, if the job has status "COMPLETED" within 20 minutes - And I check, if "relationships" are equal to "529-single-level-bom-as-specified-3-1-0-expected-relationships.json" - And I check, if "submodels" are equal to "529-single-level-bom-as-specified-3-1-0-expected-submodels.json" - diff --git a/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature b/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature new file mode 100644 index 0000000000..03c9c15055 --- /dev/null +++ b/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature @@ -0,0 +1,87 @@ +Feature: [TESTING] Integration E2E Tests for backward compatibility #529 + + Background: + Given the IRS URL "https://irs.dev.demo.catena-x.net" + And the admin user api key + + ###################################################################################################################### + ## SingleLevelUsageAsPlanned + ###################################################################################################################### + + Scenario: SingleLevelBomAsPlanned + Given I register an IRS job for globalAssetId "urn:uuid:db884234-9266-4c4a-a5f7-de87d95d0cb5" and BPN "BPNL00000003AYRE" + And collectAspects "true" + And depth 10 + + # SingleLevelBomAsPlanned (see RelationshipAspect) + And direction "downward" + And bomLifecycle "asPlanned" + + And aspects : + | urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned | + + When I get the job-id + Then I check, if the job has status "COMPLETED" within 20 minutes + And I check, if "relationships" are equal to "529-single-level-bom-as-planned-expected-relationships.json" + And I check, if "submodels" are equal to "529-single-level-bom-as-planned-expected-submodels.json" + + + + ###################################################################################################################### + ## SingleLevelBomAsBuilt + ###################################################################################################################### + + + Scenario: SingleLevelBomAsBuilt + Given I register an IRS job for globalAssetId "urn:uuid:15cf842e-b20e-4219-a61b-99c01cec42ea" and BPN "BPNL00000003AVTH" + And collectAspects "true" + And depth 10 + + # SingleLevelBomAsBuilt (see RelationshipAspect) + And direction "downward" + And bomLifecycle "asBuilt" + + When I get the job-id + Then I check, if the job has status "COMPLETED" within 20 minutes + And I check, if "relationships" are equal to "529-single-level-bom-as-built-expected-relationships.json" + And I check, if "submodels" are equal to "529-single-level-bom-as-built-expected-submodels.json" + + + ###################################################################################################################### + ## SingleLevelUsageAsBuilt + ###################################################################################################################### + + Scenario: SingleLevelUsageAsBuilt + Given I register an IRS job for globalAssetId "urn:uuid:15cf842e-b20e-4219-a61b-99c01cec42ea" and BPN "BPNL00000003AVTH" + And collectAspects "true" + And depth 10 + + # SingleLevelUsageAsBuilt (see RelationshipAspect) + And direction "upward" + And bomLifecycle "asBuilt" + + When I get the job-id + Then I check, if the job has status "COMPLETED" within 20 minutes + And I check, if "relationships" are equal to "529-single-level-usage-as-built-3-0-0-expected-relationships.json" + And I check, if "submodels" are equal to "529-single-level-usage-as-built-3-0-0-expected-submodels.json" + + + + ###################################################################################################################### + ## SingleLevelBomAsSpecified + ###################################################################################################################### + + Scenario: SingleLevelBomAsSpecified + Given I register an IRS job for globalAssetId "urn:uuid:15cf842e-b20e-4219-a61b-99c01cec42ea" and BPN "BPNL00000003AVTH" + And collectAspects "true" + And depth 10 + + # SingleLevelBomAsSpecified (see RelationshipAspect) + And direction "downward" + And bomLifecycle "asSpecified" + + When I get the job-id + Then I check, if the job has status "COMPLETED" within 20 minutes + And I check, if "relationships" are equal to "529-single-level-bom-as-specified-3-0-0-expected-relationships.json" + And I check, if "submodels" are equal to "529-single-level-bom-as-specified-3-0-0-expected-submodels.json" + From ea99ed1cd5a27e814d218fe5c99aa6ca2dc9bd54 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 12 Jun 2024 15:50:27 +0200 Subject: [PATCH 07/26] chore(docs):[#529] Update documentation for SingleLevelBomAsPlanned --- .../#529-E2E-tests-aspect-version-compatibility.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md index 6e9bb9f607..97fe504e3b 100644 --- a/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md +++ b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md @@ -17,6 +17,10 @@ Structure of test data: - PartAsPlanned 2.0.0, 4bf0acbc-fd1c-46f3-a4df-6da98be2ee8d - SingleLevelBomAsPlanned 2.0.0, BPNL00E2EASPCP12, 8acc354c-5ca3-4cd7-83bf-a28681e99f28 - PartAsPlanned 2.0.0, urn:uuid:1ddca474-2fd6-48c4-aa16-54a03fe40cd7 + - SingleLevelBomAsPlanned 2.0.0, 3161de8c-923a-415a-9a6b-0b902e3153b9 + - PartAsPlanned 2.0.0, urn:uuid:b091ce38-22dc-4f79-bb3b-7e1af648b176 + + Test: From b4142d540d481d117c5aefe9c72b28019b680efb Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 12 Jun 2024 17:16:41 +0200 Subject: [PATCH 08/26] chore(test):[#529] Test data for SingleLevelBomAsBuilt --- ...-E2E-tests-aspect-version-compatibility.md | 11 +- ...l-bom-as-built-expected-relationships.json | 5 + ...level-bom-as-built-expected-submodels.json | 5 + ...9_compatibility_SingleLevelBomAsBuilt.json | 262 ++++++++++++++++++ 4 files changed, 278 insertions(+), 5 deletions(-) create mode 100644 irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-relationships.json create mode 100644 irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-submodels.json create mode 100644 local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsBuilt.json diff --git a/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md index 97fe504e3b..2f61c21fb8 100644 --- a/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md +++ b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md @@ -36,16 +36,17 @@ Test data: - [CX_Testdata_529_compatibility_SingleLevelBomAsBuilt.json](../../../local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsBuilt.json) -todo prüfen ob schema passt Structure of test data: - SingleLevelBomAsBuilt 3.0.0, BPNL00E2EASPCPT1, a0589022-a790-4560-aad1-5e8f7939fe92 - - SerialPart 1.0.1, todo + - SerialPart 1.0.1, 6d759367-12fe-4f04-9a8c-5c9432135e41 - SingleLevelBomAsBuilt 3.1.0, BPNL00E2EASPCP11, 4b1b50f7-686d-4c3a-b81a-5f6fc6ae5c42 - futureAddedField - - SerialPart 2.0.0, todo - - SerialPart 3.0.0, todo + - SerialPart 2.0.0, ff5d998c-aadb-4189-9cf0-9ab5c42c94fe + - SerialPart 3.0.0, 976dbbce-5a5f-4118-a2bd-5fbca2aeabb5 - SingleLevelBomAsBuilt 2.0.0, BPNL00E2EASPCP12, 62aa5c23-780c-4036-8416-97922e3f71a4 - - SerialPart 2.0.0, todo + - SerialPart 2.0.0, 024f941b-594f-43ce-a42e-d17d1c302685 + - SingleLevelBomAsBuilt 2.0.0, BPNL00E2EASPC121, 2507bfdd-22df-43c2-99ab-9c2cf9ac0251 + - SerialPart 2.0.0, 34c790e9-afa3-475c-a41b-3a86a9969f61 Test: diff --git a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-relationships.json b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-relationships.json new file mode 100644 index 0000000000..036cdf99b4 --- /dev/null +++ b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-relationships.json @@ -0,0 +1,5 @@ +{ + "_todo": "todo #529 execute test, check if result is ok, add relationships here", + "relationships": [ + ] +} \ No newline at end of file diff --git a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-submodels.json b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-submodels.json new file mode 100644 index 0000000000..6171a4a6d2 --- /dev/null +++ b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-submodels.json @@ -0,0 +1,5 @@ +{ + "_todo": "todo #529 execute test, check if result is ok, add submodels here", + "submodels": [ + ] +} \ No newline at end of file diff --git a/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsBuilt.json b/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsBuilt.json new file mode 100644 index 0000000000..d58c8a4360 --- /dev/null +++ b/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsBuilt.json @@ -0,0 +1,262 @@ +{ + "policies": { + "traceability-core": { + "@context": { + "odrl": "http://www.w3.org/ns/odrl/2/", + "cx-policy": "https://w3id.org/catenax/policy/" + }, + "@type": "PolicyDefinitionRequestDto", + "@id": "traceability-core", + "policy": { + "@type": "odrl:Set", + "odrl:permission": [ + { + "odrl:action": "use", + "odrl:constraint": { + "@type": "AtomicConstraint", + "odrl:and": [ + { + "@type": "Constraint", + "odrl:leftOperand": "cx-policy:FrameworkAgreement", + "odrl:operator": { + "@id": "odrl:eq" + }, + "odrl:rightOperand": "traceability:1.0" + }, + { + "@type": "Constraint", + "odrl:leftOperand": "cx-policy:UsagePurpose", + "odrl:operator": { + "@id": "odrl:eq" + }, + "odrl:rightOperand": "cx.core.industrycore:1" + } + ] + } + } + ] + } + } + }, + "https://catenax.io/schema/TestDataContainer/1.0.0": [ + { + "catenaXId": "urn:uuid:a0589022-a790-4560-aad1-5e8f7939fe92", + "bpnl": "BPNL00E2EASPCPT1", + "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsBuilt": [ + { + "catenaXId": "urn:uuid:a0589022-a790-4560-aad1-5e8f7939fe92", + "childItems": [ + { + "catenaXId": "urn:uuid:4b1b50f7-686d-4c3a-b81a-5f6fc6ae5c42", + "businessPartner": "BPNL00E2EASPCP11", + "hasAlternatives": false, + "quantity": { + "value": 20.0, + "unit": "unit:piece" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + }, + { + "catenaXId": "urn:uuid:62aa5c23-780c-4036-8416-97922e3f71a4", + "businessPartner": "BPNL00E2EASPCP12", + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "quantity": { + "value": 20.0, + "unit": "unit:piece" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:samm:io.catenax.part_as_planned:1.0.1#SerialPart": [ + { + "catenaXId": "urn:uuid:6d759367-12fe-4f04-9a8c-5c9432135e41", + "localIdentifiers": [ + { + "value": "SN12345678", + "key": "partInstanceID" + } + ], + "manufacturingInformation": { + "date": "2024-02-04T14:48:54", + "country": "HUR" + }, + "partTypeInformation": { + "manufacturerPartId": "456-7.890-1234-A", + "customerPartId": "PRT-12345", + "classification": "product", + "nameAtManufacturer": "Test part 1", + "nameAtCustomer": "Test part 1 customer" + } + } + ] + }, + { + "catenaXId": "urn:uuid:4b1b50f7-686d-4c3a-b81a-5f6fc6ae5c42", + "bpnl": "BPNL00E2EASPCP11", + "urn:samm:io.catenax.single_level_bom_as_planned:3.1.0#SingleLevelBomAsBuilt": [ + { + "catenaXId": "urn:uuid:4b1b50f7-686d-4c3a-b81a-5f6fc6ae5c42", + "childItems": [], + "futureAddedField": "test" + } + ], + "urn:samm:io.catenax.part_as_planned:2.0.0#SerialPart": [ + { + "catenaXId": "urn:uuid:ff5d998c-aadb-4189-9cf0-9ab5c42c94fe", + "localIdentifiers": [ + { + "value": "SN23456789", + "key": "partInstanceID" + } + ], + "manufacturingInformation": { + "date": "2024-03-04T11:12:13", + "country": "HUR" + }, + "sites": [ + { + "catenaXsiteId": "BPNS3456789012ZZ", + "function": "production" + } + ], + "partTypeInformation": { + "manufacturerPartId": "567-8.901-2345-B", + "customerPartId": "PRT-78901", + "classification": "product", + "nameAtManufacturer": "Test part 2", + "nameAtCustomer": "Test part 2 customer" + } + } + ], + "urn:samm:io.catenax.part_as_planned:3.0.0#SerialPart": [ + { + "catenaXId": "urn:uuid:976dbbce-5a5f-4118-a2bd-5fbca2aeabb5", + "localIdentifiers": [ + { + "value": "SN56789012", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2024-05-05T07:08:09", + "country": "HUR", + "sites": [ + { + "catenaXsiteId": "BPNS5678901234ZZ", + "function": "production" + } + ] + }, + "partTypeInformation": { + "partClassification": [ + { + "classificationStandard": "IEC", + "classificationID": "72451- 3:2012 ", + "classificationDescription": "Standard data element types with associated classification scheme for electric components." + } + ], + "manufacturerPartId": "890-1.234-5678-E", + "customerPartId": "PRT-89012", + "nameAtManufacturer": "Test part 3", + "nameAtCustomer": "Test part 3 customer" + } + } + ] + }, + { + "catenaXId": "urn:uuid:62aa5c23-780c-4036-8416-97922e3f71a4", + "bpnl": "BPNL00E2EASPCP12", + "urn:samm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsBuilt": [ + { + "catenaXId": "urn:uuid:62aa5c23-780c-4036-8416-97922e3f71a4", + "childItems": [ + { + "catenaXId": "urn:uuid:2507bfdd-22df-43c2-99ab-9c2cf9ac0251", + "businessPartner": "BPNL00E2EASPC121", + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": "unit:litre" + }, + "hasAlternatives": false, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ] + } + ], + "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ + { + "catenaXId": "urn:uuid:024f941b-594f-43ce-a42e-d17d1c302685", + "localIdentifiers": [ + { + "value": "SN34567890", + "key": "partInstanceID" + } + ], + "manufacturingInformation": { + "date": "2024-05-04T03:02:01", + "country": "HUR" + }, + "sites": [ + { + "catenaXsiteId": "BPNS4567890123ZZ", + "function": "production" + } + ], + "partTypeInformation": { + "manufacturerPartId": "678-9.012-3456-C", + "customerPartId": "PRT-90123", + "classification": "product", + "nameAtManufacturer": "Test part 4", + "nameAtCustomer": "Test part 4 customer" + } + } + ] + }, + { + "catenaXId": "urn:uuid:2507bfdd-22df-43c2-99ab-9c2cf9ac0251", + "bpnl": "BPNL00E2EASPC121", + "urn:samm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsBuilt": [ + { + "catenaXId": "urn:uuid:2507bfdd-22df-43c2-99ab-9c2cf9ac0251", + "childItems": [] + } + ], + "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ + { + "catenaXId": "urn:uuid:34c790e9-afa3-475c-a41b-3a86a9969f61", + "localIdentifiers": [ + { + "value": "SN45678901", + "key": "partInstanceID" + } + ], + "manufacturingInformation": { + "date": "2024-06-05T04:03:02", + "country": "HUR" + }, + "sites": [ + { + "catenaXsiteId": "BPNS5678901234ZZ", + "function": "production" + } + ], + "partTypeInformation": { + "manufacturerPartId": "789-0.123-4567-D", + "customerPartId": "PRT-01234", + "classification": "product", + "nameAtManufacturer": "Test part 5", + "nameAtCustomer": "Test part 5 customer" + } + } + ] + } + ] +} \ No newline at end of file From 2742e615d128561cf9ccd5d33f3ec47e202e219b Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 12 Jun 2024 17:33:50 +0200 Subject: [PATCH 09/26] chore(test):[#529] Corrections, more preparations --- ...-E2E-tests-aspect-version-compatibility.md | 11 ++--- ...m-as-specified-expected-relationships.json | 5 +++ ...l-bom-as-specified-expected-submodels.json | 5 +++ ...usage-as-built-expected-relationships.json | 5 +++ ...vel-usage-as-built-expected-submodels.json | 5 +++ ...age-as-planned-expected-relationships.json | 5 +++ ...l-usage-as-planned-expected-submodels.json | 5 +++ .../529-version-compatibility.feature | 40 ++++++++++++++----- 8 files changed, 66 insertions(+), 15 deletions(-) create mode 100644 irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-specified-expected-relationships.json create mode 100644 irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-specified-expected-submodels.json create mode 100644 irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-built-expected-relationships.json create mode 100644 irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-built-expected-submodels.json create mode 100644 irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-planned-expected-relationships.json create mode 100644 irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-planned-expected-submodels.json diff --git a/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md index 2f61c21fb8..549e237a4d 100644 --- a/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md +++ b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md @@ -55,14 +55,15 @@ Test: - [529-single-level-bom-as-built-expected-submodels.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-submodels.json) +## SingleLevelBomAsSpecified + +todo ## SingleLevelUsageAsBuilt -SingleLevelBomAsBuilt -SingleLevelUsageAsPlanned -SingleLevelUsageAsBuilt +todo -## SingleLevelBomAsSpecified -SingleLevelBomAsSpecified +## SingleLevelUsageAsPlanned +todo diff --git a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-specified-expected-relationships.json b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-specified-expected-relationships.json new file mode 100644 index 0000000000..036cdf99b4 --- /dev/null +++ b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-specified-expected-relationships.json @@ -0,0 +1,5 @@ +{ + "_todo": "todo #529 execute test, check if result is ok, add relationships here", + "relationships": [ + ] +} \ No newline at end of file diff --git a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-specified-expected-submodels.json b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-specified-expected-submodels.json new file mode 100644 index 0000000000..6171a4a6d2 --- /dev/null +++ b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-specified-expected-submodels.json @@ -0,0 +1,5 @@ +{ + "_todo": "todo #529 execute test, check if result is ok, add submodels here", + "submodels": [ + ] +} \ No newline at end of file diff --git a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-built-expected-relationships.json b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-built-expected-relationships.json new file mode 100644 index 0000000000..036cdf99b4 --- /dev/null +++ b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-built-expected-relationships.json @@ -0,0 +1,5 @@ +{ + "_todo": "todo #529 execute test, check if result is ok, add relationships here", + "relationships": [ + ] +} \ No newline at end of file diff --git a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-built-expected-submodels.json b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-built-expected-submodels.json new file mode 100644 index 0000000000..6171a4a6d2 --- /dev/null +++ b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-built-expected-submodels.json @@ -0,0 +1,5 @@ +{ + "_todo": "todo #529 execute test, check if result is ok, add submodels here", + "submodels": [ + ] +} \ No newline at end of file diff --git a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-planned-expected-relationships.json b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-planned-expected-relationships.json new file mode 100644 index 0000000000..036cdf99b4 --- /dev/null +++ b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-planned-expected-relationships.json @@ -0,0 +1,5 @@ +{ + "_todo": "todo #529 execute test, check if result is ok, add relationships here", + "relationships": [ + ] +} \ No newline at end of file diff --git a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-planned-expected-submodels.json b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-planned-expected-submodels.json new file mode 100644 index 0000000000..6171a4a6d2 --- /dev/null +++ b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-planned-expected-submodels.json @@ -0,0 +1,5 @@ +{ + "_todo": "todo #529 execute test, check if result is ok, add submodels here", + "submodels": [ + ] +} \ No newline at end of file diff --git a/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature b/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature index 03c9c15055..bce7480a93 100644 --- a/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature +++ b/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature @@ -5,7 +5,7 @@ Feature: [TESTING] Integration E2E Tests for backward compatibility #529 And the admin user api key ###################################################################################################################### - ## SingleLevelUsageAsPlanned + ## SingleLeveBomAsPlanned ###################################################################################################################### Scenario: SingleLevelBomAsPlanned @@ -47,6 +47,25 @@ Feature: [TESTING] Integration E2E Tests for backward compatibility #529 And I check, if "submodels" are equal to "529-single-level-bom-as-built-expected-submodels.json" + ###################################################################################################################### + ## SingleLevelBomAsSpecified + ###################################################################################################################### + + Scenario: SingleLevelBomAsSpecified + Given I register an IRS job for globalAssetId "urn:uuid:15cf842e-b20e-4219-a61b-99c01cec42ea" and BPN "BPNL00000003AVTH" + And collectAspects "true" + And depth 10 + + # SingleLevelBomAsSpecified (see RelationshipAspect) + And direction "downward" + And bomLifecycle "asSpecified" + + When I get the job-id + Then I check, if the job has status "COMPLETED" within 20 minutes + And I check, if "relationships" are equal to "529-single-level-bom-as-specified-expected-relationships.json" + And I check, if "submodels" are equal to "529-single-level-bom-as-specified-expected-submodels.json" + + ###################################################################################################################### ## SingleLevelUsageAsBuilt ###################################################################################################################### @@ -62,26 +81,27 @@ Feature: [TESTING] Integration E2E Tests for backward compatibility #529 When I get the job-id Then I check, if the job has status "COMPLETED" within 20 minutes - And I check, if "relationships" are equal to "529-single-level-usage-as-built-3-0-0-expected-relationships.json" - And I check, if "submodels" are equal to "529-single-level-usage-as-built-3-0-0-expected-submodels.json" + And I check, if "relationships" are equal to "529-single-level-usage-as-built-expected-relationships.json" + And I check, if "submodels" are equal to "529-single-level-usage-as-built-expected-submodels.json" ###################################################################################################################### - ## SingleLevelBomAsSpecified + ## SingleLevelUsageAsPlanned ###################################################################################################################### - Scenario: SingleLevelBomAsSpecified + Scenario: SingleLevelUsageAsPlanned Given I register an IRS job for globalAssetId "urn:uuid:15cf842e-b20e-4219-a61b-99c01cec42ea" and BPN "BPNL00000003AVTH" And collectAspects "true" And depth 10 - # SingleLevelBomAsSpecified (see RelationshipAspect) - And direction "downward" - And bomLifecycle "asSpecified" + # SingleLevelUsageAsPlanned (see RelationshipAspect) + And direction "upward" + And bomLifecycle "asPlanned" When I get the job-id Then I check, if the job has status "COMPLETED" within 20 minutes - And I check, if "relationships" are equal to "529-single-level-bom-as-specified-3-0-0-expected-relationships.json" - And I check, if "submodels" are equal to "529-single-level-bom-as-specified-3-0-0-expected-submodels.json" + And I check, if "relationships" are equal to "529-single-level-usage-as-planned-expected-relationships.json" + And I check, if "submodels" are equal to "529-single-level-usage-as-planned-expected-submodels.json" + From ef9815b935eb663d1f55252f3662aadf872c0505 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Thu, 13 Jun 2024 11:53:19 +0200 Subject: [PATCH 10/26] chore(test):[#529] Removed SingleLevelBomAsSpecified --- ...-E2E-tests-aspect-version-compatibility.md | 10 +++++++--- ...m-as-specified-expected-relationships.json | 5 ----- ...l-bom-as-specified-expected-submodels.json | 5 ----- .../529-version-compatibility.feature | 19 ------------------- 4 files changed, 7 insertions(+), 32 deletions(-) delete mode 100644 irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-specified-expected-relationships.json delete mode 100644 irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-specified-expected-submodels.json diff --git a/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md index 549e237a4d..3b262d43e6 100644 --- a/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md +++ b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md @@ -55,15 +55,19 @@ Test: - [529-single-level-bom-as-built-expected-submodels.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-submodels.json) -## SingleLevelBomAsSpecified +## SingleLevelUsageAsBuilt todo -## SingleLevelUsageAsBuilt +| SingleLevelUsageAsBuilt | 3.0.0 +submodels? + + -todo ## SingleLevelUsageAsPlanned todo +supported? not in compatibility matrix? +submodels? \ No newline at end of file diff --git a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-specified-expected-relationships.json b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-specified-expected-relationships.json deleted file mode 100644 index 036cdf99b4..0000000000 --- a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-specified-expected-relationships.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "_todo": "todo #529 execute test, check if result is ok, add relationships here", - "relationships": [ - ] -} \ No newline at end of file diff --git a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-specified-expected-submodels.json b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-specified-expected-submodels.json deleted file mode 100644 index 6171a4a6d2..0000000000 --- a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-specified-expected-submodels.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "_todo": "todo #529 execute test, check if result is ok, add submodels here", - "submodels": [ - ] -} \ No newline at end of file diff --git a/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature b/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature index bce7480a93..54aee5cad0 100644 --- a/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature +++ b/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature @@ -47,25 +47,6 @@ Feature: [TESTING] Integration E2E Tests for backward compatibility #529 And I check, if "submodels" are equal to "529-single-level-bom-as-built-expected-submodels.json" - ###################################################################################################################### - ## SingleLevelBomAsSpecified - ###################################################################################################################### - - Scenario: SingleLevelBomAsSpecified - Given I register an IRS job for globalAssetId "urn:uuid:15cf842e-b20e-4219-a61b-99c01cec42ea" and BPN "BPNL00000003AVTH" - And collectAspects "true" - And depth 10 - - # SingleLevelBomAsSpecified (see RelationshipAspect) - And direction "downward" - And bomLifecycle "asSpecified" - - When I get the job-id - Then I check, if the job has status "COMPLETED" within 20 minutes - And I check, if "relationships" are equal to "529-single-level-bom-as-specified-expected-relationships.json" - And I check, if "submodels" are equal to "529-single-level-bom-as-specified-expected-submodels.json" - - ###################################################################################################################### ## SingleLevelUsageAsBuilt ###################################################################################################################### From 78881d0f04028cc030e7a2b274ee65f5aae10fa2 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Thu, 13 Jun 2024 18:36:47 +0200 Subject: [PATCH 11/26] chore(test):[#529] Corrections and addition of SingleLevelUsageAsBuilt, SingleLevelUsageAsPlanned --- ...-E2E-tests-aspect-version-compatibility.md | 87 +++++++++----- .../529-version-compatibility.feature | 39 ++++--- ...compatibility_SingleLevelUsageAsBuilt.json | 104 +++++++++++++++++ ...mpatibility_SingleLevelUsageAsPlanned.json | 110 ++++++++++++++++++ 4 files changed, 293 insertions(+), 47 deletions(-) create mode 100644 local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelUsageAsBuilt.json create mode 100644 local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelUsageAsPlanned.json diff --git a/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md index 3b262d43e6..3128e0e6b5 100644 --- a/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md +++ b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md @@ -5,23 +5,50 @@ - checks for compatibility of [supported model versions](../../../COMPATIBILITY_MATRIX.md) + +## SingleLevelBomAsBuilt + + +Test data: +- [CX_Testdata_529_compatibility_SingleLevelBomAsBuilt.json](../../../local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsBuilt.json) + + +Structure of test data: +- SingleLevelBomAsBuilt 3.0.0, BPNL00E2EASPCPT1, urn:uuid:a0589022-a790-4560-aad1-5e8f7939fe92 + - SerialPart 1.0.1, urn:uuid:6d759367-12fe-4f04-9a8c-5c9432135e41 + - SingleLevelBomAsBuilt 3.1.0, BPNL00E2EASPCP11, urn:uuid:4b1b50f7-686d-4c3a-b81a-5f6fc6ae5c42 + - futureAddedField + - SerialPart 2.0.0, urn:uuid:ff5d998c-aadb-4189-9cf0-9ab5c42c94fe + - SerialPart 3.0.0, urn:uuid:976dbbce-5a5f-4118-a2bd-5fbca2aeabb5 + - SingleLevelBomAsBuilt 2.0.0, BPNL00E2EASPCP12, urn:uuid:62aa5c23-780c-4036-8416-97922e3f71a4 + - SerialPart 2.0.0, urn:uuid:024f941b-594f-43ce-a42e-d17d1c302685 + - SingleLevelBomAsBuilt 2.0.0, BPNL00E2EASPC121, urn:uuid:2507bfdd-22df-43c2-99ab-9c2cf9ac0251 + - SerialPart 2.0.0, urn:uuid:34c790e9-afa3-475c-a41b-3a86a9969f61 + +Test: + +- [Cucumber test - scenario "SingleLevelBomAsBuilt"](../../../irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature) + - [529-single-level-bom-as-built-expected-relationships.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-relationships.json) + - [529-single-level-bom-as-built-expected-submodels.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-submodels.json) + + + ## SingleLevelBomAsPlanned Test data: - [CX_Testdata_529_compatibility_SingleLevelBomAsPlanned.json](../../../local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsPlanned.json) Structure of test data: -- SingleLevelBomAsPlanned 3.0.0, BPNL00E2EASPCPT1, db884234-9266-4c4a-a5f7-de87d95d0cb5 - - SingleLevelBomAsPlanned 3.1.0, BPNL00E2EASPCP11, cb5fdf70-9ddd-42cd-b8c1-0e09bc561601 +- SingleLevelBomAsPlanned 3.0.0, BPNL00E2EASPCPT1, urn:uuid:db884234-9266-4c4a-a5f7-de87d95d0cb5 + - SingleLevelBomAsPlanned 3.1.0, BPNL00E2EASPCP11, urn:uuid:cb5fdf70-9ddd-42cd-b8c1-0e09bc561601 - futureAddedField - - PartAsPlanned 2.0.0, 4bf0acbc-fd1c-46f3-a4df-6da98be2ee8d - - SingleLevelBomAsPlanned 2.0.0, BPNL00E2EASPCP12, 8acc354c-5ca3-4cd7-83bf-a28681e99f28 + - PartAsPlanned 2.0.0, urn:uuid:4bf0acbc-fd1c-46f3-a4df-6da98be2ee8d + - SingleLevelBomAsPlanned 2.0.0, BPNL00E2EASPCP12, urn:uuid:8acc354c-5ca3-4cd7-83bf-a28681e99f28 - PartAsPlanned 2.0.0, urn:uuid:1ddca474-2fd6-48c4-aa16-54a03fe40cd7 - - SingleLevelBomAsPlanned 2.0.0, 3161de8c-923a-415a-9a6b-0b902e3153b9 + - SingleLevelBomAsPlanned 2.0.0, urn:uuid:3161de8c-923a-415a-9a6b-0b902e3153b9 - PartAsPlanned 2.0.0, urn:uuid:b091ce38-22dc-4f79-bb3b-7e1af648b176 - - + Test: - [Cucumber test - scenario "SingleLevelBomAsPlanned"](../../../irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature) @@ -29,45 +56,49 @@ Test: - [529-single-level-bom-as-planned-expected-submodels.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-submodels.json) -## SingleLevelBomAsBuilt +## SingleLevelUsageAsBuilt + +Tests without submodel aspects because there are already tests for SerialPart in the SingleLevelBomAsBuilt tests. Test data: -- [CX_Testdata_529_compatibility_SingleLevelBomAsBuilt.json](../../../local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsBuilt.json) +- [CX_Testdata_529_compatibility_SingleLevelUsageAsBuilt.json](../../../local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelUsageAsBuilt.json) Structure of test data: -- SingleLevelBomAsBuilt 3.0.0, BPNL00E2EASPCPT1, a0589022-a790-4560-aad1-5e8f7939fe92 - - SerialPart 1.0.1, 6d759367-12fe-4f04-9a8c-5c9432135e41 - - SingleLevelBomAsBuilt 3.1.0, BPNL00E2EASPCP11, 4b1b50f7-686d-4c3a-b81a-5f6fc6ae5c42 +- SingleLevelUsageAsBuilt 3.0.0, BPNL00E2EASPCPT1, urn:uuid:c7b5c21b-d2c0-4b86-8283-a8932baf03b3 + - SingleLevelUsageAsBuilt 3.1.0, BPNL00E2EASPCP11, urn:uuid:13d35275-3b9b-4f0c-bc5e-00f656bb7cbc - futureAddedField - - SerialPart 2.0.0, ff5d998c-aadb-4189-9cf0-9ab5c42c94fe - - SerialPart 3.0.0, 976dbbce-5a5f-4118-a2bd-5fbca2aeabb5 - - SingleLevelBomAsBuilt 2.0.0, BPNL00E2EASPCP12, 62aa5c23-780c-4036-8416-97922e3f71a4 - - SerialPart 2.0.0, 024f941b-594f-43ce-a42e-d17d1c302685 - - SingleLevelBomAsBuilt 2.0.0, BPNL00E2EASPC121, 2507bfdd-22df-43c2-99ab-9c2cf9ac0251 - - SerialPart 2.0.0, 34c790e9-afa3-475c-a41b-3a86a9969f61 + - SingleLevelUsageAsBuilt 2.0.0, BPNL00E2EASPCP12, urn:uuid:2ea93a69-7ecb-4747-94f4-960c2535dc7b + Test: - [Cucumber test - scenario "SingleLevelBomAsBuilt"](../../../irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature) - - [529-single-level-bom-as-built-expected-relationships.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-relationships.json) - - [529-single-level-bom-as-built-expected-submodels.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-submodels.json) + - [529-single-level-usage-as-built-expected-relationships.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-built-expected-relationships.json) + - [529-single-level-usage-as-built-expected-submodels.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-built-expected-submodels.json) -## SingleLevelUsageAsBuilt +## SingleLevelUsageAsPlanned -todo +Tests without submodel aspects because there are already tests for PartAsPlanned in the SingleLevelBomAsPlanned tests. -| SingleLevelUsageAsBuilt | 3.0.0 -submodels? +Test data: +- [CX_Testdata_529_compatibility_SingleLevelUsageAsPlanned.json](../../../local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelUsageAsPlanned.json) +Structure of test data: +- SingleLevelUsageAsPlanned 3.0.0, BPNL00E2EASPCPT1, urn:uuid:c4fa7e6c-6aed-4bc4-acc9-b8839c94d13c + - SingleLevelUsageAsPlanned 3.1.0, BPNL00E2EASPCP11, urn:uuid:d7a1adba-5c99-4b86-b1c6-9f0bb341f170 + - futureAddedField + - SingleLevelUsageAsPlanned 2.0.0, BPNL00E2EASPCP12, urn:uuid:bdacb7fa-aeb2-4c4d-b555-c8b92b014785 +Test: + +- [Cucumber test - scenario "SingleLevelUsageAsPlanned"](../../../irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature) + - [529-single-level-usage-as-planned-expected-relationships.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-planned-expected-relationships.json) + - [529-single-level-usage-as-planned-expected-submodels.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-planned-expected-submodels.json) + -## SingleLevelUsageAsPlanned -todo -supported? not in compatibility matrix? -submodels? \ No newline at end of file diff --git a/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature b/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature index 54aee5cad0..46f8b15bd6 100644 --- a/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature +++ b/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature @@ -4,47 +4,48 @@ Feature: [TESTING] Integration E2E Tests for backward compatibility #529 Given the IRS URL "https://irs.dev.demo.catena-x.net" And the admin user api key + + ###################################################################################################################### - ## SingleLeveBomAsPlanned + ## SingleLevelBomAsBuilt ###################################################################################################################### - Scenario: SingleLevelBomAsPlanned - Given I register an IRS job for globalAssetId "urn:uuid:db884234-9266-4c4a-a5f7-de87d95d0cb5" and BPN "BPNL00000003AYRE" + Scenario: SingleLevelBomAsBuilt + Given I register an IRS job for globalAssetId "urn:uuid:15cf842e-b20e-4219-a61b-99c01cec42ea" and BPN "BPNL00000003AVTH" And collectAspects "true" And depth 10 - # SingleLevelBomAsPlanned (see RelationshipAspect) + # SingleLevelBomAsBuilt (see RelationshipAspect) And direction "downward" - And bomLifecycle "asPlanned" - - And aspects : - | urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned | + And bomLifecycle "asBuilt" When I get the job-id Then I check, if the job has status "COMPLETED" within 20 minutes - And I check, if "relationships" are equal to "529-single-level-bom-as-planned-expected-relationships.json" - And I check, if "submodels" are equal to "529-single-level-bom-as-planned-expected-submodels.json" - + And I check, if "relationships" are equal to "529-single-level-bom-as-built-expected-relationships.json" + And I check, if "submodels" are equal to "529-single-level-bom-as-built-expected-submodels.json" ###################################################################################################################### - ## SingleLevelBomAsBuilt + ## SingleLeveBomAsPlanned ###################################################################################################################### - - Scenario: SingleLevelBomAsBuilt - Given I register an IRS job for globalAssetId "urn:uuid:15cf842e-b20e-4219-a61b-99c01cec42ea" and BPN "BPNL00000003AVTH" + Scenario: SingleLevelBomAsPlanned + Given I register an IRS job for globalAssetId "urn:uuid:db884234-9266-4c4a-a5f7-de87d95d0cb5" and BPN "BPNL00000003AYRE" And collectAspects "true" And depth 10 - # SingleLevelBomAsBuilt (see RelationshipAspect) + # SingleLevelBomAsPlanned (see RelationshipAspect) And direction "downward" - And bomLifecycle "asBuilt" + And bomLifecycle "asPlanned" + + And aspects : + | urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned | When I get the job-id Then I check, if the job has status "COMPLETED" within 20 minutes - And I check, if "relationships" are equal to "529-single-level-bom-as-built-expected-relationships.json" - And I check, if "submodels" are equal to "529-single-level-bom-as-built-expected-submodels.json" + And I check, if "relationships" are equal to "529-single-level-bom-as-planned-expected-relationships.json" + And I check, if "submodels" are equal to "529-single-level-bom-as-planned-expected-submodels.json" + ###################################################################################################################### diff --git a/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelUsageAsBuilt.json b/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelUsageAsBuilt.json new file mode 100644 index 0000000000..ea99b79fde --- /dev/null +++ b/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelUsageAsBuilt.json @@ -0,0 +1,104 @@ +{ + "policies": { + "traceability-core": { + "@context": { + "odrl": "http://www.w3.org/ns/odrl/2/", + "cx-policy": "https://w3id.org/catenax/policy/" + }, + "@type": "PolicyDefinitionRequestDto", + "@id": "traceability-core", + "policy": { + "@type": "odrl:Set", + "odrl:permission": [ + { + "odrl:action": "use", + "odrl:constraint": { + "@type": "AtomicConstraint", + "odrl:and": [ + { + "@type": "Constraint", + "odrl:leftOperand": "cx-policy:FrameworkAgreement", + "odrl:operator": { + "@id": "odrl:eq" + }, + "odrl:rightOperand": "traceability:1.0" + }, + { + "@type": "Constraint", + "odrl:leftOperand": "cx-policy:UsagePurpose", + "odrl:operator": { + "@id": "odrl:eq" + }, + "odrl:rightOperand": "cx.core.industrycore:1" + } + ] + } + } + ] + } + } + }, + "https://catenax.io/schema/TestDataContainer/1.0.0": [ + { + "catenaXId": "urn:uuid:c7b5c21b-d2c0-4b86-8283-a8932baf03b3", + "bpnl": "BPNL00E2EASPCPT1", + "urn:samm:io.catenax.single_level_usage_as_built:3.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:c7b5c21b-d2c0-4b86-8283-a8932baf03b3", + "parentItems": [] + } + ] + }, + { + "catenaXId": "urn:uuid:13d35275-3b9b-4f0c-bc5e-00f656bb7cbc", + "bpnl": "BPNL00E2EASPCP11", + "urn:samm:io.catenax.single_level_usage_as_built:3.1.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:13d35275-3b9b-4f0c-bc5e-00f656bb7cbc", + "parentItems": [ + { + "catenaXId": "urn:uuid:c7b5c21b-d2c0-4b86-8283-a8932baf03b3", + "businessPartner": "BPNL00E2EASPCPT1", + "isOnlyPotentialParent": false, + "quantity": { + "value": 11.0, + "unit": "unit:piece" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "customers": [ + "BPNL00E2EASPCPT1" + ], + "futureAddedField": "test" + } + ] + }, + { + "catenaXId": "urn:uuid:2ea93a69-7ecb-4747-94f4-960c2535dc7b", + "bpnl": "BPNL00E2EASPCP12", + "urn:samm:io.catenax.single_level_usage_as_built:3.0.0#SingleLevelUsageAsBuilt": [ + { + "catenaXId": "urn:uuid:2ea93a69-7ecb-4747-94f4-960c2535dc7b", + "parentItems": [ + { + "catenaXId": "urn:uuid:c7b5c21b-d2c0-4b86-8283-a8932baf03b3", + "businessPartner": "BPNL00E2EASPCPT1", + "isOnlyPotentialParent": false, + "quantity": { + "value": 12.0, + "unit": "unit:piece" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "customers": [ + "BPNL00E2EASPCPT1" + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelUsageAsPlanned.json b/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelUsageAsPlanned.json new file mode 100644 index 0000000000..eea335d4b2 --- /dev/null +++ b/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelUsageAsPlanned.json @@ -0,0 +1,110 @@ +{ + "policies": { + "traceability-core": { + "@context": { + "odrl": "http://www.w3.org/ns/odrl/2/", + "cx-policy": "https://w3id.org/catenax/policy/" + }, + "@type": "PolicyDefinitionRequestDto", + "@id": "traceability-core", + "policy": { + "@type": "odrl:Set", + "odrl:permission": [ + { + "odrl:action": "use", + "odrl:constraint": { + "@type": "AtomicConstraint", + "odrl:and": [ + { + "@type": "Constraint", + "odrl:leftOperand": "cx-policy:FrameworkAgreement", + "odrl:operator": { + "@id": "odrl:eq" + }, + "odrl:rightOperand": "traceability:1.0" + }, + { + "@type": "Constraint", + "odrl:leftOperand": "cx-policy:UsagePurpose", + "odrl:operator": { + "@id": "odrl:eq" + }, + "odrl:rightOperand": "cx.core.industrycore:1" + } + ] + } + } + ] + } + } + }, + "https://catenax.io/schema/TestDataContainer/1.0.0": [ + { + "catenaXId": "urn:uuid:4e8aa114-cf50-4780-811c-11723c9f0647", + "bpnl": "BPNL00E2EASPCPT1", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned": [ + { + "catenaXId": "urn:uuid:4e8aa114-cf50-4780-811c-11723c9f0647", + "parentItems": [] + } + ] + }, + { + "catenaXId": "urn:uuid:01f4b57e-1ab3-4822-ab1b-e20651f6fd32", + "bpnl": "BPNL00E2EASPCP11", + "urn:samm:io.catenax.single_level_usage_as_planned:2.1.0#SingleLevelUsageAsPlanned": [ + { + "catenaXId": "urn:uuid:01f4b57e-1ab3-4822-ab1b-e20651f6fd32", + "parentItems": [ + { + "catenaXId": "urn:uuid:4e8aa114-cf50-4780-811c-11723c9f0647", + "businessPartner": "BPNL00E2EASPCPT1", + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "quantity": { + "value": 11.0, + "unit": "unit:piece" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "customers": [ + "BPNL00E2EASPCPT1" + ], + "futureAddedField": "test" + } + ] + }, + { + "catenaXId": "urn:uuid:7fe9ac70-23c4-449a-88c1-3832a1cc6da6", + "bpnl": "BPNL00E2EASPCP12", + "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned": [ + { + "catenaXId": "urn:uuid:7fe9ac70-23c4-449a-88c1-3832a1cc6da6", + "parentItems": [ + { + "catenaXId": "urn:uuid:4e8aa114-cf50-4780-811c-11723c9f0647", + "businessPartner": "BPNL00E2EASPCPT1", + "validityPeriod": { + "validFrom": "2023-03-21T08:17:29.187+01:00", + "validTo": "2024-07-01T16:10:00.000+01:00" + }, + "quantity": { + "value": 12.0, + "unit": "unit:piece" + }, + "createdOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z" + } + ], + "customers": [ + "BPNL00E2EASPCPT1" + ] + } + ] + } + ] +} \ No newline at end of file From f03c0a29fb107e12dcbc40b397aa2a57f8545322 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Fri, 14 Jun 2024 01:35:40 +0200 Subject: [PATCH 12/26] chore(test):[#529] Corrections --- ...29_compatibility_SingleLevelBomAsBuilt.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsBuilt.json b/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsBuilt.json index d58c8a4360..f2c4194908 100644 --- a/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsBuilt.json +++ b/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsBuilt.json @@ -42,7 +42,7 @@ { "catenaXId": "urn:uuid:a0589022-a790-4560-aad1-5e8f7939fe92", "bpnl": "BPNL00E2EASPCPT1", - "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsBuilt": [ + "urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt": [ { "catenaXId": "urn:uuid:a0589022-a790-4560-aad1-5e8f7939fe92", "childItems": [ @@ -74,7 +74,7 @@ ] } ], - "urn:samm:io.catenax.part_as_planned:1.0.1#SerialPart": [ + "urn:samm:io.catenax.serial_part:1.0.1#SerialPart": [ { "catenaXId": "urn:uuid:6d759367-12fe-4f04-9a8c-5c9432135e41", "localIdentifiers": [ @@ -100,14 +100,14 @@ { "catenaXId": "urn:uuid:4b1b50f7-686d-4c3a-b81a-5f6fc6ae5c42", "bpnl": "BPNL00E2EASPCP11", - "urn:samm:io.catenax.single_level_bom_as_planned:3.1.0#SingleLevelBomAsBuilt": [ + "urn:samm:io.catenax.single_level_bom_as_built:3.1.0#SingleLevelBomAsBuilt": [ { "catenaXId": "urn:uuid:4b1b50f7-686d-4c3a-b81a-5f6fc6ae5c42", "childItems": [], "futureAddedField": "test" } ], - "urn:samm:io.catenax.part_as_planned:2.0.0#SerialPart": [ + "urn:samm:io.catenax.serial_part:2.0.0#SerialPart": [ { "catenaXId": "urn:uuid:ff5d998c-aadb-4189-9cf0-9ab5c42c94fe", "localIdentifiers": [ @@ -135,7 +135,7 @@ } } ], - "urn:samm:io.catenax.part_as_planned:3.0.0#SerialPart": [ + "urn:samm:io.catenax.serial_part:3.0.0#SerialPart": [ { "catenaXId": "urn:uuid:976dbbce-5a5f-4118-a2bd-5fbca2aeabb5", "localIdentifiers": [ @@ -173,7 +173,7 @@ { "catenaXId": "urn:uuid:62aa5c23-780c-4036-8416-97922e3f71a4", "bpnl": "BPNL00E2EASPCP12", - "urn:samm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsBuilt": [ + "urn:samm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt": [ { "catenaXId": "urn:uuid:62aa5c23-780c-4036-8416-97922e3f71a4", "childItems": [ @@ -191,7 +191,7 @@ ] } ], - "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ + "urn:samm:io.catenax.serial_part:2.0.0#SerialPart": [ { "catenaXId": "urn:uuid:024f941b-594f-43ce-a42e-d17d1c302685", "localIdentifiers": [ @@ -223,13 +223,13 @@ { "catenaXId": "urn:uuid:2507bfdd-22df-43c2-99ab-9c2cf9ac0251", "bpnl": "BPNL00E2EASPC121", - "urn:samm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsBuilt": [ + "urn:samm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt": [ { "catenaXId": "urn:uuid:2507bfdd-22df-43c2-99ab-9c2cf9ac0251", "childItems": [] } ], - "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ + "urn:samm:io.catenax.serial_part:2.0.0#SerialPart": [ { "catenaXId": "urn:uuid:34c790e9-afa3-475c-a41b-3a86a9969f61", "localIdentifiers": [ From 24c8e306cbbd6a132f20f2251e017c89765a39ec Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Mon, 17 Jun 2024 12:29:21 +0200 Subject: [PATCH 13/26] chore(test):[#529] Corrections SingleLevelBomAsBuilt --- ...-E2E-tests-aspect-version-compatibility.md | 21 ++-- ...l-bom-as-built-expected-relationships.json | 58 +++++++++- ...level-bom-as-built-expected-submodels.json | 94 ++++++++++++++- .../529-version-compatibility.feature | 8 +- ...9_compatibility_SingleLevelBomAsBuilt.json | 46 ++++---- ...AsBuilt-3.1.0-schema-futureAddedField.json | 107 ++++++++++++++++++ 6 files changed, 295 insertions(+), 39 deletions(-) create mode 100644 local/testing/testdata/SingleLevelBomAsBuilt-3.1.0-schema-futureAddedField.json diff --git a/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md index 3128e0e6b5..825be2c9d7 100644 --- a/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md +++ b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md @@ -14,16 +14,16 @@ Test data: Structure of test data: -- SingleLevelBomAsBuilt 3.0.0, BPNL00E2EASPCPT1, urn:uuid:a0589022-a790-4560-aad1-5e8f7939fe92 - - SerialPart 1.0.1, urn:uuid:6d759367-12fe-4f04-9a8c-5c9432135e41 - - SingleLevelBomAsBuilt 3.1.0, BPNL00E2EASPCP11, urn:uuid:4b1b50f7-686d-4c3a-b81a-5f6fc6ae5c42 - - futureAddedField - - SerialPart 2.0.0, urn:uuid:ff5d998c-aadb-4189-9cf0-9ab5c42c94fe - - SerialPart 3.0.0, urn:uuid:976dbbce-5a5f-4118-a2bd-5fbca2aeabb5 - - SingleLevelBomAsBuilt 2.0.0, BPNL00E2EASPCP12, urn:uuid:62aa5c23-780c-4036-8416-97922e3f71a4 - - SerialPart 2.0.0, urn:uuid:024f941b-594f-43ce-a42e-d17d1c302685 - - SingleLevelBomAsBuilt 2.0.0, BPNL00E2EASPC121, urn:uuid:2507bfdd-22df-43c2-99ab-9c2cf9ac0251 - - SerialPart 2.0.0, urn:uuid:34c790e9-afa3-475c-a41b-3a86a9969f61 +- OK: SingleLevelBomAsBuilt 3.0.0, BPNL00000007QG00, urn:uuid:bec0a457-4d6b-4c1c-88f7-125d04f04d68 + - OK: SerialPart 1.0.1, urn:uuid:25bba830-bcd8-4123-be72-e5507b2ae827 + - ??: SingleLevelBomAsBuilt 3.1.0, BPNL00000007RI31, urn:uuid:589d7f27-d200-4009-b24c-27b0f4b81528 --> Tombstone: Unable to find any of the requested shells. Why? + - ??: futureAddedField + - ??: SerialPart 2.0.0, urn:uuid:1c151801-0d9d-4fc6-af91-0ddcfe8d86e3 + - ??: SerialPart 3.0.0, urn:uuid:5bd8e513-b69d-4b08-a387-24d787ac5545 + - SingleLevelBomAsBuilt 2.0.0, BPNL00000003CSAP, urn:uuid:6e709d64-bdc7-49f4-a87d-4e1f7e2c3b7c + - OK: SerialPart 2.0.0, urn:uuid:162cb1f1-c619-47db-ab7f-44a111a762fc + - OK: SingleLevelBomAsBuilt 2.0.0, BPNL00000007RNYV, urn:uuid:d23f278b-2d8b-4f11-af76-2a9a7bb91cfc + - OK: SerialPart 2.0.0, urn:uuid:bc8b6912-4be3-4b4c-a28a-919ba405a5c2 Test: @@ -32,7 +32,6 @@ Test: - [529-single-level-bom-as-built-expected-submodels.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-submodels.json) - ## SingleLevelBomAsPlanned Test data: diff --git a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-relationships.json b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-relationships.json index 036cdf99b4..8a94d9668d 100644 --- a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-relationships.json +++ b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-relationships.json @@ -1,5 +1,61 @@ { - "_todo": "todo #529 execute test, check if result is ok, add relationships here", "relationships": [ + { + "catenaXId": "urn:uuid:bec0a457-4d6b-4c1c-88f7-125d04f04d68", + "linkedItem": { + "quantity": { + "quantityNumber": 20.0, + "measurementUnit": { + "datatypeURI": null, + "lexicalValue": "unit:piece" + } + }, + "lifecycleContext": "asBuilt", + "assembledOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "childCatenaXId": "urn:uuid:6e709d64-bdc7-49f4-a87d-4e1f7e2c3b7c", + "hasAlternatives": false + }, + "aspectType": "SingleLevelBomAsBuilt", + "bpn": "BPNL00000003CSAP" + }, + { + "catenaXId": "urn:uuid:bec0a457-4d6b-4c1c-88f7-125d04f04d68", + "linkedItem": { + "quantity": { + "quantityNumber": 20.0, + "measurementUnit": { + "datatypeURI": null, + "lexicalValue": "unit:piece" + } + }, + "lifecycleContext": "asBuilt", + "assembledOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "childCatenaXId": "urn:uuid:589d7f27-d200-4009-b24c-27b0f4b81528", + "hasAlternatives": false + }, + "aspectType": "SingleLevelBomAsBuilt", + "bpn": "BPNL00000007RI31" + }, + { + "catenaXId": "urn:uuid:6e709d64-bdc7-49f4-a87d-4e1f7e2c3b7c", + "linkedItem": { + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": { + "datatypeURI": null, + "lexicalValue": "unit:litre" + } + }, + "lifecycleContext": "asBuilt", + "assembledOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "childCatenaXId": "urn:uuid:d23f278b-2d8b-4f11-af76-2a9a7bb91cfc", + "hasAlternatives": false + }, + "aspectType": "SingleLevelBomAsBuilt", + "bpn": "BPNL00000007RNYV" + } ] } \ No newline at end of file diff --git a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-submodels.json b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-submodels.json index 6171a4a6d2..72aa797fff 100644 --- a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-submodels.json +++ b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-submodels.json @@ -1,5 +1,93 @@ { - "_todo": "todo #529 execute test, check if result is ok, add submodels here", - "submodels": [ - ] + "submodels": [ + { + "identification": "urn:uuid:54d3e5a3-4f80-4386-ae43-3a5080544f29", + "aspectType": "urn:samm:io.catenax.serial_part:1.0.1#SerialPart", + "contractAgreementId": null, + "payload": { + "catenaXId": "urn:uuid:25bba830-bcd8-4123-be72-e5507b2ae827", + "localIdentifiers": [ + { + "value": "SN12345678", + "key": "partInstanceID" + } + ], + "manufacturingInformation": { + "date": "2024-02-04T14:48:54", + "country": "HUR" + }, + "partTypeInformation": { + "manufacturerPartId": "456-7.890-1234-A", + "customerPartId": "PRT-12345", + "classification": "product", + "nameAtManufacturer": "Test part 1", + "nameAtCustomer": "Test part 1 customer" + } + } + }, + { + "identification": "urn:uuid:4e94baab-6de5-4fe4-8dea-65030e5ef45e", + "aspectType": "urn:samm:io.catenax.serial_part:2.0.0#SerialPart", + "contractAgreementId": null, + "payload": { + "catenaXId": "urn:uuid:162cb1f1-c619-47db-ab7f-44a111a762fc", + "localIdentifiers": [ + { + "value": "SN34567890", + "key": "partInstanceID" + } + ], + "manufacturingInformation": { + "date": "2024-05-04T03:02:01", + "country": "HUR" + }, + "sites": [ + { + "catenaXsiteId": "BPNS4567890123ZZ", + "function": "production" + } + ], + "partTypeInformation": { + "manufacturerPartId": "678-9.012-3456-C", + "customerPartId": "PRT-90123", + "classification": "product", + "nameAtManufacturer": "Test part 4", + "nameAtCustomer": "Test part 4 customer" + } + } + }, + { + "identification": "urn:uuid:877f0599-a54a-4131-98e5-1334a15efb68", + "aspectType": "urn:samm:io.catenax.serial_part:2.0.0#SerialPart", + "contractAgreementId": null, + "payload": { + "catenaXId": "urn:uuid:bc8b6912-4be3-4b4c-a28a-919ba405a5c2", + "localIdentifiers": [ + { + "value": "SN45678901", + "key": "partInstanceID" + } + ], + "manufacturingInformation": { + "date": "2024-06-05T04:03:02", + "country": "HUR" + }, + "sites": [ + { + "catenaXsiteId": "BPNS5678901234ZZ", + "function": "production" + } + ], + "partTypeInformation": { + "manufacturerPartId": "789-0.123-4567-D", + "customerPartId": "PRT-01234", + "classification": "product", + "nameAtManufacturer": "Test part 5", + "nameAtCustomer": "Test part 5 customer" + } + } + } + ], + "bpns": [ + ] } \ No newline at end of file diff --git a/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature b/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature index 46f8b15bd6..b2011db79c 100644 --- a/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature +++ b/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature @@ -11,7 +11,7 @@ Feature: [TESTING] Integration E2E Tests for backward compatibility #529 ###################################################################################################################### Scenario: SingleLevelBomAsBuilt - Given I register an IRS job for globalAssetId "urn:uuid:15cf842e-b20e-4219-a61b-99c01cec42ea" and BPN "BPNL00000003AVTH" + Given I register an IRS job for globalAssetId "urn:uuid:bec0a457-4d6b-4c1c-88f7-125d04f04d68" and BPN "BPNL00000007QG00" And collectAspects "true" And depth 10 @@ -19,6 +19,12 @@ Feature: [TESTING] Integration E2E Tests for backward compatibility #529 And direction "downward" And bomLifecycle "asBuilt" + And aspects : + | urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt | + | urn:samm:io.catenax.serial_part:1.0.1#SerialPart | + | urn:samm:io.catenax.serial_part:2.0.0#SerialPart | + | urn:samm:io.catenax.serial_part:3.0.0#SerialPart | + When I get the job-id Then I check, if the job has status "COMPLETED" within 20 minutes And I check, if "relationships" are equal to "529-single-level-bom-as-built-expected-relationships.json" diff --git a/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsBuilt.json b/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsBuilt.json index f2c4194908..caf6981cc3 100644 --- a/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsBuilt.json +++ b/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsBuilt.json @@ -40,15 +40,15 @@ }, "https://catenax.io/schema/TestDataContainer/1.0.0": [ { - "catenaXId": "urn:uuid:a0589022-a790-4560-aad1-5e8f7939fe92", - "bpnl": "BPNL00E2EASPCPT1", + "catenaXId": "urn:uuid:bec0a457-4d6b-4c1c-88f7-125d04f04d68", + "bpnl": "BPNL00000007QG00", "urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt": [ { - "catenaXId": "urn:uuid:a0589022-a790-4560-aad1-5e8f7939fe92", + "catenaXId": "urn:uuid:bec0a457-4d6b-4c1c-88f7-125d04f04d68", "childItems": [ { - "catenaXId": "urn:uuid:4b1b50f7-686d-4c3a-b81a-5f6fc6ae5c42", - "businessPartner": "BPNL00E2EASPCP11", + "catenaXId": "urn:uuid:589d7f27-d200-4009-b24c-27b0f4b81528", + "businessPartner": "BPNL00000007RI31", "hasAlternatives": false, "quantity": { "value": 20.0, @@ -58,8 +58,8 @@ "lastModifiedOn": "2022-02-03T14:48:54.709Z" }, { - "catenaXId": "urn:uuid:62aa5c23-780c-4036-8416-97922e3f71a4", - "businessPartner": "BPNL00E2EASPCP12", + "catenaXId": "urn:uuid:6e709d64-bdc7-49f4-a87d-4e1f7e2c3b7c", + "businessPartner": "BPNL00000003CSAP", "validityPeriod": { "validFrom": "2023-03-21T08:17:29.187+01:00", "validTo": "2024-07-01T16:10:00.000+01:00" @@ -76,7 +76,7 @@ ], "urn:samm:io.catenax.serial_part:1.0.1#SerialPart": [ { - "catenaXId": "urn:uuid:6d759367-12fe-4f04-9a8c-5c9432135e41", + "catenaXId": "urn:uuid:25bba830-bcd8-4123-be72-e5507b2ae827", "localIdentifiers": [ { "value": "SN12345678", @@ -98,18 +98,18 @@ ] }, { - "catenaXId": "urn:uuid:4b1b50f7-686d-4c3a-b81a-5f6fc6ae5c42", - "bpnl": "BPNL00E2EASPCP11", + "catenaXId": "urn:uuid:589d7f27-d200-4009-b24c-27b0f4b81528", + "bpnl": "BPNL00000007RI31", "urn:samm:io.catenax.single_level_bom_as_built:3.1.0#SingleLevelBomAsBuilt": [ { - "catenaXId": "urn:uuid:4b1b50f7-686d-4c3a-b81a-5f6fc6ae5c42", + "catenaXId": "urn:uuid:589d7f27-d200-4009-b24c-27b0f4b81528", "childItems": [], "futureAddedField": "test" } ], "urn:samm:io.catenax.serial_part:2.0.0#SerialPart": [ { - "catenaXId": "urn:uuid:ff5d998c-aadb-4189-9cf0-9ab5c42c94fe", + "catenaXId": "urn:uuid:1c151801-0d9d-4fc6-af91-0ddcfe8d86e3", "localIdentifiers": [ { "value": "SN23456789", @@ -137,7 +137,7 @@ ], "urn:samm:io.catenax.serial_part:3.0.0#SerialPart": [ { - "catenaXId": "urn:uuid:976dbbce-5a5f-4118-a2bd-5fbca2aeabb5", + "catenaXId": "urn:uuid:5bd8e513-b69d-4b08-a387-24d787ac5545", "localIdentifiers": [ { "value": "SN56789012", @@ -171,15 +171,15 @@ ] }, { - "catenaXId": "urn:uuid:62aa5c23-780c-4036-8416-97922e3f71a4", - "bpnl": "BPNL00E2EASPCP12", + "catenaXId": "urn:uuid:6e709d64-bdc7-49f4-a87d-4e1f7e2c3b7c", + "bpnl": "BPNL00000003CSAP", "urn:samm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt": [ { - "catenaXId": "urn:uuid:62aa5c23-780c-4036-8416-97922e3f71a4", + "catenaXId": "urn:uuid:6e709d64-bdc7-49f4-a87d-4e1f7e2c3b7c", "childItems": [ { - "catenaXId": "urn:uuid:2507bfdd-22df-43c2-99ab-9c2cf9ac0251", - "businessPartner": "BPNL00E2EASPC121", + "catenaXId": "urn:uuid:d23f278b-2d8b-4f11-af76-2a9a7bb91cfc", + "businessPartner": "BPNL00000007RNYV", "quantity": { "quantityNumber": 2.5, "measurementUnit": "unit:litre" @@ -193,7 +193,7 @@ ], "urn:samm:io.catenax.serial_part:2.0.0#SerialPart": [ { - "catenaXId": "urn:uuid:024f941b-594f-43ce-a42e-d17d1c302685", + "catenaXId": "urn:uuid:162cb1f1-c619-47db-ab7f-44a111a762fc", "localIdentifiers": [ { "value": "SN34567890", @@ -221,17 +221,17 @@ ] }, { - "catenaXId": "urn:uuid:2507bfdd-22df-43c2-99ab-9c2cf9ac0251", - "bpnl": "BPNL00E2EASPC121", + "catenaXId": "urn:uuid:d23f278b-2d8b-4f11-af76-2a9a7bb91cfc", + "bpnl": "BPNL00000007RNYV", "urn:samm:io.catenax.single_level_bom_as_built:2.0.0#SingleLevelBomAsBuilt": [ { - "catenaXId": "urn:uuid:2507bfdd-22df-43c2-99ab-9c2cf9ac0251", + "catenaXId": "urn:uuid:d23f278b-2d8b-4f11-af76-2a9a7bb91cfc", "childItems": [] } ], "urn:samm:io.catenax.serial_part:2.0.0#SerialPart": [ { - "catenaXId": "urn:uuid:34c790e9-afa3-475c-a41b-3a86a9969f61", + "catenaXId": "urn:uuid:bc8b6912-4be3-4b4c-a28a-919ba405a5c2", "localIdentifiers": [ { "value": "SN45678901", diff --git a/local/testing/testdata/SingleLevelBomAsBuilt-3.1.0-schema-futureAddedField.json b/local/testing/testdata/SingleLevelBomAsBuilt-3.1.0-schema-futureAddedField.json new file mode 100644 index 0000000000..2c37d5494e --- /dev/null +++ b/local/testing/testdata/SingleLevelBomAsBuilt-3.1.0-schema-futureAddedField.json @@ -0,0 +1,107 @@ +{ + "$schema" : "http://json-schema.org/draft-04/schema", + "description" : "The single-level bill of material represents one sub-level of an assembly and does not include any lower-level subassemblies. The as-built lifecycle references all child items as manufactured by the manufacturer referencing only child items in an as-built lifecycle themselves (e.g. serial parts or batches), unless parts can only be tracked by an part ID (on a type level).\n\nIf it is unclear which item has been built-in into the parent item, all potential parts must be listed. This is the case when, e.g. the same item is supplied by two suppliers and the item is only tracked by a customer part ID during assembly, these items can not be differentiated from each other.\n", + "type" : "object", + "components" : { + "schemas" : { + "urn_samm_io.catenax.shared.uuid_2.0.0_UuidV4Trait" : { + "type" : "string", + "description" : "The provided regular expression ensures that the UUID is composed of five groups of characters separated by hyphens, in the form 8-4-4-4-12 for a total of 36 characters (32 hexadecimal characters and 4 hyphens), optionally prefixed by \"urn:uuid:\" to make it an IRI.", + "pattern" : "(^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)|(^urn:uuid:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$)" + }, + "urn_samm_io.catenax.single_level_bom_as_built_3.0.0_DateTimeTrait" : { + "type" : "string", + "description" : "Regular Expression to enable UTC and Timezone formats and the possibility to exclude time information.", + "pattern" : "^-?([1-9][0-9]{3,}|0[0-9]{3})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])(T(([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9](\\.[0-9]+)?|(24:00:00(\\.0+)?))(Z|(\\+|-)((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?)?$" + }, + "urn_samm_io.catenax.shared.quantity_2.0.0_QuantityValueCharacteristic" : { + "type" : "number", + "description" : "The quantity value associated with the unit expressed as float." + }, + "urn_samm_io.catenax.shared.quantity_2.0.0_ItemUnitEnumeration" : { + "type" : "string", + "pattern" : "[a-zA-Z]*:[a-zA-Z]+", + "description" : "Enumeration for common item units.", + "enum" : [ "unit:piece", "unit:set", "unit:pair", "unit:page", "unit:cycle", "unit:kilowattHour", "unit:gram", "unit:kilogram", "unit:tonneMetricTon", "unit:tonUsOrShortTonUkorus", "unit:ounceAvoirdupois", "unit:pound", "unit:metre", "unit:centimetre", "unit:kilometre", "unit:inch", "unit:foot", "unit:yard", "unit:squareCentimetre", "unit:squareMetre", "unit:squareInch", "unit:squareFoot", "unit:squareYard", "unit:cubicCentimetre", "unit:cubicMetre", "unit:cubicInch", "unit:cubicFoot", "unit:cubicYard", "unit:litre", "unit:millilitre", "unit:hectolitre", "unit:secondUnitOfTime", "unit:minuteUnitOfTime", "unit:hourUnitOfTime", "unit:day" ] + }, + "urn_samm_io.catenax.shared.quantity_2.0.0_ItemQuantityCharacteristic" : { + "description" : "Characteristic for measurements of an item (mass, count, linear, area, volume, misc).", + "type" : "object", + "properties" : { + "value" : { + "description" : "The quantity value associated with the unit.", + "$ref" : "#/components/schemas/urn_samm_io.catenax.shared.quantity_2.0.0_QuantityValueCharacteristic" + }, + "unit" : { + "description" : "The unit of an item. Common units may be related to mass, count, linear, area, volume or misc.", + "$ref" : "#/components/schemas/urn_samm_io.catenax.shared.quantity_2.0.0_ItemUnitEnumeration" + } + }, + "required" : [ "value", "unit" ] + }, + "urn_samm_io.catenax.shared.business_partner_number_2.0.0_BpnlTrait" : { + "type" : "string", + "description" : "The provided regular expression ensures that the BPNL is composed of prefix 'BPNL', 10 digits and two alphanumeric letters.", + "pattern" : "^BPNL[a-zA-Z0-9]{12}$" + }, + "urn_samm_org.eclipse.esmf.samm_characteristic_2.1.0_Boolean" : { + "type" : "boolean", + "description" : "Represents a boolean value (i.e. a \"flag\")." + }, + "urn_samm_io.catenax.single_level_bom_as_built_3.0.0_ChildData" : { + "description" : "Catena-X ID and meta data of the assembled child item.", + "type" : "object", + "properties" : { + "createdOn" : { + "description" : "Timestamp when the relation between the parent item and the child item was created, e.g. when the serialized child part was assembled into the given part.", + "$ref" : "#/components/schemas/urn_samm_io.catenax.single_level_bom_as_built_3.0.0_DateTimeTrait" + }, + "quantity" : { + "description" : "Quantity of which the child item is assembled into the parent item. In general it is '1' for serialized parts.", + "$ref" : "#/components/schemas/urn_samm_io.catenax.shared.quantity_2.0.0_ItemQuantityCharacteristic" + }, + "lastModifiedOn" : { + "description" : "Timestamp when the assembly relationship between parent item and child item was last modified.", + "$ref" : "#/components/schemas/urn_samm_io.catenax.single_level_bom_as_built_3.0.0_DateTimeTrait" + }, + "futureAddedField" : { + "description" : "Field added in the future (for testing compatibility).", + "type" : "string" + }, + "businessPartner" : { + "description" : "The supplier of the given child item.", + "$ref" : "#/components/schemas/urn_samm_io.catenax.shared.business_partner_number_2.0.0_BpnlTrait" + }, + "hasAlternatives" : { + "description" : "Expresses whether the part is built-in or wether it is one of several options. If the value is false, it can be assumed this exact item is built-in. If the value is true, it is unknown wether this or an alternative item is built-in.\nThis is the case when, e.g. the same item is supplied by two suppliers, the item is only tracked by a customer part ID during assembly. Thus, these items can not be differentiated from each other.\n\n", + "$ref" : "#/components/schemas/urn_samm_org.eclipse.esmf.samm_characteristic_2.1.0_Boolean" + }, + "catenaXId" : { + "description" : "The Catena-X ID of the given part (e.g. the component), valid for the Catena-X dataspace.", + "$ref" : "#/components/schemas/urn_samm_io.catenax.shared.uuid_2.0.0_UuidV4Trait" + } + }, + "required" : [ "createdOn", "quantity", "businessPartner", "hasAlternatives", "catenaXId" ] + }, + "urn_samm_io.catenax.single_level_bom_as_built_3.0.0_SetOfChildItemsCharacteristic" : { + "description" : "Set of child items the parent item was assembled by (one structural level down).", + "type" : "array", + "items" : { + "$ref" : "#/components/schemas/urn_samm_io.catenax.single_level_bom_as_built_3.0.0_ChildData" + }, + "uniqueItems" : true + } + } + }, + "properties" : { + "catenaXId" : { + "description" : "The Catena-X ID of the given part (e.g. the component), valid for the Catena-X dataspace.", + "$ref" : "#/components/schemas/urn_samm_io.catenax.shared.uuid_2.0.0_UuidV4Trait" + }, + "childItems" : { + "description" : "Set of child items, of which the given parent item was assembled by (one structural level down).", + "$ref" : "#/components/schemas/urn_samm_io.catenax.single_level_bom_as_built_3.0.0_SetOfChildItemsCharacteristic" + } + }, + "required" : [ "catenaXId", "childItems" ] +} \ No newline at end of file From 1ac0a32c8ec81f3043ac10d491d58686ae091c9b Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Mon, 17 Jun 2024 15:58:54 +0200 Subject: [PATCH 14/26] chore(testdata):[#529] Fix SingleLevelBomAsBuilt testdata --- ...ata_529_compatibility_SingleLevelBomAsBuilt.json | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsBuilt.json b/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsBuilt.json index caf6981cc3..854f83289f 100644 --- a/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsBuilt.json +++ b/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsBuilt.json @@ -60,6 +60,7 @@ { "catenaXId": "urn:uuid:6e709d64-bdc7-49f4-a87d-4e1f7e2c3b7c", "businessPartner": "BPNL00000003CSAP", + "hasAlternatives": false, "validityPeriod": { "validFrom": "2023-03-21T08:17:29.187+01:00", "validTo": "2024-07-01T16:10:00.000+01:00" @@ -76,7 +77,7 @@ ], "urn:samm:io.catenax.serial_part:1.0.1#SerialPart": [ { - "catenaXId": "urn:uuid:25bba830-bcd8-4123-be72-e5507b2ae827", + "catenaXId": "urn:uuid:bec0a457-4d6b-4c1c-88f7-125d04f04d68", "localIdentifiers": [ { "value": "SN12345678", @@ -109,7 +110,7 @@ ], "urn:samm:io.catenax.serial_part:2.0.0#SerialPart": [ { - "catenaXId": "urn:uuid:1c151801-0d9d-4fc6-af91-0ddcfe8d86e3", + "catenaXId": "urn:uuid:589d7f27-d200-4009-b24c-27b0f4b81528", "localIdentifiers": [ { "value": "SN23456789", @@ -137,7 +138,7 @@ ], "urn:samm:io.catenax.serial_part:3.0.0#SerialPart": [ { - "catenaXId": "urn:uuid:5bd8e513-b69d-4b08-a387-24d787ac5545", + "catenaXId": "urn:uuid:589d7f27-d200-4009-b24c-27b0f4b81528", "localIdentifiers": [ { "value": "SN56789012", @@ -145,7 +146,7 @@ } ], "manufacturingInformation": { - "date": "2024-05-05T07:08:09", + "date": "2024-05-05T07:08:09Z", "country": "HUR", "sites": [ { @@ -193,7 +194,7 @@ ], "urn:samm:io.catenax.serial_part:2.0.0#SerialPart": [ { - "catenaXId": "urn:uuid:162cb1f1-c619-47db-ab7f-44a111a762fc", + "catenaXId": "urn:uuid:6e709d64-bdc7-49f4-a87d-4e1f7e2c3b7c", "localIdentifiers": [ { "value": "SN34567890", @@ -231,7 +232,7 @@ ], "urn:samm:io.catenax.serial_part:2.0.0#SerialPart": [ { - "catenaXId": "urn:uuid:bc8b6912-4be3-4b4c-a28a-919ba405a5c2", + "catenaXId": "urn:uuid:d23f278b-2d8b-4f11-af76-2a9a7bb91cfc", "localIdentifiers": [ { "value": "SN45678901", From bef4ac1874bd50618d1db9e006173f98b6628506 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Mon, 17 Jun 2024 15:59:55 +0200 Subject: [PATCH 15/26] chore(testdata):[#529] Fiximport script --- local/testing/testdata/transform-and-upload.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/testing/testdata/transform-and-upload.py b/local/testing/testdata/transform-and-upload.py index ed81839dc6..a2745e02e4 100644 --- a/local/testing/testdata/transform-and-upload.py +++ b/local/testing/testdata/transform-and-upload.py @@ -656,7 +656,7 @@ def search_for_asset_in_catalog(edc_catalog_path_, edc_upload_url_, edc_url_, he dataplane_url = dataplane_urls[contract_number % len(dataplane_urls)] edc_asset_id = edc_asset_ids[contract_number % len(edc_asset_ids)] - submodel_name = tmp_key[tmp_key.index("#") + 1: len(tmp_key)] + submodel_name = tmp_key submodel_identification = uuid.uuid4().urn semantic_id = tmp_key if is_ess and tmp_data["bpnl"] in bpnl_fail: From b49de9f6b54869bcddd0b5789aef4701daa9d1ab Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Mon, 17 Jun 2024 16:44:23 +0200 Subject: [PATCH 16/26] chore(test):[#529] Fix test and expected submodels for SingleLevelBomAsBuilt --- ...level-bom-as-built-expected-submodels.json | 80 +++++++++++++++++-- .../529-version-compatibility.feature | 7 +- 2 files changed, 77 insertions(+), 10 deletions(-) diff --git a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-submodels.json b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-submodels.json index 72aa797fff..71a09354b5 100644 --- a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-submodels.json +++ b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-submodels.json @@ -1,11 +1,11 @@ { "submodels": [ { - "identification": "urn:uuid:54d3e5a3-4f80-4386-ae43-3a5080544f29", + "identification": "urn:uuid:3cbca689-83ed-40d9-81c1-3d060d54fd80", "aspectType": "urn:samm:io.catenax.serial_part:1.0.1#SerialPart", "contractAgreementId": null, "payload": { - "catenaXId": "urn:uuid:25bba830-bcd8-4123-be72-e5507b2ae827", + "catenaXId": "urn:uuid:bec0a457-4d6b-4c1c-88f7-125d04f04d68", "localIdentifiers": [ { "value": "SN12345678", @@ -26,11 +26,11 @@ } }, { - "identification": "urn:uuid:4e94baab-6de5-4fe4-8dea-65030e5ef45e", + "identification": "urn:uuid:b7a19cfc-eed3-4f98-a440-352641cad328", "aspectType": "urn:samm:io.catenax.serial_part:2.0.0#SerialPart", "contractAgreementId": null, "payload": { - "catenaXId": "urn:uuid:162cb1f1-c619-47db-ab7f-44a111a762fc", + "catenaXId": "urn:uuid:6e709d64-bdc7-49f4-a87d-4e1f7e2c3b7c", "localIdentifiers": [ { "value": "SN34567890", @@ -57,11 +57,79 @@ } }, { - "identification": "urn:uuid:877f0599-a54a-4131-98e5-1334a15efb68", + "identification": "urn:uuid:11d9d776-1239-45f8-9f28-e8e841a78b92", "aspectType": "urn:samm:io.catenax.serial_part:2.0.0#SerialPart", "contractAgreementId": null, "payload": { - "catenaXId": "urn:uuid:bc8b6912-4be3-4b4c-a28a-919ba405a5c2", + "catenaXId": "urn:uuid:589d7f27-d200-4009-b24c-27b0f4b81528", + "localIdentifiers": [ + { + "value": "SN23456789", + "key": "partInstanceID" + } + ], + "manufacturingInformation": { + "date": "2024-03-04T11:12:13", + "country": "HUR" + }, + "sites": [ + { + "catenaXsiteId": "BPNS3456789012ZZ", + "function": "production" + } + ], + "partTypeInformation": { + "manufacturerPartId": "567-8.901-2345-B", + "customerPartId": "PRT-78901", + "classification": "product", + "nameAtManufacturer": "Test part 2", + "nameAtCustomer": "Test part 2 customer" + } + } + }, + { + "identification": "urn:uuid:d68ebb1b-9ab5-405f-956d-a5b514484c99", + "aspectType": "urn:samm:io.catenax.serial_part:3.0.0#SerialPart", + "contractAgreementId": null, + "payload": { + "catenaXId": "urn:uuid:589d7f27-d200-4009-b24c-27b0f4b81528", + "localIdentifiers": [ + { + "value": "SN56789012", + "key": "partInstanceId" + } + ], + "manufacturingInformation": { + "date": "2024-05-05T07:08:09Z", + "country": "HUR", + "sites": [ + { + "catenaXsiteId": "BPNS5678901234ZZ", + "function": "production" + } + ] + }, + "partTypeInformation": { + "partClassification": [ + { + "classificationStandard": "IEC", + "classificationID": "72451- 3:2012 ", + "classificationDescription": "Standard data element types with associated classification scheme for electric components." + } + ], + "manufacturerPartId": "890-1.234-5678-E", + "customerPartId": "PRT-89012", + "nameAtManufacturer": "Test part 3", + "nameAtCustomer": "Test part 3 customer" + } + } + }, + { + "identification": "urn:uuid:1c685bc9-efdc-4f74-b5f1-c9d2af385b55", + "aspectType": "urn:samm:io.catenax.serial_part:2.0.0#SerialPart", + "contractAgreementId": null, + "payload": { + "catenaXId": "urn:uuid:d23f278b-2d8b-4f11-af76-2a9a7bb91cfc", "localIdentifiers": [ { "value": "SN45678901", diff --git a/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature b/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature index b2011db79c..7ae6f47211 100644 --- a/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature +++ b/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature @@ -20,10 +20,9 @@ Feature: [TESTING] Integration E2E Tests for backward compatibility #529 And bomLifecycle "asBuilt" And aspects : - | urn:samm:io.catenax.single_level_bom_as_built:3.0.0#SingleLevelBomAsBuilt | - | urn:samm:io.catenax.serial_part:1.0.1#SerialPart | - | urn:samm:io.catenax.serial_part:2.0.0#SerialPart | - | urn:samm:io.catenax.serial_part:3.0.0#SerialPart | + | urn:samm:io.catenax.serial_part:1.0.1#SerialPart | + | urn:samm:io.catenax.serial_part:2.0.0#SerialPart | + | urn:samm:io.catenax.serial_part:3.0.0#SerialPart | When I get the job-id Then I check, if the job has status "COMPLETED" within 20 minutes From 75ac5dc8305e28036673b0be986e0bd2b1334100 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Mon, 17 Jun 2024 16:45:27 +0200 Subject: [PATCH 17/26] chore(test):[#529] Add note --- .../resources/features_new/529-version-compatibility.feature | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature b/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature index 7ae6f47211..bea6ec465f 100644 --- a/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature +++ b/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature @@ -1,5 +1,9 @@ Feature: [TESTING] Integration E2E Tests for backward compatibility #529 + # Notes: + # - For possible values of "direction" and "bomLifecycle" see RealtionshipAspect. + + Background: Given the IRS URL "https://irs.dev.demo.catena-x.net" And the admin user api key @@ -15,7 +19,6 @@ Feature: [TESTING] Integration E2E Tests for backward compatibility #529 And collectAspects "true" And depth 10 - # SingleLevelBomAsBuilt (see RelationshipAspect) And direction "downward" And bomLifecycle "asBuilt" From 9a052086fa220a92b9c92433910d1d212c143621 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Mon, 17 Jun 2024 19:29:01 +0200 Subject: [PATCH 18/26] chore(test):[#529] Correct SingleLeveBomAsPlanned --- ...-E2E-tests-aspect-version-compatibility.md | 40 ++++++------ ...bom-as-planned-expected-relationships.json | 58 ++++++++++++++++- ...vel-bom-as-planned-expected-submodels.json | 64 ++++++++++++++++++- .../529-version-compatibility.feature | 8 +-- ...compatibility_SingleLevelBomAsPlanned.json | 52 +++++++-------- 5 files changed, 168 insertions(+), 54 deletions(-) diff --git a/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md index 825be2c9d7..4952723877 100644 --- a/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md +++ b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md @@ -14,16 +14,16 @@ Test data: Structure of test data: -- OK: SingleLevelBomAsBuilt 3.0.0, BPNL00000007QG00, urn:uuid:bec0a457-4d6b-4c1c-88f7-125d04f04d68 - - OK: SerialPart 1.0.1, urn:uuid:25bba830-bcd8-4123-be72-e5507b2ae827 - - ??: SingleLevelBomAsBuilt 3.1.0, BPNL00000007RI31, urn:uuid:589d7f27-d200-4009-b24c-27b0f4b81528 --> Tombstone: Unable to find any of the requested shells. Why? - - ??: futureAddedField - - ??: SerialPart 2.0.0, urn:uuid:1c151801-0d9d-4fc6-af91-0ddcfe8d86e3 - - ??: SerialPart 3.0.0, urn:uuid:5bd8e513-b69d-4b08-a387-24d787ac5545 +- SingleLevelBomAsBuilt 3.0.0, BPNL00000007QG00, urn:uuid:bec0a457-4d6b-4c1c-88f7-125d04f04d68 + - SerialPart 1.0.1 + - SingleLevelBomAsBuilt 3.1.0, BPNL00000007RI31, urn:uuid:589d7f27-d200-4009-b24c-27b0f4b81528 + - futureAddedField + - SerialPart 2.0.0 + - SerialPart 3.0.0 - SingleLevelBomAsBuilt 2.0.0, BPNL00000003CSAP, urn:uuid:6e709d64-bdc7-49f4-a87d-4e1f7e2c3b7c - - OK: SerialPart 2.0.0, urn:uuid:162cb1f1-c619-47db-ab7f-44a111a762fc - - OK: SingleLevelBomAsBuilt 2.0.0, BPNL00000007RNYV, urn:uuid:d23f278b-2d8b-4f11-af76-2a9a7bb91cfc - - OK: SerialPart 2.0.0, urn:uuid:bc8b6912-4be3-4b4c-a28a-919ba405a5c2 + - SerialPart 2.0.0 + - SingleLevelBomAsBuilt 2.0.0, BPNL00000007RNYV, urn:uuid:d23f278b-2d8b-4f11-af76-2a9a7bb91cfc + - SerialPart 2.0.0 Test: @@ -38,21 +38,21 @@ Test data: - [CX_Testdata_529_compatibility_SingleLevelBomAsPlanned.json](../../../local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsPlanned.json) Structure of test data: -- SingleLevelBomAsPlanned 3.0.0, BPNL00E2EASPCPT1, urn:uuid:db884234-9266-4c4a-a5f7-de87d95d0cb5 - - SingleLevelBomAsPlanned 3.1.0, BPNL00E2EASPCP11, urn:uuid:cb5fdf70-9ddd-42cd-b8c1-0e09bc561601 +- SingleLevelBomAsPlanned 3.0.0, BPNL00000007QG00, urn:uuid:0bc18367-69c3-428f-925d-6f8a461edefd + - SingleLevelBomAsPlanned 3.1.0, BPNL00000007QG00, urn:uuid:db60f953-8894-4568-ab74-746ce00e78a1 - futureAddedField - - PartAsPlanned 2.0.0, urn:uuid:4bf0acbc-fd1c-46f3-a4df-6da98be2ee8d - - SingleLevelBomAsPlanned 2.0.0, BPNL00E2EASPCP12, urn:uuid:8acc354c-5ca3-4cd7-83bf-a28681e99f28 - - PartAsPlanned 2.0.0, urn:uuid:1ddca474-2fd6-48c4-aa16-54a03fe40cd7 - - SingleLevelBomAsPlanned 2.0.0, urn:uuid:3161de8c-923a-415a-9a6b-0b902e3153b9 - - PartAsPlanned 2.0.0, urn:uuid:b091ce38-22dc-4f79-bb3b-7e1af648b176 - - + - PartAsPlanned 2.0.0 Test part 1 + - SingleLevelBomAsPlanned 2.0.0, BPNL00000007QG00, urn:uuid:4e8dd2c1-0d21-4794-af92-03a12f85a2eb + - PartAsPlanned 2.0.0 Test part 2 + - SingleLevelBomAsPlanned 2.0.0, BPNL00000007QG00, urn:uuid:7eb80b65-2e43-438c-8c2a-32b814d2cb88 + - PartAsPlanned 2.0.0 Test part 3 + + Test: - [Cucumber test - scenario "SingleLevelBomAsPlanned"](../../../irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature) - - [529-single-level-bom-as-planned-expected-relationships.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-relationships.json) - - [529-single-level-bom-as-planned-expected-submodels.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-submodels.json) + - [529-single-level-bom-as-planned-expected-relationships.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-relationships.json) + - [529-single-level-bom-as-planned-expected-submodels.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-submodels.json) ## SingleLevelUsageAsBuilt diff --git a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-relationships.json b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-relationships.json index 036cdf99b4..82698c39df 100644 --- a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-relationships.json +++ b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-relationships.json @@ -1,5 +1,61 @@ { - "_todo": "todo #529 execute test, check if result is ok, add relationships here", "relationships": [ + { + "catenaXId": "urn:uuid:0bc18367-69c3-428f-925d-6f8a461edefd", + "linkedItem": { + "quantity": { + "quantityNumber": 20.0, + "measurementUnit": { + "datatypeURI": null, + "lexicalValue": "unit:piece" + } + }, + "lifecycleContext": "asPlanned", + "assembledOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "childCatenaXId": "urn:uuid:4e8dd2c1-0d21-4794-af92-03a12f85a2eb", + "hasAlternatives": false + }, + "aspectType": "SingleLevelBomAsPlanned", + "bpn": "BPNL00000007QG00" + }, + { + "catenaXId": "urn:uuid:0bc18367-69c3-428f-925d-6f8a461edefd", + "linkedItem": { + "quantity": { + "quantityNumber": 20.0, + "measurementUnit": { + "datatypeURI": null, + "lexicalValue": "unit:piece" + } + }, + "lifecycleContext": "asPlanned", + "assembledOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "childCatenaXId": "urn:uuid:db60f953-8894-4568-ab74-746ce00e78a1", + "hasAlternatives": false + }, + "aspectType": "SingleLevelBomAsPlanned", + "bpn": "BPNL00000007QG00" + }, + { + "catenaXId": "urn:uuid:4e8dd2c1-0d21-4794-af92-03a12f85a2eb", + "linkedItem": { + "quantity": { + "quantityNumber": 2.5, + "measurementUnit": { + "datatypeURI": null, + "lexicalValue": "unit:litre" + } + }, + "lifecycleContext": "asPlanned", + "assembledOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "childCatenaXId": "urn:uuid:7eb80b65-2e43-438c-8c2a-32b814d2cb88", + "hasAlternatives": false + }, + "aspectType": "SingleLevelBomAsPlanned", + "bpn": "BPNL00000007QG00" + } ] } \ No newline at end of file diff --git a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-submodels.json b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-submodels.json index 6171a4a6d2..0a24054028 100644 --- a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-submodels.json +++ b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-submodels.json @@ -1,5 +1,67 @@ { - "_todo": "todo #529 execute test, check if result is ok, add submodels here", "submodels": [ + { + "identification": "urn:uuid:169b7e61-88ee-47d0-8329-68ed5b7148d8", + "aspectType": "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned", + "contractAgreementId": null, + "payload": { + "catenaXId": "urn:uuid:4e8dd2c1-0d21-4794-af92-03a12f85a2eb", + "partTypeInformation": { + "classification": "product", + "manufacturerPartId": "345-6.789-0123-A", + "nameAtManufacturer": "Test part 2" + }, + "partSitesInformationAsPlanned": [ + { + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNL00000007QG00", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" + } + ] + } + }, + { + "identification": "urn:uuid:24fe09b2-9a72-474d-9d01-268b417267e1", + "aspectType": "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned", + "contractAgreementId": null, + "payload": { + "catenaXId": "urn:uuid:db60f953-8894-4568-ab74-746ce00e78a1", + "partTypeInformation": { + "classification": "product", + "manufacturerPartId": "123-4.567-8901-A", + "nameAtManufacturer": "Test part 1" + }, + "partSitesInformationAsPlanned": [ + { + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNL00000007QG00", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" + } + ] + } + }, + { + "identification": "urn:uuid:c419973a-5e86-4821-b2f0-b064c3afd488", + "aspectType": "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned", + "contractAgreementId": null, + "payload": { + "catenaXId": "urn:uuid:7eb80b65-2e43-438c-8c2a-32b814d2cb88", + "partTypeInformation": { + "classification": "product", + "manufacturerPartId": "234-5.678-9012-A", + "nameAtManufacturer": "Test part 3" + }, + "partSitesInformationAsPlanned": [ + { + "functionValidUntil": "2023-12-11T06:14:55.183Z", + "catenaXsiteId": "BPNL00000007QG00", + "function": "production", + "functionValidFrom": "2023-12-11T06:14:55.181Z" + } + ] + } + } ] } \ No newline at end of file diff --git a/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature b/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature index bea6ec465f..b427601454 100644 --- a/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature +++ b/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature @@ -1,7 +1,7 @@ Feature: [TESTING] Integration E2E Tests for backward compatibility #529 # Notes: - # - For possible values of "direction" and "bomLifecycle" see RealtionshipAspect. + # - For possible values of "direction" and "bomLifecycle" see RelationshipAspect. Background: @@ -9,7 +9,6 @@ Feature: [TESTING] Integration E2E Tests for backward compatibility #529 And the admin user api key - ###################################################################################################################### ## SingleLevelBomAsBuilt ###################################################################################################################### @@ -38,11 +37,10 @@ Feature: [TESTING] Integration E2E Tests for backward compatibility #529 ###################################################################################################################### Scenario: SingleLevelBomAsPlanned - Given I register an IRS job for globalAssetId "urn:uuid:db884234-9266-4c4a-a5f7-de87d95d0cb5" and BPN "BPNL00000003AYRE" + Given I register an IRS job for globalAssetId "urn:uuid:0bc18367-69c3-428f-925d-6f8a461edefd" and BPN "BPNL00000007QG00" And collectAspects "true" And depth 10 - # SingleLevelBomAsPlanned (see RelationshipAspect) And direction "downward" And bomLifecycle "asPlanned" @@ -55,7 +53,6 @@ Feature: [TESTING] Integration E2E Tests for backward compatibility #529 And I check, if "submodels" are equal to "529-single-level-bom-as-planned-expected-submodels.json" - ###################################################################################################################### ## SingleLevelUsageAsBuilt ###################################################################################################################### @@ -75,7 +72,6 @@ Feature: [TESTING] Integration E2E Tests for backward compatibility #529 And I check, if "submodels" are equal to "529-single-level-usage-as-built-expected-submodels.json" - ###################################################################################################################### ## SingleLevelUsageAsPlanned ###################################################################################################################### diff --git a/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsPlanned.json b/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsPlanned.json index 34b9345998..3d8c29e471 100644 --- a/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsPlanned.json +++ b/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsPlanned.json @@ -40,15 +40,15 @@ }, "https://catenax.io/schema/TestDataContainer/1.0.0": [ { - "catenaXId": "urn:uuid:db884234-9266-4c4a-a5f7-de87d95d0cb5", - "bpnl": "BPNL00E2EASPCPT1", + "catenaXId": "urn:uuid:0bc18367-69c3-428f-925d-6f8a461edefd", + "bpnl": "BPNL00000007QG00", "urn:samm:io.catenax.single_level_bom_as_planned:3.0.0#SingleLevelBomAsPlanned": [ { - "catenaXId": "urn:uuid:db884234-9266-4c4a-a5f7-de87d95d0cb5", + "catenaXId": "urn:uuid:0bc18367-69c3-428f-925d-6f8a461edefd", "childItems": [ { - "catenaXId": "urn:uuid:cb5fdf70-9ddd-42cd-b8c1-0e09bc561601", - "businessPartner": "BPNL00E2EASPCP11", + "catenaXId": "urn:uuid:db60f953-8894-4568-ab74-746ce00e78a1", + "businessPartner": "BPNL00000007QG00", "validityPeriod": { "validFrom": "2023-03-21T08:17:29.187+01:00", "validTo": "2024-07-01T16:10:00.000+01:00" @@ -61,8 +61,8 @@ "lastModifiedOn": "2022-02-03T14:48:54.709Z" }, { - "catenaXId": "urn:uuid:8acc354c-5ca3-4cd7-83bf-a28681e99f28", - "businessPartner": "BPNL00E2EASPCP12", + "catenaXId": "urn:uuid:4e8dd2c1-0d21-4794-af92-03a12f85a2eb", + "businessPartner": "BPNL00000007QG00", "validityPeriod": { "validFrom": "2023-03-21T08:17:29.187+01:00", "validTo": "2024-07-01T16:10:00.000+01:00" @@ -79,18 +79,18 @@ ] }, { - "catenaXId": "urn:uuid:cb5fdf70-9ddd-42cd-b8c1-0e09bc561601", - "bpnl": "BPNL00E2EASPCP11", + "catenaXId": "urn:uuid:db60f953-8894-4568-ab74-746ce00e78a1", + "bpnl": "BPNL00000007QG00", "urn:samm:io.catenax.single_level_bom_as_planned:3.1.0#SingleLevelBomAsPlanned": [ { - "catenaXId": "urn:uuid:cb5fdf70-9ddd-42cd-b8c1-0e09bc561601", + "catenaXId": "urn:uuid:db60f953-8894-4568-ab74-746ce00e78a1", "childItems": [], "futureAddedField": "test" } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ { - "catenaXId": "urn:uuid:4bf0acbc-fd1c-46f3-a4df-6da98be2ee8d", + "catenaXId": "urn:uuid:db60f953-8894-4568-ab74-746ce00e78a1", "partTypeInformation": { "classification": "product", "manufacturerPartId": "123-4.567-8901-A", @@ -99,7 +99,7 @@ "partSitesInformationAsPlanned": [ { "functionValidUntil": "2023-12-11T06:14:55.183Z", - "catenaXsiteId": "BPNS1234567890ZZ", + "catenaXsiteId": "BPNL00000007QG00", "function": "production", "functionValidFrom": "2023-12-11T06:14:55.181Z" } @@ -108,14 +108,14 @@ ] }, { - "catenaXId": "urn:uuid:8acc354c-5ca3-4cd7-83bf-a28681e99f28", - "bpnl": "BPNL00E2EASPCP12", + "catenaXId": "urn:uuid:4e8dd2c1-0d21-4794-af92-03a12f85a2eb", + "bpnl": "BPNL00000007QG00", "urn:samm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned": [ { - "catenaXId": "urn:uuid:8acc354c-5ca3-4cd7-83bf-a28681e99f28", + "catenaXId": "urn:uuid:4e8dd2c1-0d21-4794-af92-03a12f85a2eb", "childItems" : [ { - "catenaXId" : "urn:uuid:3161de8c-923a-415a-9a6b-0b902e3153b9", - "businessPartner" : "BPNL00E2EASPC121", + "catenaXId" : "urn:uuid:7eb80b65-2e43-438c-8c2a-32b814d2cb88", + "businessPartner" : "BPNL00000007QG00", "validityPeriod" : { "validFrom" : "2023-03-21T08:17:29.187+01:00", "validTo" : "2024-07-01T16:10:00.000+01:00" @@ -131,16 +131,16 @@ ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ { - "catenaXId": "urn:uuid:1ddca474-2fd6-48c4-aa16-54a03fe40cd7", + "catenaXId": "urn:uuid:4e8dd2c1-0d21-4794-af92-03a12f85a2eb", "partTypeInformation": { "classification": "product", "manufacturerPartId": "345-6.789-0123-A", - "nameAtManufacturer": "Test part 3" + "nameAtManufacturer": "Test part 2" }, "partSitesInformationAsPlanned": [ { "functionValidUntil": "2023-12-11T06:14:55.183Z", - "catenaXsiteId": "BPNS1234567890ZZ", + "catenaXsiteId": "BPNL00000007QG00", "function": "production", "functionValidFrom": "2023-12-11T06:14:55.181Z" } @@ -149,26 +149,26 @@ ] }, { - "catenaXId": "urn:uuid:3161de8c-923a-415a-9a6b-0b902e3153b9", - "bpnl": "BPNL00E2EASPC121", + "catenaXId": "urn:uuid:7eb80b65-2e43-438c-8c2a-32b814d2cb88", + "bpnl": "BPNL00000007QG00", "urn:samm:io.catenax.single_level_bom_as_planned:2.0.0#SingleLevelBomAsPlanned": [ { - "catenaXId": "urn:uuid:3161de8c-923a-415a-9a6b-0b902e3153b9", + "catenaXId": "urn:uuid:7eb80b65-2e43-438c-8c2a-32b814d2cb88", "childItems" : [ ] } ], "urn:samm:io.catenax.part_as_planned:2.0.0#PartAsPlanned": [ { - "catenaXId": "urn:uuid:b091ce38-22dc-4f79-bb3b-7e1af648b176", + "catenaXId": "urn:uuid:7eb80b65-2e43-438c-8c2a-32b814d2cb88", "partTypeInformation": { "classification": "product", "manufacturerPartId": "234-5.678-9012-A", - "nameAtManufacturer": "Test part 2" + "nameAtManufacturer": "Test part 3" }, "partSitesInformationAsPlanned": [ { "functionValidUntil": "2023-12-11T06:14:55.183Z", - "catenaXsiteId": "BPNS1234567890ZZ", + "catenaXsiteId": "BPNL00000007QG00", "function": "production", "functionValidFrom": "2023-12-11T06:14:55.181Z" } From 92183db4ec69e3fb06062755adac1f0b467a5037 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Tue, 18 Jun 2024 11:10:13 +0200 Subject: [PATCH 19/26] chore(test):[#529] Correct SingleLevelUsageAsBuilt --- ...-E2E-tests-aspect-version-compatibility.md | 6 +-- ...usage-as-built-expected-relationships.json | 39 ++++++++++++++++++- ...vel-usage-as-built-expected-submodels.json | 1 - .../529-version-compatibility.feature | 6 +-- ...compatibility_SingleLevelUsageAsBuilt.json | 22 +++++------ 5 files changed, 55 insertions(+), 19 deletions(-) diff --git a/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md index 4952723877..71741ccebf 100644 --- a/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md +++ b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md @@ -65,10 +65,10 @@ Test data: Structure of test data: -- SingleLevelUsageAsBuilt 3.0.0, BPNL00E2EASPCPT1, urn:uuid:c7b5c21b-d2c0-4b86-8283-a8932baf03b3 - - SingleLevelUsageAsBuilt 3.1.0, BPNL00E2EASPCP11, urn:uuid:13d35275-3b9b-4f0c-bc5e-00f656bb7cbc +- SingleLevelUsageAsBuilt 3.0.0, BPNL00000007QG00, urn:uuid:677582a5-bdca-45e1-a671-7a98ff5ddcb7 + - SingleLevelUsageAsBuilt 3.1.0, BPNL00000007QG00, urn:uuid:13d35275-3b9b-4f0c-bc5e-00f656bb7cbc - futureAddedField - - SingleLevelUsageAsBuilt 2.0.0, BPNL00E2EASPCP12, urn:uuid:2ea93a69-7ecb-4747-94f4-960c2535dc7b + - SingleLevelUsageAsBuilt 2.0.0, BPNL00000007QG00, urn:uuid:2ea93a69-7ecb-4747-94f4-960c2535dc7b Test: diff --git a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-built-expected-relationships.json b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-built-expected-relationships.json index 036cdf99b4..815019b1a4 100644 --- a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-built-expected-relationships.json +++ b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-built-expected-relationships.json @@ -1,5 +1,42 @@ { - "_todo": "todo #529 execute test, check if result is ok, add relationships here", "relationships": [ + { + "catenaXId": "urn:uuid:13d35275-3b9b-4f0c-bc5e-00f656bb7cbc", + "linkedItem": { + "quantity": { + "quantityNumber": 12.0, + "measurementUnit": { + "datatypeURI": null, + "lexicalValue": "unit:piece" + } + }, + "lifecycleContext": "asBuilt", + "assembledOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "childCatenaXId": "urn:uuid:2ea93a69-7ecb-4747-94f4-960c2535dc7b", + "hasAlternatives": false + }, + "aspectType": "SingleLevelUsageAsBuilt", + "bpn": "BPNL00000007QG00" + }, + { + "catenaXId": "urn:uuid:677582a5-bdca-45e1-a671-7a98ff5ddcb7", + "linkedItem": { + "quantity": { + "quantityNumber": 11.0, + "measurementUnit": { + "datatypeURI": null, + "lexicalValue": "unit:piece" + } + }, + "lifecycleContext": "asBuilt", + "assembledOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "childCatenaXId": "urn:uuid:13d35275-3b9b-4f0c-bc5e-00f656bb7cbc", + "hasAlternatives": false + }, + "aspectType": "SingleLevelUsageAsBuilt", + "bpn": "BPNL00000007QG00" + } ] } \ No newline at end of file diff --git a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-built-expected-submodels.json b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-built-expected-submodels.json index 6171a4a6d2..2618c947a0 100644 --- a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-built-expected-submodels.json +++ b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-built-expected-submodels.json @@ -1,5 +1,4 @@ { - "_todo": "todo #529 execute test, check if result is ok, add submodels here", "submodels": [ ] } \ No newline at end of file diff --git a/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature b/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature index b427601454..c0ccefeca0 100644 --- a/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature +++ b/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature @@ -58,11 +58,10 @@ Feature: [TESTING] Integration E2E Tests for backward compatibility #529 ###################################################################################################################### Scenario: SingleLevelUsageAsBuilt - Given I register an IRS job for globalAssetId "urn:uuid:15cf842e-b20e-4219-a61b-99c01cec42ea" and BPN "BPNL00000003AVTH" + Given I register an IRS job for globalAssetId "urn:uuid:2ea93a69-7ecb-4747-94f4-960c2535dc7b" and BPN "BPNL00000007QG00" And collectAspects "true" And depth 10 - # SingleLevelUsageAsBuilt (see RelationshipAspect) And direction "upward" And bomLifecycle "asBuilt" @@ -72,6 +71,8 @@ Feature: [TESTING] Integration E2E Tests for backward compatibility #529 And I check, if "submodels" are equal to "529-single-level-usage-as-built-expected-submodels.json" + + ###################################################################################################################### ## SingleLevelUsageAsPlanned ###################################################################################################################### @@ -81,7 +82,6 @@ Feature: [TESTING] Integration E2E Tests for backward compatibility #529 And collectAspects "true" And depth 10 - # SingleLevelUsageAsPlanned (see RelationshipAspect) And direction "upward" And bomLifecycle "asPlanned" diff --git a/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelUsageAsBuilt.json b/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelUsageAsBuilt.json index ea99b79fde..502b8e4251 100644 --- a/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelUsageAsBuilt.json +++ b/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelUsageAsBuilt.json @@ -40,25 +40,25 @@ }, "https://catenax.io/schema/TestDataContainer/1.0.0": [ { - "catenaXId": "urn:uuid:c7b5c21b-d2c0-4b86-8283-a8932baf03b3", - "bpnl": "BPNL00E2EASPCPT1", + "catenaXId": "urn:uuid:677582a5-bdca-45e1-a671-7a98ff5ddcb7", + "bpnl": "BPNL00000007QG00", "urn:samm:io.catenax.single_level_usage_as_built:3.0.0#SingleLevelUsageAsBuilt": [ { - "catenaXId": "urn:uuid:c7b5c21b-d2c0-4b86-8283-a8932baf03b3", + "catenaXId": "urn:uuid:677582a5-bdca-45e1-a671-7a98ff5ddcb7", "parentItems": [] } ] }, { "catenaXId": "urn:uuid:13d35275-3b9b-4f0c-bc5e-00f656bb7cbc", - "bpnl": "BPNL00E2EASPCP11", + "bpnl": "BPNL00000007QG00", "urn:samm:io.catenax.single_level_usage_as_built:3.1.0#SingleLevelUsageAsBuilt": [ { "catenaXId": "urn:uuid:13d35275-3b9b-4f0c-bc5e-00f656bb7cbc", "parentItems": [ { - "catenaXId": "urn:uuid:c7b5c21b-d2c0-4b86-8283-a8932baf03b3", - "businessPartner": "BPNL00E2EASPCPT1", + "catenaXId": "urn:uuid:677582a5-bdca-45e1-a671-7a98ff5ddcb7", + "businessPartner": "BPNL00000007QG00", "isOnlyPotentialParent": false, "quantity": { "value": 11.0, @@ -69,7 +69,7 @@ } ], "customers": [ - "BPNL00E2EASPCPT1" + "BPNL00000007QG00" ], "futureAddedField": "test" } @@ -77,14 +77,14 @@ }, { "catenaXId": "urn:uuid:2ea93a69-7ecb-4747-94f4-960c2535dc7b", - "bpnl": "BPNL00E2EASPCP12", + "bpnl": "BPNL00000007QG00", "urn:samm:io.catenax.single_level_usage_as_built:3.0.0#SingleLevelUsageAsBuilt": [ { "catenaXId": "urn:uuid:2ea93a69-7ecb-4747-94f4-960c2535dc7b", "parentItems": [ { - "catenaXId": "urn:uuid:c7b5c21b-d2c0-4b86-8283-a8932baf03b3", - "businessPartner": "BPNL00E2EASPCPT1", + "catenaXId": "urn:uuid:13d35275-3b9b-4f0c-bc5e-00f656bb7cbc", + "businessPartner": "BPNL00000007QG00", "isOnlyPotentialParent": false, "quantity": { "value": 12.0, @@ -95,7 +95,7 @@ } ], "customers": [ - "BPNL00E2EASPCPT1" + "BPNL00000007QG00" ] } ] From 75ce0572b8f767fa27734f672af39a8ac219184f Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Tue, 18 Jun 2024 13:29:04 +0200 Subject: [PATCH 20/26] chore(test):[#529] Correct SingleLevelUsageAsPlanned --- ...-E2E-tests-aspect-version-compatibility.md | 6 +-- ...age-as-planned-expected-relationships.json | 39 ++++++++++++++++++- ...l-usage-as-planned-expected-submodels.json | 1 - .../529-version-compatibility.feature | 2 +- ...mpatibility_SingleLevelUsageAsPlanned.json | 16 ++++---- 5 files changed, 50 insertions(+), 14 deletions(-) diff --git a/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md index 71741ccebf..27a1c36436 100644 --- a/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md +++ b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md @@ -87,10 +87,10 @@ Test data: Structure of test data: -- SingleLevelUsageAsPlanned 3.0.0, BPNL00E2EASPCPT1, urn:uuid:c4fa7e6c-6aed-4bc4-acc9-b8839c94d13c - - SingleLevelUsageAsPlanned 3.1.0, BPNL00E2EASPCP11, urn:uuid:d7a1adba-5c99-4b86-b1c6-9f0bb341f170 +- SingleLevelUsageAsPlanned 3.0.0, BPNL00000007QG00, urn:uuid:4e8aa114-cf50-4780-811c-11723c9f0647 + - SingleLevelUsageAsPlanned 3.1.0, BPNL00000007QG00, urn:uuid:01f4b57e-1ab3-4822-ab1b-e20651f6fd32 - futureAddedField - - SingleLevelUsageAsPlanned 2.0.0, BPNL00E2EASPCP12, urn:uuid:bdacb7fa-aeb2-4c4d-b555-c8b92b014785 + - SingleLevelUsageAsPlanned 2.0.0, BPNL00000007QG00, urn:uuid:7fe9ac70-23c4-449a-88c1-3832a1cc6da6 Test: diff --git a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-planned-expected-relationships.json b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-planned-expected-relationships.json index 036cdf99b4..05aad0a3d2 100644 --- a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-planned-expected-relationships.json +++ b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-planned-expected-relationships.json @@ -1,5 +1,42 @@ { - "_todo": "todo #529 execute test, check if result is ok, add relationships here", "relationships": [ + { + "catenaXId": "urn:uuid:01f4b57e-1ab3-4822-ab1b-e20651f6fd32", + "linkedItem": { + "quantity": { + "quantityNumber": 12.0, + "measurementUnit": { + "datatypeURI": null, + "lexicalValue": "unit:piece" + } + }, + "lifecycleContext": "asPlanned", + "assembledOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "childCatenaXId": "urn:uuid:7fe9ac70-23c4-449a-88c1-3832a1cc6da6", + "hasAlternatives": false + }, + "aspectType": "SingleLevelUsageAsPlanned", + "bpn": "BPNL00000007QG00" + }, + { + "catenaXId": "urn:uuid:4e8aa114-cf50-4780-811c-11723c9f0647", + "linkedItem": { + "quantity": { + "quantityNumber": 11.0, + "measurementUnit": { + "datatypeURI": null, + "lexicalValue": "unit:piece" + } + }, + "lifecycleContext": "asPlanned", + "assembledOn": "2022-02-03T14:48:54.709Z", + "lastModifiedOn": "2022-02-03T14:48:54.709Z", + "childCatenaXId": "urn:uuid:01f4b57e-1ab3-4822-ab1b-e20651f6fd32", + "hasAlternatives": false + }, + "aspectType": "SingleLevelUsageAsPlanned", + "bpn": "BPNL00000007QG00" + } ] } \ No newline at end of file diff --git a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-planned-expected-submodels.json b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-planned-expected-submodels.json index 6171a4a6d2..2618c947a0 100644 --- a/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-planned-expected-submodels.json +++ b/irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-planned-expected-submodels.json @@ -1,5 +1,4 @@ { - "_todo": "todo #529 execute test, check if result is ok, add submodels here", "submodels": [ ] } \ No newline at end of file diff --git a/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature b/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature index c0ccefeca0..1d78ffbc1f 100644 --- a/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature +++ b/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature @@ -78,7 +78,7 @@ Feature: [TESTING] Integration E2E Tests for backward compatibility #529 ###################################################################################################################### Scenario: SingleLevelUsageAsPlanned - Given I register an IRS job for globalAssetId "urn:uuid:15cf842e-b20e-4219-a61b-99c01cec42ea" and BPN "BPNL00000003AVTH" + Given I register an IRS job for globalAssetId "urn:uuid:7fe9ac70-23c4-449a-88c1-3832a1cc6da6" and BPN "BPNL00000007QG00" And collectAspects "true" And depth 10 diff --git a/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelUsageAsPlanned.json b/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelUsageAsPlanned.json index eea335d4b2..612199257f 100644 --- a/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelUsageAsPlanned.json +++ b/local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelUsageAsPlanned.json @@ -41,7 +41,7 @@ "https://catenax.io/schema/TestDataContainer/1.0.0": [ { "catenaXId": "urn:uuid:4e8aa114-cf50-4780-811c-11723c9f0647", - "bpnl": "BPNL00E2EASPCPT1", + "bpnl": "BPNL00000007QG00", "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned": [ { "catenaXId": "urn:uuid:4e8aa114-cf50-4780-811c-11723c9f0647", @@ -51,14 +51,14 @@ }, { "catenaXId": "urn:uuid:01f4b57e-1ab3-4822-ab1b-e20651f6fd32", - "bpnl": "BPNL00E2EASPCP11", + "bpnl": "BPNL00000007QG00", "urn:samm:io.catenax.single_level_usage_as_planned:2.1.0#SingleLevelUsageAsPlanned": [ { "catenaXId": "urn:uuid:01f4b57e-1ab3-4822-ab1b-e20651f6fd32", "parentItems": [ { "catenaXId": "urn:uuid:4e8aa114-cf50-4780-811c-11723c9f0647", - "businessPartner": "BPNL00E2EASPCPT1", + "businessPartner": "BPNL00000007QG00", "validityPeriod": { "validFrom": "2023-03-21T08:17:29.187+01:00", "validTo": "2024-07-01T16:10:00.000+01:00" @@ -72,7 +72,7 @@ } ], "customers": [ - "BPNL00E2EASPCPT1" + "BPNL00000007QG00" ], "futureAddedField": "test" } @@ -80,14 +80,14 @@ }, { "catenaXId": "urn:uuid:7fe9ac70-23c4-449a-88c1-3832a1cc6da6", - "bpnl": "BPNL00E2EASPCP12", + "bpnl": "BPNL00000007QG00", "urn:samm:io.catenax.single_level_usage_as_planned:2.0.0#SingleLevelUsageAsPlanned": [ { "catenaXId": "urn:uuid:7fe9ac70-23c4-449a-88c1-3832a1cc6da6", "parentItems": [ { - "catenaXId": "urn:uuid:4e8aa114-cf50-4780-811c-11723c9f0647", - "businessPartner": "BPNL00E2EASPCPT1", + "catenaXId": "urn:uuid:01f4b57e-1ab3-4822-ab1b-e20651f6fd32", + "businessPartner": "BPNL00000007QG00", "validityPeriod": { "validFrom": "2023-03-21T08:17:29.187+01:00", "validTo": "2024-07-01T16:10:00.000+01:00" @@ -101,7 +101,7 @@ } ], "customers": [ - "BPNL00E2EASPCPT1" + "BPNL00000007QG00" ] } ] From 450fb0cfaef9232f01a4526a88486a78035feded Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Tue, 18 Jun 2024 23:28:11 +0200 Subject: [PATCH 21/26] chore(test):[#529] connect with JIRA issues, copyright header --- .../529-version-compatibility.feature | 58 +++++++++++-------- 1 file changed, 35 insertions(+), 23 deletions(-) diff --git a/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature b/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature index 1d78ffbc1f..f9bd511527 100644 --- a/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature +++ b/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature @@ -1,7 +1,29 @@ -Feature: [TESTING] Integration E2E Tests for backward compatibility #529 +# +# Copyright (c) 2022,2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (c) 2021,2024 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache License, Version 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0. +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# SPDX-License-Identifier: Apache-2.0 + + +Feature: Integration Tests for Aspect Version Compatibility #529 # Notes: # - For possible values of "direction" and "bomLifecycle" see RelationshipAspect. + # - These tests require the following test data: + # - CX_Testdata_529_compatibility_*.json Background: @@ -9,11 +31,9 @@ Feature: [TESTING] Integration E2E Tests for backward compatibility #529 And the admin user api key - ###################################################################################################################### - ## SingleLevelBomAsBuilt - ###################################################################################################################### - - Scenario: SingleLevelBomAsBuilt + @DEV @INTEGRATION_TEST + @TRI-2047 + Scenario: SingleLevelBomAsBuilt Version Compatibility Given I register an IRS job for globalAssetId "urn:uuid:bec0a457-4d6b-4c1c-88f7-125d04f04d68" and BPN "BPNL00000007QG00" And collectAspects "true" And depth 10 @@ -32,11 +52,9 @@ Feature: [TESTING] Integration E2E Tests for backward compatibility #529 And I check, if "submodels" are equal to "529-single-level-bom-as-built-expected-submodels.json" - ###################################################################################################################### - ## SingleLeveBomAsPlanned - ###################################################################################################################### - - Scenario: SingleLevelBomAsPlanned + @DEV @INTEGRATION_TEST + @TRI-2048 + Scenario: SingleLevelBomAsPlanned Version Compatibility Given I register an IRS job for globalAssetId "urn:uuid:0bc18367-69c3-428f-925d-6f8a461edefd" and BPN "BPNL00000007QG00" And collectAspects "true" And depth 10 @@ -53,11 +71,9 @@ Feature: [TESTING] Integration E2E Tests for backward compatibility #529 And I check, if "submodels" are equal to "529-single-level-bom-as-planned-expected-submodels.json" - ###################################################################################################################### - ## SingleLevelUsageAsBuilt - ###################################################################################################################### - - Scenario: SingleLevelUsageAsBuilt + @DEV @INTEGRATION_TEST + @TRI-2049 + Scenario: SingleLevelUsageAsBuilt Version Compatibility Given I register an IRS job for globalAssetId "urn:uuid:2ea93a69-7ecb-4747-94f4-960c2535dc7b" and BPN "BPNL00000007QG00" And collectAspects "true" And depth 10 @@ -71,13 +87,9 @@ Feature: [TESTING] Integration E2E Tests for backward compatibility #529 And I check, if "submodels" are equal to "529-single-level-usage-as-built-expected-submodels.json" - - - ###################################################################################################################### - ## SingleLevelUsageAsPlanned - ###################################################################################################################### - - Scenario: SingleLevelUsageAsPlanned + @DEV @INTEGRATION_TEST + @TRI-2050 + Scenario: SingleLevelUsageAsPlanned Version Compatibility Given I register an IRS job for globalAssetId "urn:uuid:7fe9ac70-23c4-449a-88c1-3832a1cc6da6" and BPN "BPNL00000007QG00" And collectAspects "true" And depth 10 From 946efa5442ab9a8a8c4f8b0e0fe1d87d50a1bedd Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Tue, 18 Jun 2024 23:30:09 +0200 Subject: [PATCH 22/26] chore(test):[#529] rename feature file --- .../#529-E2E-tests-aspect-version-compatibility.md | 10 +++++----- ...ature => irs-dev-529-version-compatibility.feature} | 0 2 files changed, 5 insertions(+), 5 deletions(-) rename irs-cucumber-tests/src/test/resources/features_new/{529-version-compatibility.feature => irs-dev-529-version-compatibility.feature} (100%) diff --git a/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md index 27a1c36436..77f9c6e6aa 100644 --- a/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md +++ b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md @@ -1,7 +1,7 @@ # #529 E2E Tests for Aspect Version Compatibility -- [The cucumber test](../../../irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature) +- [The cucumber test](../../../irs-cucumber-tests/src/test/resources/features_new/irs-dev-529-version-compatibility.feature) - checks for compatibility of [supported model versions](../../../COMPATIBILITY_MATRIX.md) @@ -27,7 +27,7 @@ Structure of test data: Test: -- [Cucumber test - scenario "SingleLevelBomAsBuilt"](../../../irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature) +- [Cucumber test - scenario "SingleLevelBomAsBuilt"](../../../irs-cucumber-tests/src/test/resources/features_new/irs-dev-529-version-compatibility.feature) - [529-single-level-bom-as-built-expected-relationships.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-relationships.json) - [529-single-level-bom-as-built-expected-submodels.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-submodels.json) @@ -50,7 +50,7 @@ Structure of test data: Test: -- [Cucumber test - scenario "SingleLevelBomAsPlanned"](../../../irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature) +- [Cucumber test - scenario "SingleLevelBomAsPlanned"](../../../irs-cucumber-tests/src/test/resources/features_new/irs-dev-529-version-compatibility.feature) - [529-single-level-bom-as-planned-expected-relationships.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-relationships.json) - [529-single-level-bom-as-planned-expected-submodels.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-submodels.json) @@ -73,7 +73,7 @@ Structure of test data: Test: -- [Cucumber test - scenario "SingleLevelBomAsBuilt"](../../../irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature) +- [Cucumber test - scenario "SingleLevelBomAsBuilt"](../../../irs-cucumber-tests/src/test/resources/features_new/irs-dev-529-version-compatibility.feature) - [529-single-level-usage-as-built-expected-relationships.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-built-expected-relationships.json) - [529-single-level-usage-as-built-expected-submodels.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-built-expected-submodels.json) @@ -95,7 +95,7 @@ Structure of test data: Test: -- [Cucumber test - scenario "SingleLevelUsageAsPlanned"](../../../irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature) +- [Cucumber test - scenario "SingleLevelUsageAsPlanned"](../../../irs-cucumber-tests/src/test/resources/features_new/irs-dev-529-version-compatibility.feature) - [529-single-level-usage-as-planned-expected-relationships.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-planned-expected-relationships.json) - [529-single-level-usage-as-planned-expected-submodels.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-planned-expected-submodels.json) diff --git a/irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature b/irs-cucumber-tests/src/test/resources/features_new/irs-dev-529-version-compatibility.feature similarity index 100% rename from irs-cucumber-tests/src/test/resources/features_new/529-version-compatibility.feature rename to irs-cucumber-tests/src/test/resources/features_new/irs-dev-529-version-compatibility.feature From e0bfdaaac2f22104fd8e628bd6631eaa826bd74f Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Tue, 18 Jun 2024 23:31:30 +0200 Subject: [PATCH 23/26] chore(test):[#529] move feature file to features dir --- .../#529-E2E-tests-aspect-version-compatibility.md | 10 +++++----- .../irs-dev-529-version-compatibility.feature | 0 2 files changed, 5 insertions(+), 5 deletions(-) rename irs-cucumber-tests/src/test/resources/{features_new => features}/irs-dev-529-version-compatibility.feature (100%) diff --git a/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md index 77f9c6e6aa..eaef355d24 100644 --- a/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md +++ b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md @@ -1,7 +1,7 @@ # #529 E2E Tests for Aspect Version Compatibility -- [The cucumber test](../../../irs-cucumber-tests/src/test/resources/features_new/irs-dev-529-version-compatibility.feature) +- [The cucumber test](../../../irs-cucumber-tests/src/test/resources/features/irs-dev-529-version-compatibility.feature) - checks for compatibility of [supported model versions](../../../COMPATIBILITY_MATRIX.md) @@ -27,7 +27,7 @@ Structure of test data: Test: -- [Cucumber test - scenario "SingleLevelBomAsBuilt"](../../../irs-cucumber-tests/src/test/resources/features_new/irs-dev-529-version-compatibility.feature) +- [Cucumber test - scenario "SingleLevelBomAsBuilt"](../../../irs-cucumber-tests/src/test/resources/features/irs-dev-529-version-compatibility.feature) - [529-single-level-bom-as-built-expected-relationships.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-relationships.json) - [529-single-level-bom-as-built-expected-submodels.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-submodels.json) @@ -50,7 +50,7 @@ Structure of test data: Test: -- [Cucumber test - scenario "SingleLevelBomAsPlanned"](../../../irs-cucumber-tests/src/test/resources/features_new/irs-dev-529-version-compatibility.feature) +- [Cucumber test - scenario "SingleLevelBomAsPlanned"](../../../irs-cucumber-tests/src/test/resources/features/irs-dev-529-version-compatibility.feature) - [529-single-level-bom-as-planned-expected-relationships.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-relationships.json) - [529-single-level-bom-as-planned-expected-submodels.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-submodels.json) @@ -73,7 +73,7 @@ Structure of test data: Test: -- [Cucumber test - scenario "SingleLevelBomAsBuilt"](../../../irs-cucumber-tests/src/test/resources/features_new/irs-dev-529-version-compatibility.feature) +- [Cucumber test - scenario "SingleLevelBomAsBuilt"](../../../irs-cucumber-tests/src/test/resources/features/irs-dev-529-version-compatibility.feature) - [529-single-level-usage-as-built-expected-relationships.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-built-expected-relationships.json) - [529-single-level-usage-as-built-expected-submodels.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-built-expected-submodels.json) @@ -95,7 +95,7 @@ Structure of test data: Test: -- [Cucumber test - scenario "SingleLevelUsageAsPlanned"](../../../irs-cucumber-tests/src/test/resources/features_new/irs-dev-529-version-compatibility.feature) +- [Cucumber test - scenario "SingleLevelUsageAsPlanned"](../../../irs-cucumber-tests/src/test/resources/features/irs-dev-529-version-compatibility.feature) - [529-single-level-usage-as-planned-expected-relationships.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-planned-expected-relationships.json) - [529-single-level-usage-as-planned-expected-submodels.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-planned-expected-submodels.json) diff --git a/irs-cucumber-tests/src/test/resources/features_new/irs-dev-529-version-compatibility.feature b/irs-cucumber-tests/src/test/resources/features/irs-dev-529-version-compatibility.feature similarity index 100% rename from irs-cucumber-tests/src/test/resources/features_new/irs-dev-529-version-compatibility.feature rename to irs-cucumber-tests/src/test/resources/features/irs-dev-529-version-compatibility.feature From 5c2ffddb281ed6aafaa1676798c64e7142275d23 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Tue, 18 Jun 2024 23:40:56 +0200 Subject: [PATCH 24/26] chore(test):[#529] update documentation --- ...-E2E-tests-aspect-version-compatibility.md | 28 ++++++------------- .../irs-dev-529-version-compatibility.feature | 5 ++++ 2 files changed, 14 insertions(+), 19 deletions(-) diff --git a/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md index eaef355d24..74a616ba07 100644 --- a/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md +++ b/docs/concept/#529-E2E-tests-aspect-version-compatibility/#529-E2E-tests-aspect-version-compatibility.md @@ -1,12 +1,11 @@ # #529 E2E Tests for Aspect Version Compatibility -- [The cucumber test](../../../irs-cucumber-tests/src/test/resources/features/irs-dev-529-version-compatibility.feature) - - checks for compatibility of [supported model versions](../../../COMPATIBILITY_MATRIX.md) +Story: [[TESTING] Integration E2E Tests for backward compatibility (Happy + Unhappy Path) #529](https://github.com/eclipse-tractusx/item-relationship-service/issues/529) -## SingleLevelBomAsBuilt +## SingleLevelBomAsBuilt Version Compatibility Test data: @@ -27,12 +26,12 @@ Structure of test data: Test: -- [Cucumber test - scenario "SingleLevelBomAsBuilt"](../../../irs-cucumber-tests/src/test/resources/features/irs-dev-529-version-compatibility.feature) +- [Cucumber test - scenario "SingleLevelBomAsBuilt Version Compatibility"](../../../irs-cucumber-tests/src/test/resources/features/irs-dev-529-version-compatibility.feature) - [529-single-level-bom-as-built-expected-relationships.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-relationships.json) - [529-single-level-bom-as-built-expected-submodels.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-built-expected-submodels.json) -## SingleLevelBomAsPlanned +## SingleLevelBomAsPlanned Version Compatibility Test data: - [CX_Testdata_529_compatibility_SingleLevelBomAsPlanned.json](../../../local/testing/testdata/CX_Testdata_529_compatibility_SingleLevelBomAsPlanned.json) @@ -49,13 +48,10 @@ Structure of test data: Test: +- [Cucumber test - scenario "SingleLevelBomAsPlanned Version Compatibility"](../../../irs-cucumber-tests/src/test/resources/features/irs-dev-529-version-compatibility.feature) -- [Cucumber test - scenario "SingleLevelBomAsPlanned"](../../../irs-cucumber-tests/src/test/resources/features/irs-dev-529-version-compatibility.feature) - - [529-single-level-bom-as-planned-expected-relationships.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-relationships.json) - - [529-single-level-bom-as-planned-expected-submodels.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-bom-as-planned-expected-submodels.json) - -## SingleLevelUsageAsBuilt +## SingleLevelUsageAsBuilt Version Compatibility Tests without submodel aspects because there are already tests for SerialPart in the SingleLevelBomAsBuilt tests. @@ -72,13 +68,10 @@ Structure of test data: Test: - -- [Cucumber test - scenario "SingleLevelBomAsBuilt"](../../../irs-cucumber-tests/src/test/resources/features/irs-dev-529-version-compatibility.feature) - - [529-single-level-usage-as-built-expected-relationships.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-built-expected-relationships.json) - - [529-single-level-usage-as-built-expected-submodels.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-built-expected-submodels.json) +- [Cucumber test - scenario "SingleLevelBomAsBuilt Version Compatibility"](../../../irs-cucumber-tests/src/test/resources/features/irs-dev-529-version-compatibility.feature) -## SingleLevelUsageAsPlanned +## SingleLevelUsageAsPlanned Version Compatibility Tests without submodel aspects because there are already tests for PartAsPlanned in the SingleLevelBomAsPlanned tests. @@ -94,10 +87,7 @@ Structure of test data: Test: - -- [Cucumber test - scenario "SingleLevelUsageAsPlanned"](../../../irs-cucumber-tests/src/test/resources/features/irs-dev-529-version-compatibility.feature) - - [529-single-level-usage-as-planned-expected-relationships.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-planned-expected-relationships.json) - - [529-single-level-usage-as-planned-expected-submodels.json](../../../irs-cucumber-tests/src/test/resources/expected-files/529-single-level-usage-as-planned-expected-submodels.json) +- [Cucumber test - scenario "SingleLevelUsageAsPlanned Version Compatibility"](../../../irs-cucumber-tests/src/test/resources/features/irs-dev-529-version-compatibility.feature) diff --git a/irs-cucumber-tests/src/test/resources/features/irs-dev-529-version-compatibility.feature b/irs-cucumber-tests/src/test/resources/features/irs-dev-529-version-compatibility.feature index f9bd511527..9f731291e1 100644 --- a/irs-cucumber-tests/src/test/resources/features/irs-dev-529-version-compatibility.feature +++ b/irs-cucumber-tests/src/test/resources/features/irs-dev-529-version-compatibility.feature @@ -18,6 +18,7 @@ # SPDX-License-Identifier: Apache-2.0 +# Tests for Aspect Version Compatibility Feature: Integration Tests for Aspect Version Compatibility #529 # Notes: @@ -31,6 +32,7 @@ Feature: Integration Tests for Aspect Version Compatibility #529 And the admin user api key + # Requires test data CX_Testdata_529_compatibility_SingleLevelBomAsBuilt.json @DEV @INTEGRATION_TEST @TRI-2047 Scenario: SingleLevelBomAsBuilt Version Compatibility @@ -52,6 +54,7 @@ Feature: Integration Tests for Aspect Version Compatibility #529 And I check, if "submodels" are equal to "529-single-level-bom-as-built-expected-submodels.json" + # Requires test data CX_Testdata_529_compatibility_SingleLevelBomAsPlanned.json @DEV @INTEGRATION_TEST @TRI-2048 Scenario: SingleLevelBomAsPlanned Version Compatibility @@ -71,6 +74,7 @@ Feature: Integration Tests for Aspect Version Compatibility #529 And I check, if "submodels" are equal to "529-single-level-bom-as-planned-expected-submodels.json" + # Requires test data CX_Testdata_529_compatibility_SingleLevelUsageAsBuilt.json @DEV @INTEGRATION_TEST @TRI-2049 Scenario: SingleLevelUsageAsBuilt Version Compatibility @@ -87,6 +91,7 @@ Feature: Integration Tests for Aspect Version Compatibility #529 And I check, if "submodels" are equal to "529-single-level-usage-as-built-expected-submodels.json" + # Requires test data CX_Testdata_529_compatibility_SingleLevelUsageAsPlanned.json @DEV @INTEGRATION_TEST @TRI-2050 Scenario: SingleLevelUsageAsPlanned Version Compatibility From 878690bdc39c6f01418a434e488596fd83adb68a Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Tue, 18 Jun 2024 23:44:54 +0200 Subject: [PATCH 25/26] chore(test):[#529] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b05757cb75..f3975a2127 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ _**For better traceability add the corresponding GitHub issue number in each cha ## Added +- Added tests for aspect version compatibility. #529 - Added endpoint for dedicated removal of policy from BPNL. #559 - Integration Test Policy Store API Unhappy Path. #519 - Support for SingleLevelUsageAsPlanned. #470 From ed36440b89432059c6ec51e31639d402d4368cc3 Mon Sep 17 00:00:00 2001 From: Matthias Fischer Date: Wed, 19 Jun 2024 12:05:48 +0200 Subject: [PATCH 26/26] chore(test):[#529] move feature file to correct folder --- .../cucumber}/features/irs-dev-529-version-compatibility.feature | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename irs-cucumber-tests/src/test/resources/{ => org/eclipse/tractusx/irs/cucumber}/features/irs-dev-529-version-compatibility.feature (100%) diff --git a/irs-cucumber-tests/src/test/resources/features/irs-dev-529-version-compatibility.feature b/irs-cucumber-tests/src/test/resources/org/eclipse/tractusx/irs/cucumber/features/irs-dev-529-version-compatibility.feature similarity index 100% rename from irs-cucumber-tests/src/test/resources/features/irs-dev-529-version-compatibility.feature rename to irs-cucumber-tests/src/test/resources/org/eclipse/tractusx/irs/cucumber/features/irs-dev-529-version-compatibility.feature