Skip to content

Commit 123805b

Browse files
committed
e2e mysql source additional tests
1 parent 0ef198a commit 123805b

File tree

7 files changed

+309
-11
lines changed

7 files changed

+309
-11
lines changed

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

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