-
Notifications
You must be signed in to change notification settings - Fork 30
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
sawantpritam
wants to merge
5
commits into
data-integrations:develop
Choose a base branch
from
sawantpritam:e2e-cloudsqlpsql
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
9b75677
e2e-tests project structure
sawantpritam ee7c5c8
cloudSqlPSQL related test cases
Ragini2 233d5d1
review comment
Ragini2 7908a4b
clousSqlPSQL review comments
Ragini2 a2d8f9a
Merge pull request #3 from Ragini2/e2e-cloudsqlpsql
sawantpritam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
||
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
45
e2e-test/src/test/features/cloudSqlPsqlDesigntimeSink.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
Feature: CloudSQLPostgreSQL Sink and Error Validation | ||
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. 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
45
e2e-test/src/test/features/cloudSqlPsqlDesigntimeSource.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
2022