-
Notifications
You must be signed in to change notification settings - Fork 6
Sap odp #10
base: develop
Are you sure you want to change the base?
Sap odp #10
Changes from 16 commits
5f10bfa
b4ef000
6e14311
2c8cdb2
91f5e84
c90e335
1412f8d
c3cf646
b5a57e0
42a373a
05647e6
f437120
e102746
807aa15
c354cee
103a803
f5fe530
03a47db
63b8968
1601d9c
b3a64c4
d5d64a2
f623984
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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> | ||
|
|
@@ -138,6 +139,11 @@ | |
| <version>${cdap.version}</version> | ||
| <scope>provided</scope> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>com.google.guava</groupId> | ||
| <artifactId>guava</artifactId> | ||
| <version>31.0.1-jre</version> | ||
| </dependency> | ||
| <dependency> | ||
| <groupId>io.cdap.cdap</groupId> | ||
| <artifactId>cdap-formats</artifactId> | ||
|
|
@@ -333,6 +339,7 @@ | |
| </dependencies> | ||
|
|
||
| <build> | ||
| <testSourceDirectory>${testSourceLocation}</testSourceDirectory> | ||
| <pluginManagement> | ||
| <plugins> | ||
| </plugins> | ||
|
|
@@ -450,6 +457,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> | ||
|
|
@@ -510,6 +521,137 @@ | |
| </execution> | ||
| </executions> | ||
| </plugin> | ||
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why are these added outside e2e-tests profile?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. removed, these were rather duplicate |
||
| <artifactId>maven-compiler-plugin</artifactId> | ||
| <version>3.1</version> | ||
| <configuration> | ||
| <source>1.8</source> | ||
| <target>1.8</target> | ||
| </configuration> | ||
| </plugin> | ||
|
|
||
| <plugin> | ||
| <groupId>org.apache.maven.plugins</groupId> | ||
| <artifactId>maven-surefire-plugin</artifactId> | ||
| <version>2.14.1</version> | ||
| <configuration> | ||
| <argLine>-Xmx512m</argLine> | ||
| <systemPropertyVariables> | ||
| <java.io.tmpdir>${project.build.directory}</java.io.tmpdir> | ||
| </systemPropertyVariables> | ||
| <includes> | ||
| <include>**/*TestSuite.java</include> | ||
| <include>**/Test*.java</include> | ||
| <include>**/*Test.java</include> | ||
| <include>**/*TestCase.java</include> | ||
| </includes> | ||
| </configuration> | ||
| </plugin> | ||
|
|
||
| </plugins> | ||
| </build> | ||
|
|
||
| <profiles> | ||
| <profile> | ||
| <id>e2e-tests</id> | ||
| <properties> | ||
| <testSourceLocation>src/e2e-test/java</testSourceLocation> | ||
| </properties> | ||
| <build> | ||
| <plugins> | ||
| <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, TestRunnerMand.java, TestRunnerOpt.java</include> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use pattern instead of listing all classes
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tivv since we have to maintain the execution order of the TestRunners, we had to add the runner filenames like this. We have to make sure TestRunnerOpt runs in the end, else it will impact TestRunnerMand There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need an execution order? It sounds like an issue. All tests must be independent. One should be able to run any test separately or tests in any sequence. That's basic principle.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tivv For config driven scenarios, wherein we are implementing cucumberJvm plugin, we are loading optional properties on the run, once they are loaded, the scenarios with only mandatory fields will not run. So mandatory field scenario should run first, then plugin loading the optional properties should execute followed by optional field scenarios. Suggest if I am not able to put forward my point, or if I am missing something to make the scenarios more independent There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, could you please clarify in more details. Overall approach is that tests must be self-contained and do any necessary clean-up as needed. Why is it not possible here?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done, thanks |
||
| </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> | ||
|
|
||
| <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> | ||
| 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 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we adding a guava dependency here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried adding inside e2e-tests profile but it was not getting resolved there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the issues? The way it's not it's not going to fly. Guava versioning is pretty tricky, so we must not add it to production code unless needed by production code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @tivv I have removed guava from main dependency section, moved it to profile's dependency management, along with adding it to classpath via profile's maven-dependency-plugin. Please confirm if this is fine