Skip to content

Commit 6c26773

Browse files
committed
e2e mysql source additional tests
1 parent 0ef198a commit 6c26773

File tree

7 files changed

+315
-12
lines changed

7 files changed

+315
-12
lines changed

mysql-plugin/src/e2e-test/features/mysqlsource/DesignTimeValidation.feature

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,77 @@ Feature: MySQL Source - Design time validation scenarios
141141
| referenceName |
142142
| database |
143143
| importQuery |
144+
145+
@Mysql_Required
146+
Scenario: To verify MySQL source plugin validation error message with invalid reference test data
147+
Given Open Datafusion Project to configure pipeline
148+
When Expand Plugin group in the LHS plugins list: "Source"
149+
When Select plugin: "MySQL" from the plugins list as: "Source"
150+
Then Navigate to the properties page of plugin: "MySQL"
151+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
152+
Then Replace input plugin property: "host" with value: "host" for Credentials and Authorization related fields
153+
Then Replace input plugin property: "port" with value: "port" for Credentials and Authorization related fields
154+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
155+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
156+
Then Enter input plugin property: "referenceName" with value: "invalidRef"
157+
Then Replace input plugin property: "database" with value: "databaseName"
158+
Then Enter textarea plugin property: "importQuery" with value: "selectQuery"
159+
Then Click on the Validate button
160+
Then Verify that the Plugin Property: "referenceName" is displaying an in-line error message: "invalidreferenceName.error.message"
161+
162+
@Mysql_Required
163+
Scenario: To verify MySQL source plugin validation error message when fetch size is changed to zero
164+
Given Open Datafusion Project to configure pipeline
165+
When Expand Plugin group in the LHS plugins list: "Source"
166+
When Select plugin: "MySQL" from the plugins list as: "Source"
167+
Then Navigate to the properties page of plugin: "MySQL"
168+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
169+
Then Replace input plugin property: "host" with value: "host" for Credentials and Authorization related fields
170+
Then Replace input plugin property: "port" with value: "port" for Credentials and Authorization related fields
171+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
172+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
173+
Then Enter input plugin property: "referenceName" with value: "sourceRef"
174+
Then Replace input plugin property: "database" with value: "databaseName"
175+
Then Enter textarea plugin property: "importQuery" with value: "selectQuery"
176+
Then Replace input plugin property: "fetchSize" with value: "zeroValue"
177+
Then Click on the Validate button
178+
Then Verify that the Plugin Property: "fetchSize" is displaying an in-line error message: "errorMessageInvalidFetchSize"
179+
180+
@Mysql_Required
181+
Scenario: To verify MySQL source plugin validation error message when number of Split value is changed to zero
182+
Given Open Datafusion Project to configure pipeline
183+
When Expand Plugin group in the LHS plugins list: "Source"
184+
When Select plugin: "MySQL" from the plugins list as: "Source"
185+
Then Navigate to the properties page of plugin: "MySQL"
186+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
187+
Then Replace input plugin property: "host" with value: "host" for Credentials and Authorization related fields
188+
Then Replace input plugin property: "port" with value: "port" for Credentials and Authorization related fields
189+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
190+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
191+
Then Enter input plugin property: "referenceName" with value: "sourceRef"
192+
Then Replace input plugin property: "database" with value: "databaseName"
193+
Then Enter textarea plugin property: "importQuery" with value: "selectQuery"
194+
Then Replace input plugin property: "numSplits" with value: "zeroValue"
195+
Then Click on the Validate button
196+
Then Verify that the Plugin Property: "numSplits" is displaying an in-line error message: "errorMessageInvalidNumberOfSplits"
197+
198+
@Mysql_Required
199+
Scenario: To verify MySQL source plugin validation error message with blank bounding query
200+
Given Open Datafusion Project to configure pipeline
201+
When Expand Plugin group in the LHS plugins list: "Source"
202+
When Select plugin: "MySQL" from the plugins list as: "Source"
203+
Then Navigate to the properties page of plugin: "MySQL"
204+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
205+
Then Replace input plugin property: "host" with value: "host" for Credentials and Authorization related fields
206+
Then Replace input plugin property: "port" with value: "port" for Credentials and Authorization related fields
207+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
208+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
209+
Then Enter input plugin property: "referenceName" with value: "sourceRef"
210+
Then Replace input plugin property: "database" with value: "databaseName"
211+
Then Enter textarea plugin property: "importQuery" with value: "invalidImportQuery"
212+
Then Replace input plugin property: "splitBy" with value: "splitBy"
213+
Then Replace input plugin property: "numSplits" with value: "numberOfSplits"
214+
Then Click on the Validate button
215+
Then Verify that the Plugin Property: "boundingQuery" is displaying an in-line error message: "boundingQuery.error.message"
216+
Then Verify that the Plugin Property: "numSplits" is displaying an in-line error message: "boundingQuery.error.message"
217+
Then Verify that the Plugin Property: "importQuery" is displaying an in-line error message: "errorMessageInvalidImportQuery"

mysql-plugin/src/e2e-test/features/mysqlsource/RunTime.feature

Lines changed: 147 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,4 +188,150 @@ Feature: MySQL Source - Run time scenarios
188188
Then Wait till pipeline is in running state
189189
Then Open and capture logs
190190
Then Verify the pipeline status is "Succeeded"
191-
Then Validate the values of records transferred to target table is equal to the values from source table
191+
Then Validate the values of records transferred to target table is equal to the values from source table
192+
193+
@MYSQL_SOURCE_TEST @MYSQL_TARGET_TEST @Mysql_Required
194+
Scenario: To verify data is getting transferred from Mysql to Mysql successfully when connection arguments are set to read boolean datatype
195+
Given Open Datafusion Project to configure pipeline
196+
When Expand Plugin group in the LHS plugins list: "Source"
197+
When Select plugin: "MySQL" from the plugins list as: "Source"
198+
When Expand Plugin group in the LHS plugins list: "Sink"
199+
When Select plugin: "MySQL" from the plugins list as: "Sink"
200+
Then Connect plugins: "MySQL" and "MySQL2" to establish connection
201+
Then Navigate to the properties page of plugin: "MySQL"
202+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
203+
Then Replace input plugin property: "host" with value: "host" for Credentials and Authorization related fields
204+
Then Replace input plugin property: "port" with value: "port" for Credentials and Authorization related fields
205+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
206+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
207+
Then Enter input plugin property: "referenceName" with value: "sourceRef"
208+
Then Replace input plugin property: "database" with value: "databaseName"
209+
Then Enter key value pairs for plugin property: "connectionArguments" with values from json: "connectionArgumentsForBooleanDataType"
210+
Then Enter textarea plugin property: "importQuery" with value: "selectQuery"
211+
Then Click on the Get Schema button
212+
Then Verify the Output Schema matches the Expected Schema: "outputSourceSchema"
213+
Then Validate "MySQL" plugin properties
214+
Then Close the Plugin Properties page
215+
Then Navigate to the properties page of plugin: "MySQL2"
216+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
217+
Then Replace input plugin property: "host" with value: "host" for Credentials and Authorization related fields
218+
Then Replace input plugin property: "port" with value: "port" for Credentials and Authorization related fields
219+
Then Replace input plugin property: "database" with value: "databaseName"
220+
Then Replace input plugin property: "tableName" with value: "targetTable"
221+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
222+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
223+
Then Enter input plugin property: "referenceName" with value: "targetRef"
224+
Then Enter key value pairs for plugin property: "connectionArguments" with values from json: "connectionArgumentsForBooleanDataType"
225+
Then Validate "MySQL2" plugin properties
226+
Then Close the Plugin Properties page
227+
Then Save the pipeline
228+
Then Preview and run the pipeline
229+
Then Verify the preview of pipeline is "success"
230+
Then Click on preview data for MySQL sink
231+
Then Verify preview output schema matches the outputSchema captured in properties
232+
Then Close the preview data
233+
Then Deploy the pipeline
234+
Then Run the Pipeline in Runtime
235+
Then Wait till pipeline is in running state
236+
Then Open and capture logs
237+
Then Verify the pipeline status is "Succeeded"
238+
Then Validate the values of records transferred to target table is equal to the values from source table
239+
240+
@MYSQL_SOURCE_TEST @MYSQL_TARGET_TEST
241+
Scenario: To verify data is getting transferred from Mysql to Mysql successfully with bounding query
242+
Given Open Datafusion Project to configure pipeline
243+
When Expand Plugin group in the LHS plugins list: "Source"
244+
When Select plugin: "MySQL" from the plugins list as: "Source"
245+
When Expand Plugin group in the LHS plugins list: "Sink"
246+
When Select plugin: "MySQL" from the plugins list as: "Sink"
247+
Then Connect plugins: "MySQL" and "MySQL2" to establish connection
248+
Then Navigate to the properties page of plugin: "MySQL"
249+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
250+
Then Replace input plugin property: "host" with value: "host" for Credentials and Authorization related fields
251+
Then Replace input plugin property: "port" with value: "port" for Credentials and Authorization related fields
252+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
253+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
254+
Then Enter input plugin property: "referenceName" with value: "sourceRef"
255+
Then Replace input plugin property: "database" with value: "databaseName"
256+
Then Enter textarea plugin property: "importQuery" with value: "selectQuery"
257+
Then Enter textarea plugin property: "boundingQuery" with value: "boundingQuery"
258+
Then Click on the Get Schema button
259+
Then Verify the Output Schema matches the Expected Schema: "outputSchema"
260+
Then Validate "MySQL" plugin properties
261+
Then Close the Plugin Properties page
262+
Then Navigate to the properties page of plugin: "MySQL2"
263+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
264+
Then Replace input plugin property: "host" with value: "host" for Credentials and Authorization related fields
265+
Then Replace input plugin property: "port" with value: "port" for Credentials and Authorization related fields
266+
Then Replace input plugin property: "database" with value: "databaseName"
267+
Then Replace input plugin property: "tableName" with value: "targetTable"
268+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
269+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
270+
Then Enter input plugin property: "referenceName" with value: "targetRef"
271+
Then Validate "MySQL2" plugin properties
272+
Then Close the Plugin Properties page
273+
Then Save the pipeline
274+
Then Preview and run the pipeline
275+
Then Verify the preview of pipeline is "success"
276+
Then Click on preview data for MySQL sink
277+
Then Verify preview output schema matches the outputSchema captured in properties
278+
Then Close the preview data
279+
Then Deploy the pipeline
280+
Then Run the Pipeline in Runtime
281+
Then Wait till pipeline is in running state
282+
Then Open and capture logs
283+
Then Verify the pipeline status is "Succeeded"
284+
Then Validate the values of records transferred to target table is equal to the values from source table
285+
286+
@MYSQL_SOURCE_TEST @MYSQL_TARGET_TEST @CONNECTION
287+
Scenario: To verify data is getting transferred from Mysql to Mysql successfully with use connection
288+
Given Open Datafusion Project to configure pipeline
289+
When Expand Plugin group in the LHS plugins list: "Source"
290+
When Select plugin: "MySQL" from the plugins list as: "Source"
291+
When Expand Plugin group in the LHS plugins list: "Sink"
292+
When Select plugin: "MySQL" from the plugins list as: "Sink"
293+
Then Connect plugins: "MySQL" and "MySQL2" to establish connection
294+
Then Navigate to the properties page of plugin: "MySQL"
295+
And Click plugin property: "switch-useConnection"
296+
And Click on the Browse Connections button
297+
And Click on the Add Connection button
298+
And Select Mysql Connection
299+
And Enter input plugin property: "name" with value: "connection.name"
300+
Then Enter input plugin property: "referenceName" with value: "sourceRef"
301+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
302+
Then Replace input plugin property: "host" with value: "host" for Credentials and Authorization related fields
303+
Then Replace input plugin property: "port" with value: "port" for Credentials and Authorization related fields
304+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
305+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
306+
Then Click on the Test Connection button
307+
And Verify the test connection is successful
308+
Then Click on the Create button
309+
And Use new connection
310+
Then Enter input plugin property: "referenceName" with value: "sourceRef"
311+
Then Replace input plugin property: "database" with value: "databaseName"
312+
Then Enter textarea plugin property: "importQuery" with value: "selectQuery"
313+
Then Click on the Get Schema button
314+
Then Verify the Output Schema matches the Expected Schema: "outputSchema"
315+
Then Validate "MySQL" plugin properties
316+
Then Close the Plugin Properties page
317+
Then Navigate to the properties page of plugin: "MySQL2"
318+
And Click plugin property: "switch-useConnection"
319+
And Click on the Browse Connections button
320+
And Use new connection
321+
Then Enter input plugin property: "referenceName" with value: "targetRef"
322+
Then Replace input plugin property: "database" with value: "databaseName"
323+
Then Replace input plugin property: "tableName" with value: "targetTable"
324+
Then Validate "MySQL2" plugin properties
325+
Then Close the Plugin Properties page
326+
Then Save the pipeline
327+
Then Preview and run the pipeline
328+
Then Verify the preview of pipeline is "success"
329+
Then Click on preview data for MySQL sink
330+
Then Verify preview output schema matches the outputSchema captured in properties
331+
Then Close the preview data
332+
Then Deploy the pipeline
333+
Then Run the Pipeline in Runtime
334+
Then Wait till pipeline is in running state
335+
Then Open and capture logs
336+
Then Verify the pipeline status is "Succeeded"
337+
Then Validate the values of records transferred to target table is equal to the values from source table

0 commit comments

Comments
 (0)