Skip to content

Commit 5a9e64a

Browse files
Vipinofficial11satyamsufi
authored andcommitted
Added test cases for Connection manager and hide sink plugin.
1 parent becd303 commit 5a9e64a

File tree

14 files changed

+194
-17
lines changed

14 files changed

+194
-17
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@
395395
<Embed-Directory>lib</Embed-Directory>
396396
<!--Only @Plugin classes in the export packages will be included as plugin-->
397397
<_exportcontents>
398-
io.cdap.plugin.*;
398+
io.cdap.plugin.servicenow.source.*,io.cdap.plugin.servicenow.connector.*;
399399
</_exportcontents>
400400
</instructions>
401401
</configuration>

src/e2e-test/features/servicenowmultisource/DesignTimeWithMacros.feature

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,15 @@ Feature: ServiceNow Multi Source - Design time scenarios (macro)
3030
And Click on the Macro button of Property: "restApiEndpoint" and set the value to: "restApiEndpoint"
3131
And Click on the Macro button of Property: "user" and set the value to: "username"
3232
And Click on the Macro button of Property: "password" and set the value to: "password"
33+
Then Validate "ServiceNow Multi Source" plugin properties
34+
35+
@TS-SN-MULTI-DSGN-MACRO-02
36+
Scenario: Verify user should be able to validate the plugin using connection manager with macros
37+
When Open Datafusion Project to configure pipeline
38+
And Select plugin: "ServiceNow Multi Source" from the plugins list as: "Source"
39+
And Navigate to the properties page of plugin: "ServiceNow Multi Source"
40+
And Fill Reference Name
41+
And Click plugin property: "switch-useConnection"
42+
And Click on the Macro button of Property: "Connection" and set the value to: "Connection"
43+
And Click on the Macro button of Property: "tableNames" and set the value to: "tableNames"
3344
Then Validate "ServiceNow Multi Source" plugin properties

src/e2e-test/features/servicenowmultisource/RunTimeWithMacros.feature

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,4 +136,45 @@ Feature: ServiceNow Multi Source - Run time scenarios (macro)
136136
And Verify the pipeline status is "Failed"
137137
Then Open Pipeline logs and verify Log entries having below listed Level and Message:
138138
| Level | Message |
139-
| ERROR | invalid.filters.logsmessage |
139+
| ERROR | invalid.filters.logsmessage |
140+
141+
@TS-SN-MULTI-RNTM-MACRO-05 @BQ_SINK @CONNECTION
142+
Scenario: Verify user should be able to preview the pipeline when the source plugin is configured for connection manager with macros
143+
When Open Datafusion Project to configure pipeline
144+
And Select plugin: "ServiceNow Multi Source" from the plugins list as: "Source"
145+
And Navigate to the properties page of plugin: "ServiceNow Multi Source"
146+
And Fill Reference Name
147+
And Click on the Macro button of Property: "tableNames" and set the value to: "tableNames"
148+
And Click plugin property: "switch-useConnection"
149+
And Click on the Browse Connections button
150+
And Click on the Add Connection button
151+
And Click plugin property: "connector-ServiceNow"
152+
And Enter input plugin property: "name" with value: "connection.name"
153+
And fill Credentials section for pipeline user
154+
Then Click on the Test Connection button
155+
And Verify the test connection is successful
156+
Then Click on the Create button
157+
And Click on the Macro button of Property: "Connection" and set the value to: "Connection"
158+
Then Validate "ServiceNow Multi Source" plugin properties
159+
And Close the Plugin Properties page
160+
And Select Sink plugin: "BigQueryMultiTable" from the plugins list
161+
And Connect source as "ServiceNow" and sink as "BigQueryMultiTable" to establish connection
162+
And Navigate to the properties page of plugin: "BigQuery Multi Table"
163+
And Configure BigQuery Multi Table sink plugin for Dataset
164+
Then Validate "BigQuery Multi Table" plugin properties
165+
And Close the Plugin Properties page
166+
And Preview and run the pipeline
167+
And Enter runtime argument value "receiving_slip_line" for key "tableNames"
168+
And Enter runtime argument value "connectionMacros" for key "Connection"
169+
Then Run the preview of pipeline with runtime arguments
170+
Then Verify the preview of pipeline is "success"
171+
And Close the pipeline logs
172+
And Close the preview
173+
And Save and Deploy Pipeline
174+
And Run the Pipeline in Runtime
175+
And Enter runtime argument value "receiving_slip_line" for key "tableName"
176+
And Enter runtime argument value "connectionMacros" for key "Connection"
177+
And Run the Pipeline in Runtime with runtime arguments
178+
And Wait till pipeline is in running state
179+
And Open and capture logs
180+
Then Verify the pipeline status is "Succeeded"

src/e2e-test/features/servicenowsink/DesignTime.feature

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
@ServiceNow
1616
@SNSink
1717
@Smoke
18-
@Regression
1918
Feature: ServiceNow Sink - Design time scenarios
2019

2120
@TS-SN-DSGN-SINK-01 @BQ_SOURCE_TEST_RECEIVING_SLIP_LINE

src/e2e-test/features/servicenowsink/DesignTimeValidation.feature

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
@ServiceNow
1616
@SNSink
1717
@Smoke
18-
@Regression
1918
Feature: ServiceNow Sink - Design time validation scenarios
2019

2120
@TS-SN-DSGN-SINK-ERROR-01

src/e2e-test/features/servicenowsink/DesignTimeWithMacro.feature

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
@ServiceNow
1616
@SNSink
1717
@Smoke
18-
@@Regression
1918
Feature: ServiceNow Sink - Design time validation scenarios (macro)
2019

2120
@TS-SN-DSGN-SINK-MACRO-01 @BQ_SOURCE_TEST_RECEIVING_SLIP_LINE
@@ -69,4 +68,24 @@ Feature: ServiceNow Sink - Design time validation scenarios (macro)
6968
And fill Credentials section for pipeline user
7069
And Enter input plugin property: "tableName" with value: "receiving_slip_line"
7170
And Click on the Macro button of Property: "operation" and set the value to: "operation"
72-
Then Validate "ServiceNow" plugin properties
71+
Then Validate "ServiceNow" plugin properties
72+
73+
@TS-SN-DSGN-SINK-MACRO-04 @BQ_SOURCE_TEST_RECEIVING_SLIP_LINE
74+
Scenario: Verify user should be able to validate plugin with macros for Connection Manager
75+
When Open Datafusion Project to configure pipeline
76+
And Select plugin: "BigQuery" from the plugins list as: "Source"
77+
And Navigate to the properties page of plugin: "BigQuery"
78+
And Configure BigQuery source plugin for Dataset and Table
79+
And Validate "BigQuery" plugin properties
80+
And Close the Plugin Properties page
81+
And Select Sink plugin: "ServiceNow" from the plugins list
82+
And Connect plugins: "BigQuery" and "ServiceNow" to establish connection
83+
And Navigate to the properties page of plugin: "ServiceNow"
84+
And Fill Reference Name
85+
And Click plugin property: "switch-useConnection"
86+
And Click on the Macro button of Property: "Connection" and set the value to: "Connection"
87+
And Enter input plugin property: "tableName" with value: "receiving_slip_line"
88+
Then Validate "ServiceNow" plugin properties
89+
90+
91+

src/e2e-test/features/servicenowsink/RunTime.feature

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
@ServiceNow
1616
@SNSink
1717
@Smoke
18-
@Regression
1918
Feature: ServiceNow Sink - Run time scenarios
2019

2120
@TS-SN-RNTM-SINK-01 @BQ_SOURCE_TEST_RECEIVING_SLIP_LINE

src/e2e-test/features/servicenowsink/RunTimeWithMacros.feature

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
@ServiceNow
1616
@SNSink
1717
@Smoke
18-
@Regression
1918
Feature: ServiceNow Sink - Run time scenarios (macro)
2019

2120
@TS-SN-RNTM-SINK-MACRO-01 @BQ_SOURCE_TEST_RECEIVING_SLIP_LINE @BQ_SINK_CLEANUP
@@ -198,3 +197,40 @@ Feature: ServiceNow Sink - Run time scenarios (macro)
198197
| Level | Message |
199198
| ERROR | invalid.credentials.logsmessage |
200199

200+
@TS-SN-RNTM-SINK-MACRO-01 @BQ_SOURCE_TEST_RECEIVING_SLIP_LINE @BQ_SINK_CLEANUP @CONNECTION
201+
Scenario: Verify user should be able to preview a pipeline when plugin is configured for Insert operation with macros for connection manager
202+
When Open Datafusion Project to configure pipeline
203+
And Select plugin: "BigQuery" from the plugins list as: "Source"
204+
And Navigate to the properties page of plugin: "BigQuery"
205+
And Fill Reference Name
206+
And Configure BigQuery source plugin for Dataset and Table
207+
And Validate "BigQuery" plugin properties
208+
And Capture the generated Output Schema
209+
And Close the Plugin Properties page
210+
And Select Sink plugin: "ServiceNow" from the plugins list
211+
And Connect plugins: "BigQuery" and "ServiceNow" to establish connection
212+
And Navigate to the properties page of plugin: "ServiceNow"
213+
And Fill Reference Name
214+
And Select radio button plugin property: "operation" with value: "INSERT"
215+
And Click on the Macro button of Property: "tableName" and set the value to: "tableName"
216+
And Click on the Macro button of Property: "Connection" and set the value to: "Connection"
217+
And Validate "ServiceNow" plugin properties
218+
And Close the Plugin Properties page
219+
And Preview and run the pipeline
220+
And Enter runtime argument value "receiving_slip_line" for key "tableName"
221+
And Enter runtime argument value "connectionMacros" for key "Connection"
222+
And Run the preview of pipeline with runtime arguments
223+
Then Verify the preview of pipeline is "success"
224+
And Open and capture pipeline preview logs
225+
And Close the pipeline logs
226+
And Close the preview
227+
And Save and Deploy Pipeline
228+
And Run the Pipeline in Runtime
229+
And Enter runtime argument value "receiving_slip_line" for key "tableName"
230+
And Enter runtime argument value "connectionMacros" for key "Connection"
231+
And Run the Pipeline in Runtime with runtime arguments
232+
And Wait till pipeline is in running state
233+
And Open and capture logs
234+
And Verify the pipeline status is "Succeeded"
235+
And Close the pipeline logs
236+

src/e2e-test/features/servicenowsource/DesignTimeWithMacros.feature

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,16 @@ Feature: ServiceNow Source - Design time scenarios (macro)
4646
And Click on the Macro button of Property: "restApiEndpoint" and set the value to: "restApiEndpoint"
4747
And Click on the Macro button of Property: "user" and set the value to: "username"
4848
And Click on the Macro button of Property: "password" and set the value to: "password"
49+
Then Validate "ServiceNow" plugin properties
50+
51+
@TS-SN-DSGN-MACRO-03
52+
Scenario: Verify user should be able to validate plugin with macros for connection manager
53+
When Open Datafusion Project to configure pipeline
54+
And Select plugin: "ServiceNow" from the plugins list as: "Source"
55+
And Navigate to the properties page of plugin: "ServiceNow"
56+
And Fill Reference Name
57+
And Select mode as: "TABLE"
58+
And Click on the Macro button of Property: "tableName" and set the value to: "tableName"
59+
And Click plugin property: "switch-useConnection"
60+
And Click on the Macro button of Property: "Connection" and set the value to: "Connection"
4961
Then Validate "ServiceNow" plugin properties

src/e2e-test/features/servicenowsource/RunTimeWithMacros.feature

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,4 +184,51 @@ Feature: ServiceNow Source - Run time scenarios (macro)
184184
And Verify the pipeline status is "Failed"
185185
Then Open Pipeline logs and verify Log entries having below listed Level and Message:
186186
| Level | Message |
187-
| ERROR | invalid.filters.logsmessage |
187+
| ERROR | invalid.filters.logsmessage |
188+
189+
@TS-SN-RNTM-MACRO-06 @SN_SOURCE_CONFIG @SN_RECEIVING_SLIP_LINE @BQ_SINK @CONNECTION
190+
Scenario: Verify user should be able to run a pipeline when ServiceNow plugin is configured with macros for connection manager
191+
When Open Datafusion Project to configure pipeline
192+
And Select plugin: "ServiceNow" from the plugins list as: "Source"
193+
And Navigate to the properties page of plugin: "ServiceNow"
194+
And Fill Reference Name
195+
And Select mode as: "TABLE"
196+
And Click on the Macro button of Property: "tableName" and set the value to: "tableName"
197+
And Click plugin property: "switch-useConnection"
198+
And Click on the Browse Connections button
199+
And Click on the Add Connection button
200+
And Click plugin property: "connector-ServiceNow"
201+
And Enter input plugin property: "name" with value: "connection.name"
202+
And fill Credentials section for pipeline user
203+
Then Click on the Test Connection button
204+
And Verify the test connection is successful
205+
Then Click on the Create button
206+
And Click on the Macro button of Property: "Connection" and set the value to: "Connection"
207+
Then Validate "ServiceNow" plugin properties
208+
And Close the Plugin Properties page
209+
And Select Sink plugin: "BigQueryTable" from the plugins list
210+
And Connect source as "ServiceNow" and sink as "BigQuery" to establish connection
211+
And Navigate to the properties page of plugin: "BigQuery"
212+
And Replace input plugin property: "project" with value: "projectId"
213+
And Enter input plugin property: "datasetProject" with value: "datasetprojectId"
214+
And Configure BigQuery sink plugin for Dataset and Table
215+
Then Validate "BigQuery" plugin properties
216+
And Close the Plugin Properties page
217+
And Save and Deploy Pipeline
218+
And Run the Pipeline in Runtime
219+
And Enter runtime argument value "receiving_slip_line" for key "tableName"
220+
And Enter runtime argument value "connectionMacros" for key "Connection"
221+
And Run the Pipeline in Runtime with runtime arguments
222+
And Wait till pipeline is in running state
223+
And Open and capture logs
224+
Then Verify the pipeline status is "Succeeded"
225+
And Close the pipeline logs
226+
And Close the preview
227+
And Save and Deploy Pipeline
228+
And Run the Pipeline in Runtime
229+
And Enter runtime argument value "receiving_slip_line" for key "tableName"
230+
And Enter runtime argument value "connectionMacros" for key "Connection"
231+
And Run the Pipeline in Runtime with runtime arguments
232+
And Wait till pipeline is in running state
233+
And Open and capture logs
234+
Then Verify the pipeline status is "Succeeded"

0 commit comments

Comments
 (0)