Skip to content

Commit 0e2579a

Browse files
authored
Merge pull request #567 from cloudsufi/e2e-tests_sqlserver
e2e sqlserver additional scenarios
2 parents 661e62f + f4ec3bb commit 0e2579a

File tree

9 files changed

+493
-2
lines changed

9 files changed

+493
-2
lines changed

mssql-plugin/src/e2e-test/features/mssql/mssql sink/DesignTimeValidation.feature

+90
Original file line numberDiff line numberDiff line change
@@ -171,3 +171,93 @@ Feature: Mssql source- Verify Mssql source plugin design time validation scenari
171171
Then Enter input plugin property: "referenceName" with value: "targetRef"
172172
And Click on the Validate button
173173
Then Verify that the Plugin is displaying an error message: "errormessageBlankHost" on the header
174+
175+
@Mssql_Required
176+
Scenario: Verify required fields missing validation messages
177+
Given Open Datafusion Project to configure pipeline
178+
When Expand Plugin group in the LHS plugins list: "Sink"
179+
When Select plugin: "SQL Server" from the plugins list as: "Sink"
180+
Then Navigate to the properties page of plugin: "SQL Server"
181+
Then Click on the Validate button
182+
Then Verify mandatory property error for below listed properties:
183+
| jdbcPluginName |
184+
| referenceName |
185+
| database |
186+
| tableName |
187+
188+
@Mssql_Required
189+
Scenario: Verify the validation error message with missing jdbc plugin name
190+
Given Open Datafusion Project to configure pipeline
191+
When Expand Plugin group in the LHS plugins list: "Sink"
192+
When Select plugin: "SQL Server" from the plugins list as: "Sink"
193+
Then Navigate to the properties page of plugin: "SQL Server"
194+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
195+
Then Replace input plugin property: "host" with value: "host" for Credentials and Authorization related fields
196+
Then Replace input plugin property: "port" with value: "port" for Credentials and Authorization related fields
197+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
198+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
199+
Then Click plugin property: "switch-useConnection"
200+
Then Click on the Validate button
201+
Then Verify that the Plugin is displaying an error message: "blank.jdbcPluginName.message" on the header
202+
203+
@MSSQL_AS_SOURCE @MSSQL_AS_TARGET @Mssql_Required
204+
Scenario: Verify the validation error message with blank password value
205+
Given Open Datafusion Project to configure pipeline
206+
When Expand Plugin group in the LHS plugins list: "Source"
207+
When Select plugin: "SQL Server" from the plugins list as: "Source"
208+
When Expand Plugin group in the LHS plugins list: "Sink"
209+
When Select plugin: "SQL Server" from the plugins list as: "Sink"
210+
Then Connect plugins: "SQL Server" and "SQL Server2" to establish connection
211+
Then Navigate to the properties page of plugin: "SQL Server"
212+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
213+
Then Replace input plugin property: "host" with value: "host" for Credentials and Authorization related fields
214+
Then Replace input plugin property: "port" with value: "port" for Credentials and Authorization related fields
215+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
216+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
217+
Then Enter input plugin property: "referenceName" with value: "sourceRef"
218+
Then Replace input plugin property: "database" with value: "databaseName"
219+
Then Enter textarea plugin property: "importQuery" with value: "selectQuery"
220+
Then Validate "SQL Server" plugin properties
221+
Then Close the Plugin Properties page
222+
Then Navigate to the properties page of plugin: "SQL Server2"
223+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
224+
Then Replace input plugin property: "host" with value: "host" for Credentials and Authorization related fields
225+
Then Replace input plugin property: "port" with value: "port" for Credentials and Authorization related fields
226+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
227+
Then Replace input plugin property: "database" with value: "databaseName"
228+
Then Replace input plugin property: "tableName" with value: "targetTable"
229+
Then Replace input plugin property: "dbSchemaName" with value: "schema"
230+
Then Enter input plugin property: "referenceName" with value: "targetRef"
231+
Then Click on the Validate button
232+
Then Verify that the Plugin is displaying an error message: "blank.connection.message" on the header
233+
234+
@MSSQL_AS_SOURCE @MSSQL_AS_TARGET @Mssql_Required
235+
Scenario: Verify the validation error message with blank host value
236+
Given Open Datafusion Project to configure pipeline
237+
When Expand Plugin group in the LHS plugins list: "Source"
238+
When Select plugin: "SQL Server" from the plugins list as: "Source"
239+
When Expand Plugin group in the LHS plugins list: "Sink"
240+
When Select plugin: "SQL Server" from the plugins list as: "Sink"
241+
Then Connect plugins: "SQL Server" and "SQL Server2" to establish connection
242+
Then Navigate to the properties page of plugin: "SQL Server"
243+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
244+
Then Replace input plugin property: "host" with value: "host" for Credentials and Authorization related fields
245+
Then Replace input plugin property: "port" with value: "port" for Credentials and Authorization related fields
246+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
247+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
248+
Then Enter input plugin property: "referenceName" with value: "sourceRef"
249+
Then Replace input plugin property: "database" with value: "databaseName"
250+
Then Enter textarea plugin property: "importQuery" with value: "selectQuery"
251+
Then Validate "MySQL" plugin properties
252+
Then Close the Plugin Properties page
253+
Then Navigate to the properties page of plugin: "SQL Server2"
254+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
255+
Then Replace input plugin property: "port" with value: "port" for Credentials and Authorization related fields
256+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
257+
Then Replace input plugin property: "database" with value: "databaseName"
258+
Then Replace input plugin property: "tableName" with value: "targetTable"
259+
Then Replace input plugin property: "dbSchemaName" with value: "schema"
260+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
261+
Then Enter input plugin property: "referenceName" with value: "targetRef"
262+
Then Click on the Validate button
263+
Then Verify that the Plugin is displaying an error message: "blank.connection.message" on the header

mssql-plugin/src/e2e-test/features/mssql/mssql sink/RunTime.feature

+52
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,55 @@ Feature: Mssql - Verify Mssql sink data transfer
6060
Then Close the pipeline logs
6161
Then Validate the values of records transferred to target MsSql table is equal to the values from source BigQuery table
6262

63+
@MSSQL_SOURCE @MSSQL_TARGET @CONNECTION @Mssql_Required
64+
Scenario: To verify data is getting transferred from Mssql to Mssql successfully with use connection using MAX type datatypes
65+
Given Open Datafusion Project to configure pipeline
66+
When Expand Plugin group in the LHS plugins list: "Source"
67+
When Select plugin: "SQL Server" from the plugins list as: "Source"
68+
When Expand Plugin group in the LHS plugins list: "Sink"
69+
When Select plugin: "SQL Server" from the plugins list as: "Sink"
70+
Then Connect plugins: "SQL Server" and "SQL Server2" to establish connection
71+
Then Navigate to the properties page of plugin: "SQL Server"
72+
And Click plugin property: "switch-useConnection"
73+
And Click on the Browse Connections button
74+
And Click on the Add Connection button
75+
Then Click plugin property: "connector-SQL Server"
76+
And Enter input plugin property: "name" with value: "connection.name"
77+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
78+
Then Replace input plugin property: "host" with value: "host" for Credentials and Authorization related fields
79+
Then Replace input plugin property: "port" with value: "port" for Credentials and Authorization related fields
80+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
81+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
82+
Then Click on the Test Connection button
83+
And Verify the test connection is successful
84+
Then Click on the Create button
85+
Then Select connection: "connection.name"
86+
Then Enter input plugin property: "referenceName" with value: "sourceRef"
87+
Then Replace input plugin property: "database" with value: "databaseName"
88+
Then Enter textarea plugin property: "importQuery" with value: "selectQuery"
89+
Then Click on the Get Schema button
90+
Then Verify the Output Schema matches the Expected Schema: "mssqlOutputDatatypesSchema"
91+
Then Validate "SQL Server" plugin properties
92+
Then Close the Plugin Properties page
93+
Then Navigate to the properties page of plugin: "SQL Server2"
94+
And Click plugin property: "switch-useConnection"
95+
And Click on the Browse Connections button
96+
Then Select connection: "connection.name"
97+
Then Replace input plugin property: "database" with value: "databaseName"
98+
Then Replace input plugin property: "tableName" with value: "targetTable"
99+
Then Replace input plugin property: "dbSchemaName" with value: "schema"
100+
Then Enter input plugin property: "referenceName" with value: "targetRef"
101+
Then Validate "SQL Server2" plugin properties
102+
Then Close the Plugin Properties page
103+
Then Save the pipeline
104+
Then Preview and run the pipeline
105+
Then Verify the preview of pipeline is "success"
106+
Then Click on preview data for Mssql sink
107+
Then Verify preview output schema matches the outputSchema captured in properties
108+
Then Close the preview data
109+
Then Deploy the pipeline
110+
Then Run the Pipeline in Runtime
111+
Then Wait till pipeline is in running state
112+
Then Open and capture logs
113+
Then Verify the pipeline status is "Succeeded"
114+
Then Validate records transferred to target table are equal to number of records from the source table

mssql-plugin/src/e2e-test/features/mssql/mssql sink/RunTimeWithMacros.feature

+84
Original file line numberDiff line numberDiff line change
@@ -203,3 +203,87 @@ Feature: Mssql Sink - Run time scenarios (macro)
203203
Then Open Pipeline logs and verify Log entries having below listed Level and Message:
204204
| Level | Message |
205205
| ERROR | errorMessageInvalidCredentials |
206+
207+
@MSSQL_SOURCE_DATATYPES_UIDTYPE_TEST @MSSQL_TARGET_DATATYPES_UIDTYPE_TEST @Mssql_Required
208+
Scenario: To verify data is getting transferred from MsSQL to MsSQL successfully when macro enabled
209+
Given Open Datafusion Project to configure pipeline
210+
When Expand Plugin group in the LHS plugins list: "Source"
211+
When Select plugin: "SQL Server" from the plugins list as: "Source"
212+
When Expand Plugin group in the LHS plugins list: "Sink"
213+
When Select plugin: "SQL Server" from the plugins list as: "Sink"
214+
Then Connect plugins: "SQL Server" and "SQL Server2" to establish connection
215+
Then Navigate to the properties page of plugin: "SQL Server"
216+
Then Click on the Macro button of Property: "jdbcPluginName" and set the value to: "SQLServerDriverName"
217+
Then Click on the Macro button of Property: "host" and set the value to: "SQLServerHost"
218+
Then Click on the Macro button of Property: "port" and set the value to: "SQLServerPort"
219+
Then Click on the Macro button of Property: "user" and set the value to: "SQLServerUsername"
220+
Then Click on the Macro button of Property: "password" and set the value to: "SQLServerPassword"
221+
Then Click on the Macro button of Property: "connectionArguments" and set the value to: "connArgumentsSource"
222+
Then Click on the Macro button of Property: "database" and set the value to: "SQLServerDatabaseName"
223+
Then Click on the Macro button of Property: "importQuery" and set the value in textarea: "SQLServerImportQuery"
224+
Then Enter input plugin property: "referenceName" with value: "sourceRef"
225+
Then Click on the Macro button of Property: "numSplits" and set the value to: "SQLServerNumSplits"
226+
Then Click on the Macro button of Property: "fetchSize" and set the value to: "SQLServerFetchSize"
227+
Then Click on the Macro button of Property: "splitBy" and set the value to: "SQLServerSplitByColumn"
228+
Then Click on the Macro button of Property: "boundingQuery" and set the value in textarea: "SQLServerBoundingQuery"
229+
Then Validate "SQL Server" plugin properties
230+
Then Close the Plugin Properties page
231+
Then Navigate to the properties page of plugin: "SQL Server2"
232+
Then Click on the Macro button of Property: "jdbcPluginName" and set the value to: "SQLServerDriverName"
233+
Then Click on the Macro button of Property: "host" and set the value to: "SQLServerHost"
234+
Then Click on the Macro button of Property: "port" and set the value to: "SQLServerPort"
235+
Then Click on the Macro button of Property: "user" and set the value to: "SQLServerUsername"
236+
Then Click on the Macro button of Property: "password" and set the value to: "SQLServerPassword"
237+
Then Click on the Macro button of Property: "connectionArguments" and set the value to: "connArgumentsSink"
238+
Then Click on the Macro button of Property: "database" and set the value to: "SQLServerDatabaseName"
239+
Then Enter input plugin property: "referenceName" with value: "targetRef"
240+
And Click on the Macro button of Property: "tableName" and set the value to: "SQLServerTableName"
241+
And Click on the Macro button of Property: "dbSchemaName" and set the value to: "SQLServerSchemaName"
242+
Then Validate "SQL Server" plugin properties
243+
Then Close the Plugin Properties page
244+
Then Save the pipeline
245+
Then Preview and run the pipeline
246+
Then Enter runtime argument value "driverName" for key "SQLServerDriverName"
247+
Then Enter runtime argument value from environment variable "host" for key "SQLServerHost"
248+
Then Enter runtime argument value from environment variable "port" for key "SQLServerPort"
249+
Then Enter runtime argument value from environment variable "username" for key "SQLServerUsername"
250+
Then Enter runtime argument value from environment variable "password" for key "SQLServerPassword"
251+
Then Enter runtime argument value "connectionArguments" for key "connArgumentsSource"
252+
Then Enter runtime argument value "connectionArguments" for key "connArgumentsSink"
253+
Then Enter runtime argument value "fetchSize" for key "SQLServerFetchSize"
254+
Then Enter runtime argument value "splitByField" for key "SQLServerSplitByColumn"
255+
Then Enter runtime argument value "numberOfSplits" for key "SQLServerNumSplits"
256+
Then Enter runtime argument value "selectQuery" for key "SQLServerImportQuery"
257+
Then Enter runtime argument value "databaseName" for key "SQLServerDatabaseName"
258+
Then Enter runtime argument value "boundingQuery" for key "SQLServerBoundingQuery"
259+
Then Enter runtime argument value "targetTable" for key "SQLServerTableName"
260+
Then Enter runtime argument value "schema" for key "SQLServerSchemaName"
261+
Then Run the preview of pipeline with runtime arguments
262+
Then Wait till pipeline preview is in running state
263+
Then Open and capture pipeline preview logs
264+
Then Verify the preview run status of pipeline in the logs is "succeeded"
265+
Then Close the pipeline logs
266+
Then Close the preview
267+
Then Deploy the pipeline
268+
Then Run the Pipeline in Runtime
269+
Then Enter runtime argument value "driverName" for key "SQLServerDriverName"
270+
Then Enter runtime argument value from environment variable "host" for key "SQLServerHost"
271+
Then Enter runtime argument value from environment variable "port" for key "SQLServerPort"
272+
Then Enter runtime argument value from environment variable "username" for key "SQLServerUsername"
273+
Then Enter runtime argument value from environment variable "password" for key "SQLServerPassword"
274+
Then Enter runtime argument value "connectionArguments" for key "connArgumentsSource"
275+
Then Enter runtime argument value "connectionArguments" for key "connArgumentsSink"
276+
Then Enter runtime argument value "fetchSize" for key "SQLServerFetchSize"
277+
Then Enter runtime argument value "splitByField" for key "SQLServerSplitByColumn"
278+
Then Enter runtime argument value "numberOfSplits" for key "SQLServerNumSplits"
279+
Then Enter runtime argument value "selectQuery" for key "SQLServerImportQuery"
280+
Then Enter runtime argument value "databaseName" for key "SQLServerDatabaseName"
281+
Then Enter runtime argument value "boundingQuery" for key "SQLServerBoundingQuery"
282+
Then Enter runtime argument value "targetTable" for key "SQLServerTableName"
283+
Then Enter runtime argument value "schema" for key "SQLServerSchemaName"
284+
Then Run the Pipeline in Runtime with runtime arguments
285+
Then Wait till pipeline is in running state
286+
Then Open and capture logs
287+
Then Verify the pipeline status is "Succeeded"
288+
Then Close the pipeline logs
289+
Then Validate records transferred to target table are equal to number of records from the source table

mssql-plugin/src/e2e-test/features/mssql/mssql source/DesignTimeValidation.feature

+28
Original file line numberDiff line numberDiff line change
@@ -200,3 +200,31 @@ Feature: Mssql source- Verify Mssql source plugin design time validation scenari
200200
Then Click on the Validate button
201201
Then Verify that the Plugin Property: "boundingQuery" is displaying an in-line error message: "errorMessageBoundingQuery"
202202
Then Verify that the Plugin Property: "numSplits" is displaying an in-line error message: "errorMessagenumofSplit"
203+
204+
@Mssql_Required
205+
Scenario: Verify required fields missing validation messages
206+
Given Open Datafusion Project to configure pipeline
207+
When Expand Plugin group in the LHS plugins list: "Source"
208+
When Select plugin: "SQL Server" from the plugins list as: "Source"
209+
Then Navigate to the properties page of plugin: "SQL Server"
210+
Then Click on the Validate button
211+
Then Verify mandatory property error for below listed properties:
212+
| jdbcPluginName |
213+
| referenceName |
214+
| database |
215+
| importQuery |
216+
217+
@Mssql_Required
218+
Scenario: Verify the validation error message with missing jdbc plugin name
219+
Given Open Datafusion Project to configure pipeline
220+
When Expand Plugin group in the LHS plugins list: "Source"
221+
When Select plugin: "SQL Server" from the plugins list as: "Source"
222+
Then Navigate to the properties page of plugin: "SQL Server"
223+
Then Select dropdown plugin property: "select-jdbcPluginName" with option value: "driverName"
224+
Then Replace input plugin property: "host" with value: "host" for Credentials and Authorization related fields
225+
Then Replace input plugin property: "port" with value: "port" for Credentials and Authorization related fields
226+
Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields
227+
Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields
228+
Then Click plugin property: "switch-useConnection"
229+
Then Click on the Validate button
230+
Then Verify that the Plugin is displaying an error message: "blank.jdbcPluginName.message" on the header

0 commit comments

Comments
 (0)