Skip to content
This repository was archived by the owner on Apr 20, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
# SAP
Collection of SAP pluginis

### E2E automation framework
For e2e automation execution of SAP plugins, maven profile e2e-tests have been configured. Important note ragrding it:
1) For it to work, github actions have to be configured (not a special action, just run a below mentioned shell command):

`/snap/bin/gsutil cp gs://jcoconnector-sapautomation/*.jar ${project.basedir}/src/e2e-test/java/io/cdap/plugin/odp/lib`
136 changes: 136 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
<olingo.version>4.6.0</olingo.version>
<olingo2.version>2.0.11</olingo2.version>
<wiremock.version>1.49</wiremock.version>
<testSourceLocation>${project.basedir}/src/test/java/</testSourceLocation>
</properties>

<dependencies>
Expand Down Expand Up @@ -333,6 +334,7 @@
</dependencies>

<build>
<testSourceDirectory>${testSourceLocation}</testSourceDirectory>
<pluginManagement>
<plugins>
</plugins>
Expand Down Expand Up @@ -450,6 +452,10 @@
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<testSourceDirectories>
<testSourceDirectory>src/test/java</testSourceDirectory>
<testSourceDirectory>src/e2e-test/java</testSourceDirectory>
</testSourceDirectories>
<excludes>**/org/apache/cassandra/**,**/org/apache/hadoop/**</excludes>
</configuration>
<goals>
Expand Down Expand Up @@ -512,4 +518,134 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>e2e-tests</id>
<!-- Please refer README.md for a prerequisite to execute this profile -->
<properties>
<testSourceLocation>src/e2e-test/java</testSourceLocation>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.2.0</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M5</version>
<configuration>
<includes>
<include>TestRunner.java</include>
</includes>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>net.masterthought</groupId>
<artifactId>maven-cucumber-reporting</artifactId>
<version>5.5.0</version>

<executions>
<execution>
<id>execution</id>
<phase>verify</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<projectName>Cucumber Reports</projectName> <!-- Replace with project name -->
<outputDirectory>target/cucumber-reports/advanced-reports</outputDirectory>
<buildNumber>1</buildNumber>
<skip>false</skip>
<inputDirectory>${project.build.directory}/cucumber-reports</inputDirectory>
<jsonFiles> <!-- supports wildcard or name pattern -->
<param>**/*.json</param>
</jsonFiles> <!-- optional, defaults to outputDirectory if not specified -->
<classificationDirectory>${project.build.directory}/cucumber-reports</classificationDirectory>
<checkBuildResult>true</checkBuildResult>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>31.0.1-jre</version>
<scope>compile</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>io.cdap.tests.e2e</groupId>
<artifactId>cdap-e2e-framework</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ehcache</groupId>
<artifactId>ehcache</artifactId>
<version>3.8.1</version>
</dependency>
<dependency>
<groupId>com.sap.conn.jco</groupId>
<artifactId>sapjco3</artifactId>
<version>3.0.14</version>
<scope>system</scope>
<systemPath>${basedir}/src/e2e-test/java/io/cdap/plugin/odp/lib/sapjco3.jar</systemPath>
</dependency>
<dependency>
<groupId>com.sap.conn.idoc</groupId>
<artifactId>sapidoc3</artifactId>
<version>3.0.12</version>
<scope>system</scope>
<systemPath>${basedir}/src/e2e-test/java/io/cdap/plugin/odp/lib/sapidoc3.jar</systemPath>
</dependency>
<dependency>
<groupId>com.google.adaptor</groupId>
<artifactId>cs</artifactId>
<version>0.0.1</version>
<scope>system</scope>
<systemPath>${basedir}/src/e2e-test/java/io/cdap/plugin/odp/lib/com.google.adapter.cs-0.0.1.jar</systemPath>
</dependency>
</dependencies>

</profile>
</profiles>
</project>
85 changes: 85 additions & 0 deletions src/e2e-test/features/DesignTimeODP.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Copyright © 2021 Cask Data, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://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.
Feature: Design Time ODP Scenario

@ODP @DesignTime-TC-ODP-DSGN-01(Direct)
Scenario:User configured direct connection parameters and Security parameters by providing values on SAP UI(ENV)
Given Open CDF application to configure pipeline
When Source is SAP ODP
When Configure Direct Connection "s4Client" "s4Sysnr" "s4AsHost" "dsMasterAttr" "s4GcsPath" "s4Splitrow" "s4PkgSize"
When Username and Password is provided
Then Connection is established

@ODP @DesignTime-TC-ODP-DSGN-01(LOAD)
Scenario:User configured Load connection parameters and Security parameters by providing values on SAP UI(ENV)
Given Open CDF application to configure pipeline
When Source is SAP ODP
When LoadProp "s4Client" "s4AsHost" "s4MsServ" "s4SystemId" "dsAllDataType" "s4GcsPath" "s4Splitrow" "s4PkgSize" "s4Lgrp"
When Username and Password is provided
Then Connection is established

@ODP @DesignTime-TC-ODP-DSGN-01.02
Scenario: User is able to configure Security parameters using macros in direct connection
Given Open CDF application to configure pipeline
When Source is SAP ODP
When Configure Direct Connection "s4Client" "s4Sysnr" "s4AsHost" "dsMasterAttr" "s4GcsPath" "s4Splitrow" "s4PkgSize"
When Username and Password is provided
When User has selected Sap client macro to configure
Then User is validate without any error
When User has selected Sap language macro to configure
Then User is validate without any error
When User has selected Sap server as host macro to configure
Then User is validate without any error
When User has selected System Number macro to configure
Then User is validate without any error
When User has selected datasource macro to configure
Then User is validate without any error
When User has selected gcsPath macro to configure
Then User is validate without any error

@ODP @DesignTime-TC-ODP-DSGN-01.05
Scenario: User is able to configure Security parameters using macros in load connection
Given Open CDF application to configure pipeline
When Source is SAP ODP
When LoadProp "s4Client" "s4AsHost" "s4MsServ" "s4SystemId" "dsAllDataType" "s4GcsPath" "s4Splitrow" "s4PkgSize" "s4Lgrp"
When Username and Password is provided
When User has selected Sap msHost macro to configure
Then User is validate without any error
When User has selected Sap msServ macro to configure
Then User is validate without any error
When User has selected UserName and Password macro to configure
Then User is validate without any error

@ODP @DesignTime-TC-ODP-DSGN-05.01
Scenario:User is able to get the schema of the datasources supporting all the datatype
Given Open CDF application to configure pipeline
When Source is SAP ODP
When Configure Direct Connection "s4Client" "s4Sysnr" "s4AsHost" "dsAllDataType" "s4GcsPath" "s4Splitrow" "s4PkgSize"
When Username and Password is provided
Then Validate the Schema created


@ODP @DesignTime-TC-ODP-DSGN-09.01
Scenario Outline: User is able to get the schema of the SAP Datasource
Given Open CDF application to configure pipeline
When Source is SAP ODP
When Configure Direct Connection "s4Client" "s4Sysnr" "s4AsHost" "dsAllDataType" "s4GcsPath" "s4Splitrow" "s4PkgSize"
When Username and Password is provided
When data source as "<datasource>" is added
Then Validate the Schema created
Examples:
| datasource |
| 2LIS_02_ITM |
| 2LIS_11_VAITM |
| 0MATERIAL_LPRH_HIER |
Loading