Skip to content

Commit 655120e

Browse files
My SQL e2e tests Scenarios (#381)
Co-authored-by: priyabhatnagar <priya.bhatnagar@cloudsufi.com>
1 parent a938283 commit 655120e

33 files changed

+2093
-25
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#
2+
# Copyright © 2023 Cask Data, Inc.
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
5+
# use this file except in compliance with the License. You may obtain a copy of
6+
# the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+
# License for the specific language governing permissions and limitations under
14+
# the License.
15+
#
16+
17+
@Mysql
18+
Feature: Mysql - Verify Mysql sink data transfer for different datatypes
19+
20+
@BQ_SOURCE_TEST @MYSQL_TARGET_TABLE
21+
Scenario: To verify data is getting transferred from BigQuery to Mysql successfully
22+
Given Open Datafusion Project to configure pipeline
23+
When Expand Plugin group in the LHS plugins list: "Source"
24+
When Select plugin: "BigQuery" from the plugins list as: "Source"
25+
And Navigate to the properties page of plugin: "BigQuery"
26+
And Enter input plugin property: "referenceName" with value: "Reference"
27+
And Replace input plugin property: "project" with value: "projectId"
28+
And Enter input plugin property: "datasetProject" with value: "datasetprojectId"
29+
And Enter input plugin property: "dataset" with value: "dataset"
30+
And Enter input plugin property: "table" with value: "bqSourceTable"
31+
Then Validate "BigQuery" plugin properties
32+
And Close the Plugin Properties page
33+
When Expand Plugin group in the LHS plugins list: "Sink"
34+
When Select plugin: "MySQL" from the plugins list as: "Sink"
35+
Then Connect plugins: "BigQuery" and "MySQL" to establish connection
36+
Then Navigate to the properties page of plugin: "MySQL"
37+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
38+
Then Replace input plugin property: "host" with value: "host" for Credentials and Authorization related fields
39+
Then Replace input plugin property: "port" with value: "port" for Credentials and Authorization related fields
40+
Then Replace input plugin property: "database" with value: "databaseName"
41+
Then Replace input plugin property: "tableName" with value: "targetTable"
42+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
43+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
44+
Then Enter input plugin property: "referenceName" with value: "targetRef"
45+
Then Validate "MySQL2" plugin properties
46+
Then Close the Plugin Properties page
47+
Then Save the pipeline
48+
Then Preview and run the pipeline
49+
Then Verify the preview of pipeline is "success"
50+
Then Close the preview
51+
Then Deploy the pipeline
52+
Then Run the Pipeline in Runtime
53+
Then Wait till pipeline is in running state
54+
Then Open and capture logs
55+
Then Verify the pipeline status is "Succeeded"
56+
Then Validate the values of records transferred to target MySQL table is equal to the values from source BigQuery table
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Copyright © 2023 Cask Data, Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
4+
# use this file except in compliance with the License. You may obtain a copy of
5+
# the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12+
# License for the specific language governing permissions and limitations under
13+
# the License...
14+
15+
@Mysql
16+
Feature: MySQL Sink - Design time scenarios
17+
18+
@MYSQL_SOURCE_TEST @MYSQL_SINK_TEST @Mysql_Required
19+
Scenario: Verify user can validate successfully when sink plugin is configured for table with basic details
20+
Given Open Datafusion Project to configure pipeline
21+
When Expand Plugin group in the LHS plugins list: "Sink"
22+
When Select plugin: "MySQL" from the plugins list as: "Sink"
23+
Then Navigate to the properties page of plugin: "MySQL"
24+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
25+
Then Replace input plugin property: "host" with value: "host" for Credentials and Authorization related fields
26+
Then Replace input plugin property: "port" with value: "port" for Credentials and Authorization related fields
27+
Then Replace input plugin property: "database" with value: "databaseName"
28+
Then Replace input plugin property: "tableName" with value: "targetTable"
29+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
30+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
31+
Then Enter input plugin property: "referenceName" with value: "targetRef"
32+
Then Validate "MySQL2" plugin properties
33+
34+
@MYSQL_SOURCE_TEST @CONNECTION @MYSQL_SINK_TEST @Mysql_Required
35+
Scenario: Verify the MySQL Sink plugin using connection manager functionality
36+
Given Open Datafusion Project to configure pipeline
37+
When Expand Plugin group in the LHS plugins list: "Sink"
38+
When Select plugin: "MySQL" from the plugins list as: "Sink"
39+
Then Navigate to the properties page of plugin: "MySQL"
40+
And Click plugin property: "switch-useConnection"
41+
And Click on the Browse Connections button
42+
And Click on the Add Connection button
43+
And Select Mysql Connection
44+
And Enter input plugin property: "name" with value: "connection.name"
45+
Then Enter input plugin property: "referenceName" with value: "sourceRef"
46+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
47+
Then Replace input plugin property: "host" with value: "host" for Credentials and Authorization related fields
48+
Then Replace input plugin property: "port" with value: "port" for Credentials and Authorization related fields
49+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
50+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
51+
Then Click on the Test Connection button
52+
And Verify the test connection is successful
53+
Then Click on the Create button
54+
And Use new connection
55+
Then Enter input plugin property: "referenceName" with value: "sourceRef"
56+
Then Replace input plugin property: "database" with value: "databaseName"
57+
Then Replace input plugin property: "tableName" with value: "targetTable"
58+
Then Validate "MySQL" plugin properties
59+
Then Close the Plugin Properties page
60+
61+
@MYSQL_SOURCE_TEST @MYSQL_SINK_TEST @Mysql_Required
62+
Scenario: Verify user should be able to validate sink plugin successfully by setting the advanced section fields
63+
Given Open Datafusion Project to configure pipeline
64+
When Expand Plugin group in the LHS plugins list: "Sink"
65+
When Select plugin: "MySQL" from the plugins list as: "Sink"
66+
Then Navigate to the properties page of plugin: "MySQL"
67+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
68+
Then Replace input plugin property: "host" with value: "host" for Credentials and Authorization related fields
69+
Then Replace input plugin property: "port" with value: "port" for Credentials and Authorization related fields
70+
Then Replace input plugin property: "database" with value: "databaseName"
71+
Then Replace input plugin property: "tableName" with value: "targetTable"
72+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
73+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
74+
Then Enter input plugin property: "referenceName" with value: "targetRef"
75+
Then Click plugin property: "useCompression"
76+
Then Click plugin property: "autoReconnect"
77+
Then Validate "MySQL" plugin properties

0 commit comments

Comments
 (0)