Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CloudSql PostegreSql e2e test scenarios #200

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
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
103 changes: 103 additions & 0 deletions e2e-test/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright © 2015-2019 Cask Data, Inc.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2022


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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>io.cdap.plugin</groupId>
<artifactId>e2e-test</artifactId>
<version>2.9.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
</properties>
<profiles>
<profile>
<id>e2e-tests</id>
<properties>
<testSourceLocation>e2e-test/src/test</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</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>
<dependencies>
<dependency>
<groupId>io.cdap.tests.e2e</groupId>
<artifactId>cdap-e2e-framework</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
45 changes: 45 additions & 0 deletions e2e-test/src/test/features/cloudSqlPsqlDesigntimeSink.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Feature: CloudSQLPostgreSQL Sink and Error Validation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Capitalize first letter in filename - cloudSql -> CloudSql


@cloudSQLPostgreSQL
Scenario Outline:Verify CloudSQLPostgreSQL Sink properties validation errors for mandatory fields
Given Open DataFusion Project to configure pipeline
When Target is CloudSQLPostgreSQL
Then Open cloudSQLPostgreSQL Properties
Then Enter the CloudSQLPostgreSQL Sink Properties with blank property "<property>"
Then Validate mandatory property error for "<property>"
Examples:
| property |
| referenceName |
| database |
| connectionName |
| tableName |
| jdbcPluginName |

@cloudSQLPostgreSQL
Scenario: Verify error is displayed and validation fails for incorrect Driver name value
Given Open DataFusion Project to configure pipeline
When Target is CloudSQLPostgreSQL
Then Open cloudSQLPostgreSQL Properties
Then Enter Reference Name & Database Name with valid test data
Then Enter Table Name "cloudPSQLTableName" and Connection Name
Then Validate Connector properties
Then Enter Driver Name with Invalid value for Driver name field "cloudPSQLDriverNameInvalid"
Then Verify invalid Driver name error message is displayed for Driver "cloudPSQLDriverNameInvalid"
Then Verify plugin validation fails with error
Then Close the cloudSQLPostgreSQL properties

@cloudSQLPostgreSQL
Scenario:Verify error is displayed for Reference name and Public connection name with incorrect values
Given Open DataFusion Project to configure pipeline
When Target is CloudSQLPostgreSQL
Then Enter Reference Name and Public Connection Name with incorrect values and table "cloudPSQLTableName"
Then Verify error is displayed for Reference name & connection name with incorrect values
Then Close the cloudSQLPostgreSQL properties

@cloudSQLPostgreSQL
Scenario:Verify error is displayed for Reference name and Private connection name with incorrect values
Given Open DataFusion Project to configure pipeline
When Target is CloudSQLPostgreSQL
Then Enter Reference Name and Private Connection Name with incorrect values and table "cloudPSQLTableName"
Then Verify error is displayed for incorrect Connection Name with private instance type
Then Close the cloudSQLPostgreSQL properties
45 changes: 45 additions & 0 deletions e2e-test/src/test/features/cloudSqlPsqlDesigntimeSource.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Feature: CloudSQLPostgreSQL Source Design Time and error validation

@cloudSQLPostgreSQL
Scenario Outline:Verify CloudSQLPostgreSQL Source properties validation errors for mandatory fields
Given Open DataFusion Project to configure pipeline
When Source is CloudSQLPostgreSQL
Then Open cloudSQLPostgreSQL Properties
Then Enter the CloudSQLPostgreSQL Source Properties with blank property "<property>"
Then Validate mandatory property error for "<property>"
Examples:
| property |
| referenceName |
| database |
| connectionName |
| importQuery |
| jdbcPluginName |

@cloudSQLPostgreSQL
Scenario:Verify Driver Name field validation error with invalid test data
Given Open DataFusion Project to configure pipeline
When Source is CloudSQLPostgreSQL
Then Open cloudSQLPostgreSQL Properties
Then Enter Reference Name & Database Name with valid test data
Then Enter Connection Name and Import Query "cloudPSQLImportQuery"
Then Validate Connector properties
Then Enter Driver Name with Invalid value for Driver name field "cloudPSQLDriverNameInvalid"
Then Verify invalid Driver name error message is displayed for Driver "cloudPSQLDriverNameInvalid"
Then Verify plugin validation fails with error
Then Close the cloudSQLPostgreSQL properties

@cloudSQLPostgreSQL
Scenario:Verify error is displayed for Reference name and Public connection name with incorrect values
Given Open DataFusion Project to configure pipeline
When Source is CloudSQLPostgreSQL
Then Enter Reference Name & Connection Name with incorrect values and import query "cloudPSQLImportQuery"
Then Verify error is displayed for Reference name & connection name with incorrect values
Then Close the cloudSQLPostgreSQL properties

@cloudSQLPostgreSQL
Scenario:Verify error is displayed for Reference name and Private connection name with incorrect values
Given Open DataFusion Project to configure pipeline
When Source is CloudSQLPostgreSQL
Then Enter Reference Name and private Connection Name with incorrect values and import query "cloudPSQLImportQuery"
Then Verify error is displayed for incorrect Connection Name with private instance type
Then Close the cloudSQLPostgreSQL properties
Loading