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

CloudSqlMySql Test Scenarios #1

Merged
Merged
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
20 changes: 20 additions & 0 deletions e2e-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,26 @@
<version>0.0.1-SNAPSHOT</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.26</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>5.3.13</version>
</dependency>
<dependency>
<groupId>com.google.cloud.sql</groupId>
<artifactId>mysql-socket-factory-connector-j-8</artifactId>
<version>1.0.16</version>
</dependency>
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
<version>4.0.3</version>
</dependency>
</dependencies>
</profile>
</profiles>
Expand Down
64 changes: 64 additions & 0 deletions e2e-test/src/test/features/Cloudsqlmysql_sink_designtime.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
Feature: CloudSQLMySQl Sink Design Time

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

@CLDMYSQL @TC-Invalid-TestData-for-DriverName_Field:
Scenario: TC-CLDMYSQL-DSGN-02:Verify Driver Name field validation error with invalid test data
Given Open DataFusion Project to configure pipeline
When Target is CloudSQLMySQL
Then Open CloudSQLMySQL Properties
Then Enter Reference Name "clsReferenceNameValid" & Database Name "clsDatabaseName" with Test Data
Then Enter Table Name "clsTableNameBQCS" and Connection Name "clsConnectionNameValid"
Then Validate Connector properties
Then Enter Driver Name with Invalid value for Driver name field "clsDriverNameInvalid"
Then Verify invalid Driver name error message is displayed for Driver "clsDriverNameInvalid"
Then Verify plugin validation fails with error
Then Close the CloudSQLMySQL Properties

@CLDMYSQL @TC-Invalid-TestData-for-ReferenceName&ConnectionName
Scenario: TC-CLDMYSQL-DSGN-03:Verify properties validation errors for invalid test data for Reference name & connection name
Given Open DataFusion Project to configure pipeline
When Target is CloudSQLMySQL
Then Enter Reference Name & Connection Name with Invalid Test Data in Sink
Then Verify Reference Name "clsReferenceNameInvalid" Field with Invalid Test Data
Then Verify Connection Name "clsConnectionNameInvalid" fields with Invalid Test Data
Then Enter Connection Name with private instance type
Then Verify Connection Name with private instance type "clsConnectionNameInvalid"
Then Close the CloudSQLMySQL Properties

@CLDMYSQL @TC-Add-Comments
Scenario: TC-CLDMYSQL-DSGN-04:Verify the Add Comments functionality for CloudSQL MySQL connector
Given Open DataFusion Project to configure pipeline
When Target is CloudSQLMySQL
Then Add and Save Comments sink "clsPluginComment"
Then Validate Sink Comment

@CLDMYSQL @TC-Edit-Comments
Scenario: TC-CLDMYSQL-DSGN-05:Verify the Edit added Comments functionality for CloudSQL MySQL connector
Given Open DataFusion Project to configure pipeline
When Target is CloudSQLMySQL
Then Add and Save Comments sink "clsPluginComment"
Then Edit Sink Comments "clsPluginUpdateComment"
Then Validate Sink Update Comment

@CLDMYSQL @TC-Delete-Comments
Scenario: TC-CLDMYSQL-DSGN-06:Verify the Delete added Comments functionality for CloudSQL MySQL connector
Given Open DataFusion Project to configure pipeline
When Target is CloudSQLMySQL
Then Add and Save Comments sink "clsPluginComment"
Then Edit Sink Comments "clsPluginUpdateComment"
Then Delete Comments
Then Validate Comment has been deleted successfully
120 changes: 120 additions & 0 deletions e2e-test/src/test/features/Cloudsqlmysql_sink_runtime.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
Feature: BigQuery to CloudSqlMySql and GCS to CloudSqlMySql Runtime

@CLDMYSQL @TC-Runtime-BigQuery-to-CLOUDSqlMYSQL:
Scenario: TC-CLDMYSQL-RNTM-01:Verify user is able to transferred data from BigQuery to CloudSqlMysql with mandatory fields
Given Open DataFusion Project to configure pipeline
When Source is BigQuery
When Target is CloudSQLMySQL
Then Link BigQuery to CloudSQLMySQL to establish connection
Then Enter the Source BigQuery Properties for table "clsTableNameBQ"
Then Validate the Schema
Then Verify the Connector status
Then Close the BigQuery Properties
Then Enter the sink CloudSQLMySQL Properties for table "clsTableNameBQCS"
Then Click on Validate button
Then Verify the Connector status
Then Close the CloudSQLMySQL Properties
Then Save the pipeline
Then Preview and run the pipeline
Then Verify the preview of pipeline is "success"
Then Click on PreviewData for CloudSQL MySQL
Then Verify Preview output schema matches the outputSchema captured in properties
Then Close the Preview
Then Pre records count from CloudSQLMySQL table "clsTableNameBQCS"
Then Deploy the pipeline
Then Run the Pipeline in Runtime
Then Wait till pipeline is in running state
Then Open and capture Logs
Then Verify the pipeline status is "Succeeded"
Then Post records count from CloudSQLMySQL table "clsTableNameBQCS"
Then Validate the output record count
Then Validate successMessage is displayed
Then Validate the count of records transferred from BigQuery "clsTableNameBQ" to CloudSqlMySql "clsTableNameBQCS"

@CLDMYSQL @TC-Runtime-BigQuery-to-CLOUDSqlMYSQL:
Scenario: TC-CLDMYSQL-RNTM-02:Verify user is able to transferred data from BigQuery to CloudSqlMysql with filter
Given Open DataFusion Project to configure pipeline
When Source is BigQuery
When Target is CloudSQLMySQL
Then Link BigQuery to CloudSQLMySQL to establish connection
Then Enter the Source BigQuery Properties for table "clsTableNameBQ1"
Then Enter the Source BigQuery with filter "clsFilterBigQuery" option
Then Validate the Schema
Then Verify the Connector status
Then Close the BigQuery Properties
Then Enter the sink CloudSQLMySQL Properties for table "clsTableNameBQCS1"
Then Click on Validate button
Then Verify the Connector status
Then Close the CloudSQLMySQL Properties
Then Save the pipeline
Then Preview and run the pipeline
Then Verify the preview of pipeline is "success"
Then Click on PreviewData for CloudSQL MySQL
Then Verify Preview output schema matches the outputSchema captured in properties
Then Close the Preview
Then Pre records count from CloudSQLMySQL table "clsTableNameBQCS1"
Then Deploy the pipeline
Then Run the Pipeline in Runtime
Then Wait till pipeline is in running state
Then Open and capture Logs
Then Verify the pipeline status is "Succeeded"
Then Post records count from CloudSQLMySQL table "clsTableNameBQCS1"
Then Validate the output record count
Then Validate successMessage is displayed
Then Validate the count of records transferred from BigQuery "clsTableNameBQ1" to CloudSqlMySql with filter "clsFilterBigQuery"

@CLDMYSQL @TC-Runtime-GCS-to-CLOUDSQLMYSQL:
Scenario: TC-CLDMYSQL-RNTM-03:Verify user is able to transferred data from GCS to CloudSQLMySQL with mandatory fields
Given Open DataFusion Project to configure pipeline
When Source is GCS bucket
When Target is CloudSQLMySQL
Then Link GCS to CloudSQLMySQL to establish connection
Then Enter the GCS Properties with "clsBucket" GCS bucket and format "clsFormatType"
Then Validate the Schema
Then Verify the Connector status
Then Close the GCS Properties
Then Enter the sink CloudSQLMySQL Properties for table "clsTableNameGCSCS"
Then Click on Validate button
Then Verify the Connector status
Then Close the CloudSQLMySQL Properties
Then Save the pipeline
Then Preview and run the pipeline
Then Verify the preview of pipeline is "success"
Then Click on PreviewData for CloudSQL MySQL
Then Verify Preview output schema matches the outputSchema captured in properties
Then Close the Preview
Then Deploy the pipeline
Then Run the Pipeline in Runtime
Then Wait till pipeline is in running state
Then Open and capture Logs
Then Verify the pipeline status is "Succeeded"
Then Validate the output record count
Then Validate successMessage is displayed

@CLDMYSQL @TC-Runtime-GCS-to-CLOUDSQLMYSQL:
Scenario: TC-CLDMYSQL-RNTM-04:Verify user is able to Duplicate the pipeline
Given Open DataFusion Project to configure pipeline
When Source is GCS bucket
When Target is CloudSQLMySQL
Then Link GCS to CloudSQLMySQL to establish connection
Then Enter the GCS Properties with "clsBucket" GCS bucket and format "clsFormatType"
Then Validate the Schema
Then Verify the Connector status
Then Close the GCS Properties
Then Enter the sink CloudSQLMySQL Properties for table "clsTableNameGCSCS"
Then Click on Validate button
Then Verify the Connector status
Then Close the CloudSQLMySQL Properties
Then Save the pipeline
Then Preview and run the pipeline
Then Verify the preview of pipeline is "success"
Then Click on PreviewData for CloudSQL MySQL
Then Verify Preview output schema matches the outputSchema captured in properties
Then Close the Preview
Then Deploy the pipeline
Then Run the Pipeline in Runtime
Then Wait till pipeline is in running state
Then Verify the pipeline status is "Succeeded"
Then Validate the output record count
Then Create Duplicate pipeline
Then Validate studio is opened with duplicate pipeline
95 changes: 95 additions & 0 deletions e2e-test/src/test/features/Cloudsqlmysql_source_designtime.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
Feature: CloudSqlMySql Source Design Time

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

@CLDMYSQL @TC-Invalid-TestData-for-DriverName_Field:
Scenario: TC-CLDMYSQL-DSGN-02:Verify Driver Name field validation error with invalid test data
Given Open DataFusion Project to configure pipeline
When Source is CloudSQLMySQL
Then Open CloudSQLMySQL Properties
Then Enter Reference Name "clsReferenceNameValid" & Database Name "clsDatabaseName" with Test Data
Then Enter Connection Name "clsConnectionNameValid" and Import Query "clsImportQuery"
Then Enter Driver Name with Invalid value for Driver name field "clsDriverNameInvalid"
Then Verify invalid Driver name error message is displayed for Driver "clsDriverNameInvalid"
Then Verify plugin validation fails with error
Then Close the CloudSQLMySQL Properties

@CLDMYSQL @TC-Invalid-TestData-for-ImportQuery_Field:
Scenario: TC-CLDMYSQL-DSGN-03:Verify ImportQuery Field validation error with invalid test data
Given Open DataFusion Project to configure pipeline
When Source is CloudSQLMySQL
Then Open CloudSQLMySQL Properties
Then Enter Reference Name "clsReferenceNameValid" & Database Name "clsDatabaseName" with Test Data
Then Enter Connection Name "clsConnectionNameValid" and Import Query "clsInvalidImportQuery"
Then Validate Connector properties
Then Verify invalid import query error message is displayed for import query "clsInvalidImportQuery"
Then Verify plugin validation fails with error
Then Close the CloudSQLMySQL Properties

@CLDMYSQL @TC-Invalid-TestData-for-ReferenceName&ConnectionName
Scenario: TC-CLDMYSQL-DSGN-04:Verify Reference Name & Connection Name field validation errors with invalid test data
Given Open DataFusion Project to configure pipeline
When Source is CloudSQLMySQL
Then Enter Reference Name & Connection Name with Invalid Test Data and import query "clsImportQuery"
Then Verify Reference Name "clsReferenceNameInvalid" Field with Invalid Test Data
Then Verify Connection Name "clsConnectionNameInvalid" fields with Invalid Test Data
Then Enter Connection Name with private instance type
Then Verify Connection Name with private instance type "clsConnectionNameInvalid"
Then Close the CloudSQLMySQL Properties

@CLDMYSQL @TC-Blank-value-error-Validation-for-SplitColumn-Invalid-value-for-Number-of-splits:
Scenario: TC-CLDMYSQL-DSGN-05:Verify the Split-By field validation error and invalid Number of Splits
Given Open DataFusion Project to configure pipeline
When Source is CloudSQLMySQL
Then Enter the source CloudSQLMySQL properties with import query "clsImportQuery1" bounding query "clsBoundingQuery"
Then Provide blank values in Split column and invalid Number of splits
Then Click on Validate button
Then Verify Split-by column field error
Then Verify Number of splits field error
Then Close the CloudSQLMySQL Properties

@CLDMYSQL @TC-Blank-value-error-Validation-for-Bounding-Query:
Scenario: TC-CLDMYSQL-DSGN-06:Verify the Bounding Query validation error when values are not given
Given Open DataFusion Project to configure pipeline
When Source is CloudSQLMySQL
Then Enter the source CloudSQL-MySQL properties with import query "clsImportQuery1" and blank bounding query
Then Provide blank values in Split column and invalid Number of splits
Then Verify Bounding Query field error
Then Close the CloudSQLMySQL Properties

@CLDMYSQL @TC-Add-Comments
Scenario: TC-CLDMYSQL-DSGN-07:Verify the Add Comments functionality for CloudSQL MySQL connector
Given Open DataFusion Project to configure pipeline
When Source is CloudSQLMySQL
Then Add and Save Comments "clsPluginComment"
Then Validate Source Comment

@CLDMYSQL @TC-Edit-Comments
Scenario: TC-CLDMYSQL-DSGN-08:Verify the Edit added Comments functionality for CloudSQL MySQL connector
Given Open DataFusion Project to configure pipeline
When Source is CloudSQLMySQL
Then Add and Save Comments "clsPluginComment"
Then Edit Source Comments "clsPluginUpdateComment"
Then Validate Source Update Comment

@CLDMYSQL @TC-Delete-Comments
Scenario: TC-CLDMYSQL-DSGN-09:Verify the Delete added Comments functionality for CloudSQL MySQL connector
Given Open DataFusion Project to configure pipeline
When Source is CloudSQLMySQL
Then Add and Save Comments "clsPluginComment"
Then Edit Source Comments "clsPluginUpdateComment"
Then Delete Comments
Then Validate Comment has been deleted successfully
Loading