15
15
16
16
Feature : CloudMySql Sink - Run time scenarios (macro )
17
17
18
+ @BQ_SOURCE_TEST @CLOUDMYSQL_TEST_TABLE
18
19
Scenario : To verify data is getting transferred from BigQuery source to CloudMySql sink using macro arguments in connection section
19
20
Given Open Datafusion Project to configure pipeline
20
21
When Expand Plugin group in the LHS plugins list: "Source"
@@ -24,34 +25,28 @@ Feature: CloudMySql Sink - Run time scenarios (macro)
24
25
Then Connect plugins: "BigQuery" and "CloudSQL MySQL" to establish connection
25
26
Then Navigate to the properties page of plugin: "BigQuery"
26
27
Then Enter input plugin property: "referenceName" with value: "BQReferenceName"
27
- Then Click on the Macro button of Property: "project" and set the value to: "projectId"
28
- Then Click on the Macro button of Property: "datasetProject" and set the value to: "bqDatasetProjectId"
29
- Then Click on the Macro button of Property: "dataset" and set the value to: "bqDataset"
30
- Then Click on the Macro button of Property: "table" and set the value to: "bqTargetTable"
31
- Then Click on the Get Schema button
28
+ And Replace input plugin property: "project" with value: "projectId"
29
+ And Enter input plugin property: "datasetProject" with value: "datasetprojectId"
30
+ And Enter input plugin property: "dataset" with value: "dataset"
31
+ And Enter input plugin property: "table" with value: "bqSourceTable"
32
32
Then Validate "BigQuery" plugin properties
33
33
Then Close the Plugin Properties page
34
34
Then Navigate to the properties page of plugin: "CloudSQL MySQL"
35
- Then Click on the Macro button of Property: "jdbcPluginName" and set the value to: "cloudsql-mysql "
35
+ Then Click on the Macro button of Property: "jdbcPluginName" and set the value to: "driverName "
36
36
Then Select radio button plugin property: "instanceType" with value: "public"
37
37
Then Enter input plugin property: "connectionName" with value: "ConnectionName"
38
- Then Click on the Macro button of Property: "user" and set the value to: "username "
39
- Then Click on the Macro button of Property: "password" and set the value to: "password "
38
+ Then Click on the Macro button of Property: "user" and set the value to: "Username "
39
+ Then Click on the Macro button of Property: "password" and set the value to: "Password "
40
40
Then Enter input plugin property: "referenceName" with value: "RefName"
41
- Then Enter input plugin property: "database" with value: "TestDatabase "
42
- Then Click on the Macro button of Property : "tableName" and set the value to : "mytable "
41
+ Then Enter input plugin property: "database" with value: "DatabaseName "
42
+ Then Replace input plugin property : "tableName" with value: "targetTable "
43
43
Then Validate "CloudSQL MySQL" plugin properties
44
44
Then Close the Plugin Properties page
45
45
Then Save the pipeline
46
46
Then Preview and run the pipeline
47
- Then Enter runtime argument value "projectId" for key "projectId"
48
- Then Enter runtime argument value "bqDatasetId" for key "bqDatasetProjectId"
49
- Then Enter runtime argument value "dataset" for key "bqDataset"
50
- Then Enter runtime argument value "bqSourceTable" for key "bqTargetTable"
51
- Then Enter runtime argument value "driver" for key "cloudsql-mysql"
52
- Then Enter runtime argument value from environment variable "name" for key "username"
53
- Then Enter runtime argument value from environment variable "pass" for key "password"
54
- Then Enter runtime argument value "table" for key "mytable"
47
+ Then Enter runtime argument value "driver" for key "driverName"
48
+ Then Enter runtime argument value "username" for key "Username"
49
+ Then Enter runtime argument value "password" for key "Password"
55
50
Then Run the preview of pipeline with runtime arguments
56
51
Then Wait till pipeline preview is in running state
57
52
Then Open and capture pipeline preview logs
@@ -60,18 +55,128 @@ Feature: CloudMySql Sink - Run time scenarios (macro)
60
55
Then Close the preview
61
56
Then Deploy the pipeline
62
57
Then Run the Pipeline in Runtime
63
- Then Enter runtime argument value "projectId" for key "projectId"
64
- Then Enter runtime argument value "bqDatasetId" for key "bqDatasetProjectId"
65
- Then Enter runtime argument value "dataset" for key "bqDataset"
66
- Then Enter runtime argument value "bqSourceTable" for key "bqTargetTable"
67
- Then Enter runtime argument value "driver" for key "cloudsql-mysql"
68
- Then Enter runtime argument value from environment variable "name" for key "username"
69
- Then Enter runtime argument value from environment variable "pass" for key "password"
70
- Then Click on the Macro button of Property: "dataset" and set the value to: "bqDataset"
71
- Then Enter runtime argument value "table" for key "mytable"
58
+ Then Enter runtime argument value "driver" for key "driverName"
59
+ Then Enter runtime argument value "username" for key "Username"
60
+ Then Enter runtime argument value "password" for key "Password"
72
61
Then Run the Pipeline in Runtime with runtime arguments
73
62
Then Wait till pipeline is in running state
74
63
Then Open and capture logs
75
64
Then Verify the pipeline status is "Succeeded"
76
65
Then Close the pipeline logs
77
66
67
+ @BQ_SOURCE_TEST @CLOUDMYSQL_TEST_TABLE
68
+ Scenario : To verify data is getting transferred from BigQuery source to CloudMySql sink using macro arguments in basic section
69
+ Given Open Datafusion Project to configure pipeline
70
+ When Expand Plugin group in the LHS plugins list: "Source"
71
+ When Select plugin: "BigQuery" from the plugins list as: "Source"
72
+ When Expand Plugin group in the LHS plugins list: "Sink"
73
+ When Select plugin: "CloudSQL MySQL" from the plugins list as: "Sink"
74
+ Then Connect plugins: "BigQuery" and "CloudSQL MySQL" to establish connection
75
+ Then Navigate to the properties page of plugin: "BigQuery"
76
+ And Replace input plugin property: "project" with value: "projectId"
77
+ And Enter input plugin property: "datasetProject" with value: "datasetprojectId"
78
+ And Enter input plugin property: "dataset" with value: "dataset"
79
+ And Enter input plugin property: "table" with value: "bqSourceTable"
80
+ Then Validate "BigQuery" plugin properties
81
+ Then Close the Plugin Properties page
82
+ Then Navigate to the properties page of plugin: "CloudSQL MySQL"
83
+ Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "cloudsql-mysql"
84
+ Then Select radio button plugin property: "instanceType" with value: "public"
85
+ Then Enter input plugin property: "connectionName" with value: "ConnectionName"
86
+ Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
87
+ Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
88
+ Then Enter input plugin property: "referenceName" with value: "RefName"
89
+ Then Enter input plugin property: "database" with value: "DatabaseName"
90
+ Then Click on the Macro button of Property: "tableName" and set the value to: "Tablename"
91
+ Then Validate "CloudSQL MySQL2" plugin properties
92
+ Then Close the Plugin Properties page
93
+ Then Save the pipeline
94
+ Then Preview and run the pipeline
95
+ Then Enter runtime argument value "targetTable" for key "Tablename"
96
+ Then Run the preview of pipeline with runtime arguments
97
+ Then Wait till pipeline preview is in running state
98
+ Then Open and capture pipeline preview logs
99
+ Then Verify the preview run status of pipeline in the logs is "succeeded"
100
+ Then Close the pipeline logs
101
+ Then Close the preview
102
+ Then Deploy the pipeline
103
+ Then Run the Pipeline in Runtime
104
+ Then Enter runtime argument value "targetTable" for key "Tablename"
105
+ Then Run the Pipeline in Runtime with runtime arguments
106
+ Then Wait till pipeline is in running state
107
+ Then Open and capture logs
108
+ Then Verify the pipeline status is "Succeeded"
109
+ Then Close the pipeline logs
110
+
111
+ @BQ_SOURCE_TEST @CLOUDMYSQL_TEST_TABLE
112
+ Scenario : Verify pipeline failure message in logs when user provides invalid Table Name of plugin with Macros
113
+ Given Open Datafusion Project to configure pipeline
114
+ When Expand Plugin group in the LHS plugins list: "Source"
115
+ When Select plugin: "BigQuery" from the plugins list as: "Source"
116
+ When Expand Plugin group in the LHS plugins list: "Sink"
117
+ When Select plugin: "CloudSQL MySQL" from the plugins list as: "Sink"
118
+ Then Connect plugins: "BigQuery" and "CloudSQL MySQL" to establish connection
119
+ Then Navigate to the properties page of plugin: "BigQuery"
120
+ And Replace input plugin property: "project" with value: "projectId"
121
+ And Enter input plugin property: "datasetProject" with value: "datasetprojectId"
122
+ And Enter input plugin property: "dataset" with value: "dataset"
123
+ And Enter input plugin property: "table" with value: "bqSourceTable"
124
+ Then Validate "BigQuery" plugin properties
125
+ Then Close the Plugin Properties page
126
+ Then Navigate to the properties page of plugin: "CloudSQL MySQL"
127
+ Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "cloudsql-mysql"
128
+ Then Select radio button plugin property: "instanceType" with value: "public"
129
+ Then Enter input plugin property: "connectionName" with value: "ConnectionName"
130
+ Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
131
+ Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
132
+ Then Enter input plugin property: "referenceName" with value: "RefName"
133
+ Then Enter input plugin property: "database" with value: "DatabaseName"
134
+ Then Click on the Macro button of Property: "tableName" and set the value to: "invalidTablename"
135
+ Then Validate "CloudSQL MySQL2" plugin properties
136
+ Then Close the Plugin Properties page
137
+ Then Save the pipeline
138
+ Then Deploy the pipeline
139
+ Then Run the Pipeline in Runtime
140
+ Then Enter runtime argument value "invalidTablename" for key "invalidTablename"
141
+ Then Run the Pipeline in Runtime with runtime arguments
142
+ Then Wait till pipeline is in running state
143
+ Then Open and capture logs
144
+ And Verify the pipeline status is "Failed"
145
+
146
+ @BQ_SOURCE_TEST @CLOUDMYSQL_TEST_TABLE
147
+ Scenario : Verify pipeline failure message in logs when user provides invalid credentials of plugin with Macros
148
+ Given Open Datafusion Project to configure pipeline
149
+ When Expand Plugin group in the LHS plugins list: "Source"
150
+ When Select plugin: "BigQuery" from the plugins list as: "Source"
151
+ When Expand Plugin group in the LHS plugins list: "Sink"
152
+ When Select plugin: "CloudSQL MySQL" from the plugins list as: "Sink"
153
+ Then Connect plugins: "BigQuery" and "CloudSQL MySQL" to establish connection
154
+ Then Navigate to the properties page of plugin: "BigQuery"
155
+ Then Enter input plugin property: "referenceName" with value: "BQReferenceName"
156
+ And Replace input plugin property: "project" with value: "projectId"
157
+ And Enter input plugin property: "datasetProject" with value: "datasetprojectId"
158
+ And Enter input plugin property: "dataset" with value: "dataset"
159
+ And Enter input plugin property: "table" with value: "bqSourceTable"
160
+ Then Validate "BigQuery" plugin properties
161
+ Then Close the Plugin Properties page
162
+ Then Navigate to the properties page of plugin: "CloudSQL MySQL"
163
+ Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "cloudsql-mysql"
164
+ Then Select radio button plugin property: "instanceType" with value: "public"
165
+ Then Enter input plugin property: "connectionName" with value: "ConnectionName"
166
+ Then Click on the Macro button of Property: "user" and set the value to: "Username"
167
+ Then Click on the Macro button of Property: "password" and set the value to: "Password"
168
+ Then Enter input plugin property: "referenceName" with value: "RefName"
169
+ Then Enter input plugin property: "database" with value: "DatabaseName"
170
+ Then Replace input plugin property: "tableName" with value: "targetTable"
171
+ Then Validate "CloudSQL MySQL" plugin properties
172
+ Then Close the Plugin Properties page
173
+ Then Save the pipeline
174
+ Then Deploy the pipeline
175
+ Then Run the Pipeline in Runtime
176
+ Then Enter runtime argument value "invalidUserName" for key "Username"
177
+ Then Enter runtime argument value "invalidPassword" for key "Password"
178
+ Then Run the Pipeline in Runtime with runtime arguments
179
+ Then Wait till pipeline is in running state
180
+ Then Open and capture logs
181
+ And Verify the pipeline status is "Failed"
182
+
0 commit comments