From 377838111859078acc44d805808d369992311522 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Comte?= Date: Mon, 27 Oct 2025 16:33:38 +0100 Subject: [PATCH] SED-3874 Adding sample for ap-with-common-library --- .../java/ap-with-common-library/ap1/pom.xml | 216 ++++++++++++++++++ .../ap1/src/main/java/MyKeywords.java | 9 + .../main/resources/automation-package.yaml | 11 + .../src/test/java/AutomationPackageTest.java | 4 + .../java/ap-with-common-library/ap2/pom.xml | 216 ++++++++++++++++++ .../ap2/src/main/java/MyKeywords.java | 9 + .../main/resources/automation-package.yaml | 11 + .../ap-with-common-library/library/pom.xml | 128 +++++++++++ .../library/src/main/java/CommonSession.java | 2 + .../src/main/java/MyAbstractKeyword.java | 4 + 10 files changed, 610 insertions(+) create mode 100644 automation-packages/templates/java/ap-with-common-library/ap1/pom.xml create mode 100644 automation-packages/templates/java/ap-with-common-library/ap1/src/main/java/MyKeywords.java create mode 100644 automation-packages/templates/java/ap-with-common-library/ap1/src/main/resources/automation-package.yaml create mode 100644 automation-packages/templates/java/ap-with-common-library/ap1/src/test/java/AutomationPackageTest.java create mode 100644 automation-packages/templates/java/ap-with-common-library/ap2/pom.xml create mode 100644 automation-packages/templates/java/ap-with-common-library/ap2/src/main/java/MyKeywords.java create mode 100644 automation-packages/templates/java/ap-with-common-library/ap2/src/main/resources/automation-package.yaml create mode 100644 automation-packages/templates/java/ap-with-common-library/library/pom.xml create mode 100644 automation-packages/templates/java/ap-with-common-library/library/src/main/java/CommonSession.java create mode 100644 automation-packages/templates/java/ap-with-common-library/library/src/main/java/MyAbstractKeyword.java diff --git a/automation-packages/templates/java/ap-with-common-library/ap1/pom.xml b/automation-packages/templates/java/ap-with-common-library/ap1/pom.xml new file mode 100644 index 0000000..a28709e --- /dev/null +++ b/automation-packages/templates/java/ap-with-common-library/ap1/pom.xml @@ -0,0 +1,216 @@ + + 4.0.0 + + ch.exense.step.examples + ap1 + 1.0.0 + jar + + Step AP Sample (with common library) + Sample Step automation package depending on a common library + https://step.exense.ch/ + + + + 17 + UTF-8 + + + 2025.10.24-68fb9841965ede24cfcc065b + 2025.10.15-68ef62ad2c8af16504f37e13 + + + 3.12.1 + 3.5.3 + 3.5.1 + + + + + + nexus-staging + https://nexus-enterprise-staging.exense.ch/repository/staging-maven/ + + + + + + + nexus-staging + https://nexus-enterprise-staging.exense.ch/repository/staging-maven/ + + + + + + + execute-on-step + + + + ch.exense.step + step-maven-plugin + + + + execute-automation-package + + verify + + + ${step.url} + ${step.auth-token} + ${step.step-project-name} + + true + true + 600 + + TEST + + ch.exense.step.examples + library + 1.0.0 + + + + + + + + + + + deploy-to-step + + + + ch.exense.step + step-maven-plugin + + + install + + ch.exense.step.examples + library + 1.0.0 + ${step.url} + ${step.auth-token} + ${step.step-project-name} + + + deploy-automation-package + + + + + + + + + + + + + ch.exense.step + step-api-keyword + ${step-api.version} + + provided + + + + + ch.exense.step.examples + library + 1.0.0 + + provided + + + + + ch.exense.step + step-automation-packages-junit5 + ${step.version} + + test + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + + org.apache.maven.plugins + maven-surefire-plugin + ${maven-surefire-plugin.version} + + + org.apache.maven.plugins + maven-shade-plugin + ${maven-shade-plugin.version} + + + ch.exense.step + step-maven-plugin + ${step.version} + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + ${maven.compiler.release} + + + + + + org.apache.maven.plugins + maven-shade-plugin + + + package + shade + + + + + + + *:* + + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + + true + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + + \ No newline at end of file diff --git a/automation-packages/templates/java/ap-with-common-library/ap1/src/main/java/MyKeywords.java b/automation-packages/templates/java/ap-with-common-library/ap1/src/main/java/MyKeywords.java new file mode 100644 index 0000000..1b44765 --- /dev/null +++ b/automation-packages/templates/java/ap-with-common-library/ap1/src/main/java/MyKeywords.java @@ -0,0 +1,9 @@ +import step.handlers.javahandler.Keyword; + +public class MyKeywords extends MyAbstractKeyword { + + @Keyword + public void MyKeywordFromAp1() { + session.put(new CommonSession()); + } +} diff --git a/automation-packages/templates/java/ap-with-common-library/ap1/src/main/resources/automation-package.yaml b/automation-packages/templates/java/ap-with-common-library/ap1/src/main/resources/automation-package.yaml new file mode 100644 index 0000000..0a472fb --- /dev/null +++ b/automation-packages/templates/java/ap-with-common-library/ap1/src/main/resources/automation-package.yaml @@ -0,0 +1,11 @@ +--- +schemaVersion: 1.0.0 +name: "Automation Package 1" +plans: + - name: "Plan 1" + agents: auto_detect + root: + testCase: + children: + - callKeyword: + keyword: MyKeywordFromAp1 \ No newline at end of file diff --git a/automation-packages/templates/java/ap-with-common-library/ap1/src/test/java/AutomationPackageTest.java b/automation-packages/templates/java/ap-with-common-library/ap1/src/test/java/AutomationPackageTest.java new file mode 100644 index 0000000..529d45d --- /dev/null +++ b/automation-packages/templates/java/ap-with-common-library/ap1/src/test/java/AutomationPackageTest.java @@ -0,0 +1,4 @@ +import step.junit5.runner.StepJUnit5; + +public class AutomationPackageTest extends StepJUnit5 { +} diff --git a/automation-packages/templates/java/ap-with-common-library/ap2/pom.xml b/automation-packages/templates/java/ap-with-common-library/ap2/pom.xml new file mode 100644 index 0000000..8b73de5 --- /dev/null +++ b/automation-packages/templates/java/ap-with-common-library/ap2/pom.xml @@ -0,0 +1,216 @@ + + 4.0.0 + + ch.exense.step.examples + ap2 + 1.0.0 + jar + + Step AP Sample (with common library) + Sample Step automation package depending on a common library + https://step.exense.ch/ + + + + 17 + UTF-8 + + + 2025.10.24-68fb9841965ede24cfcc065b + 2025.10.15-68ef62ad2c8af16504f37e13 + + + 3.12.1 + 3.5.3 + 3.5.1 + + + + + + nexus-staging + https://nexus-enterprise-staging.exense.ch/repository/staging-maven/ + + + + + + + nexus-staging + https://nexus-enterprise-staging.exense.ch/repository/staging-maven/ + + + + + + + execute-on-step + + + + ch.exense.step + step-maven-plugin + + + + execute-automation-package + + verify + + + ${step.url} + ${step.auth-token} + ${step.step-project-name} + + true + true + 600 + + TEST + + ch.exense.step.examples + library + 1.0.0 + + + + + + + + + + + deploy-to-step + + + + ch.exense.step + step-maven-plugin + + + install + + ch.exense.step.examples + library + 1.0.0 + ${step.url} + ${step.auth-token} + ${step.step-project-name} + + + deploy-automation-package + + + + + + + + + + + + + ch.exense.step + step-api-keyword + ${step-api.version} + + provided + + + + + ch.exense.step.examples + library + 1.0.0 + + provided + + + + + ch.exense.step + step-automation-packages-junit5 + ${step.version} + + test + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + + org.apache.maven.plugins + maven-surefire-plugin + ${maven-surefire-plugin.version} + + + org.apache.maven.plugins + maven-shade-plugin + ${maven-shade-plugin.version} + + + ch.exense.step + step-maven-plugin + ${step.version} + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + ${maven.compiler.release} + + + + + + org.apache.maven.plugins + maven-shade-plugin + + + package + shade + + + + + + + *:* + + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + + true + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + + \ No newline at end of file diff --git a/automation-packages/templates/java/ap-with-common-library/ap2/src/main/java/MyKeywords.java b/automation-packages/templates/java/ap-with-common-library/ap2/src/main/java/MyKeywords.java new file mode 100644 index 0000000..d4f56ec --- /dev/null +++ b/automation-packages/templates/java/ap-with-common-library/ap2/src/main/java/MyKeywords.java @@ -0,0 +1,9 @@ +import step.handlers.javahandler.Keyword; + +public class MyKeywords extends MyAbstractKeyword { + + @Keyword + public void MyKeywordFromAp2() { + session.get(CommonSession.class); + } +} diff --git a/automation-packages/templates/java/ap-with-common-library/ap2/src/main/resources/automation-package.yaml b/automation-packages/templates/java/ap-with-common-library/ap2/src/main/resources/automation-package.yaml new file mode 100644 index 0000000..4c0660f --- /dev/null +++ b/automation-packages/templates/java/ap-with-common-library/ap2/src/main/resources/automation-package.yaml @@ -0,0 +1,11 @@ +--- +schemaVersion: 1.0.0 +name: "Automation Package 2" +plans: + - name: "Plan 2" + agents: auto_detect + root: + testCase: + children: + - callKeyword: + keyword: MyKeywordFromAp2 \ No newline at end of file diff --git a/automation-packages/templates/java/ap-with-common-library/library/pom.xml b/automation-packages/templates/java/ap-with-common-library/library/pom.xml new file mode 100644 index 0000000..7f00dc5 --- /dev/null +++ b/automation-packages/templates/java/ap-with-common-library/library/pom.xml @@ -0,0 +1,128 @@ + + 4.0.0 + + ch.exense.step.examples + library + 1.0.0 + jar + + Step AP Library Sample + Sample Step automation package library + https://step.exense.ch/ + + + + 17 + UTF-8 + + + 2025.10.24-68fb9841965ede24cfcc065b + 2025.10.15-68ef62ad2c8af16504f37e13 + + + 3.12.1 + 3.5.3 + 3.5.1 + + + + + + nexus-staging + https://nexus-enterprise-staging.exense.ch/repository/staging-maven/ + + + + + + + nexus-staging + https://nexus-enterprise-staging.exense.ch/repository/staging-maven/ + + + + + + + ch.exense.step + step-api-keyword + ${step-api.version} + + provided + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + ${maven-compiler-plugin.version} + + + org.apache.maven.plugins + maven-surefire-plugin + ${maven-surefire-plugin.version} + + + org.apache.maven.plugins + maven-shade-plugin + ${maven-shade-plugin.version} + + + ch.exense.step + step-maven-plugin + ${step.version} + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + ${maven.compiler.release} + + + + + + org.apache.maven.plugins + maven-shade-plugin + + + package + shade + + + + + + + *:* + + META-INF/*.SF + META-INF/*.DSA + META-INF/*.RSA + + + + true + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + + + \ No newline at end of file diff --git a/automation-packages/templates/java/ap-with-common-library/library/src/main/java/CommonSession.java b/automation-packages/templates/java/ap-with-common-library/library/src/main/java/CommonSession.java new file mode 100644 index 0000000..cf3c13b --- /dev/null +++ b/automation-packages/templates/java/ap-with-common-library/library/src/main/java/CommonSession.java @@ -0,0 +1,2 @@ +public class CommonSession { +} diff --git a/automation-packages/templates/java/ap-with-common-library/library/src/main/java/MyAbstractKeyword.java b/automation-packages/templates/java/ap-with-common-library/library/src/main/java/MyAbstractKeyword.java new file mode 100644 index 0000000..b3d4d8a --- /dev/null +++ b/automation-packages/templates/java/ap-with-common-library/library/src/main/java/MyAbstractKeyword.java @@ -0,0 +1,4 @@ +import step.handlers.javahandler.AbstractKeyword; + +public class MyAbstractKeyword extends AbstractKeyword { +}