Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection manager E2E - SFMC #44

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@
<dependency>
<groupId>io.cdap.tests.e2e</groupId>
<artifactId>cdap-e2e-framework</artifactId>
<version>0.2.0-SNAPSHOT</version>
<version>0.3.0-SNAPSHOT</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
17 changes: 17 additions & 0 deletions src/e2e-test/features/sfmcsink/DesignTime.feature
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,20 @@ Feature: Salesforce Marketing Cloud Sink - Design time scenarios
| INSERT | TRUE | FALSE | TRUE |
| UPDATE | FALSE | TRUE | TRUE |
| UPSERT | FALSE | FALSE | TRUE |

@BATCH-TS-SFMC-DSGN-02 @CONNECTION
Scenario: Verify user should be able to successfully validate the sink for All Operation Types
When Open Datafusion Project to configure pipeline
And Select Sink plugin: "SalesforceDataExtension" from the plugins list
And Navigate to the properties page of plugin: "Salesforce Marketing"
And Click plugin property: "switch-useConnection"
And Click on the Browse Connections button
And Click on the Add Connection button
And Click plugin property: "connector-MarketingCloud"
And Enter input plugin property: "name" with value: "connection.name"
And Enter input plugin property: "clientId" with value: "admin.clientid" for Credentials and Authorization related fields
And Enter input plugin property: "clientSecret" with value: "admin.clientsecret" for Credentials and Authorization related fields
And Enter input plugin property: "authEndpoint" with value: "admin.base.uri" for Credentials and Authorization related fields
And Enter input plugin property: "soapEndpoint" with value: "admin.soap.endpoint" for Credentials and Authorization related fields
Then Click on the Test Connection button
And Verify the test connection is successful
17 changes: 17 additions & 0 deletions src/e2e-test/features/sfmcsink/DesignTimeValidation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,20 @@ Feature: Salesforce Marketing Cloud Sink - Design time validation scenarios
And Click on the Validate button
Then Verify mandatory property error for below listed properties:
| dataExtension |

@BATCH-TS-SFMC-DSGN-ERROR-04 @CONNECTION
Scenario: Verify user should be able to get invalid credentials validation message when using invalid credentials in the connection manager functionality

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Scenario: Verify user should be able to get invalid credentials validation message when using invalid credentials in the connection manager functionality
Scenario: Verify user should get invalid credentials error message for TestConnection when using invalid credentials in the connection manager functionality

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chnages done

When Open Datafusion Project to configure pipeline
And Select Sink plugin: "SalesforceDataExtension" from the plugins list
And Navigate to the properties page of plugin: "Salesforce Marketing"
And Click plugin property: "switch-useConnection"
And Click on the Browse Connections button
And Click on the Add Connection button
And Click plugin property: "connector-MarketingCloud"
And Enter input plugin property: "name" with value: "connection.name"
And Enter input plugin property: "clientId" with value: "invalid.clientid"
And Enter input plugin property: "clientSecret" with value: "invalid.clientsecret"
And Enter input plugin property: "authEndpoint" with value: "invalid.authenticationbase.uri"
And Enter input plugin property: "soapEndpoint" with value: "invalid.soapapi.endpoint"
Then Click on the Test Connection button
Then Verify the invalid connection error message: "invalid.testconnection.logmessage" on the footer
11 changes: 11 additions & 0 deletions src/e2e-test/features/sfmcsink/DesignTimeWithMacros.feature
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,14 @@ Feature: Salesforce Marketing Cloud Sink - Design time scenarios (macros)
And Click on the Macro button of Property: "maxBatchSize" and set the value to: "maxBatchSize"
And Click on the Macro button of Property: "columnMapping" and set the value to: "columnMapping"
Then Validate "Salesforce Marketing" plugin properties

@BATCH-TS-SFMC-DSGN-MACRO-04 @CONNECTION
Scenario: Verify user should be able to validate the plugin when configured for Connection Manager property with macros
When Open Datafusion Project to configure pipeline
And Select plugin: "Salesforce Marketing" from the plugins list as: "Source"
And Navigate to the properties page of plugin: "Salesforce Marketing"
And Enter input plugin property: "referenceName" with value: "Referencename"
And Click plugin property: "switch-useConnection"
And Click on the Macro button of Property: "connection" and set the value to: "Connection"
And Click on the Macro button of Property: "dataExtension" and set the value to: "DataExtension"
Then Validate "Salesforce Marketing" plugin properties
48 changes: 48 additions & 0 deletions src/e2e-test/features/sfmcsink/RunTime.feature
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,51 @@ Feature: Salesforce Marketing Cloud Sink - Run time scenarios
And Wait till pipeline is in running state
Then Verify the pipeline status is "Succeeded"
Then Validate record created in Sink application for Object is equal to expected record

@SINK-TS-SFMC-RNTM-03 @BQ_SOURCE_UPDATE @BQ_SOURCE_CLEANUP @CONNECTION
Scenario:Verify user should be able to preview and deploy the pipeline when plugin is configured for Update Operation with Connection Manager
When Open Datafusion Project to configure pipeline
And Select plugin: "BigQuery" from the plugins list as: "Source"
And Navigate to the properties page of plugin: "BigQuery"
And Enter input plugin property: "referenceName" with value: "Reference"
And Replace input plugin property: "project" with value: "project.id" for Credentials and Authorization related fields
And Enter input plugin property: "datasetProject" with value: "datasetprojectId" for Credentials and Authorization related fields
And Enter input plugin property: "dataset" with value: "dataset" for Credentials and Authorization related fields
And Enter input plugin property: "table" with value: "bqsource.table"
Then Validate "BigQuery" plugin properties
And Close the Plugin Properties page
And Select Sink plugin: "SalesforceDataExtension" from the plugins list
And Connect source as "BigQuery" and sink as "SalesforceDataExtension" to establish connection
And Navigate to the properties page of plugin: "Salesforce Marketing"
And Enter input plugin property: "referenceName" with value: "Referencename"
And Enter input plugin property: "dataExtension" with value: "Stores"
And Select radio button plugin property: "operation" with value: "UPDATE"
And Click plugin property: "switch-useConnection"
And Click on the Browse Connections button
And Click on the Add Connection button
And Click plugin property: "connector-MarketingCloud"
And Enter input plugin property: "name" with value: "connection.name"
And Enter input plugin property: "clientId" with value: "admin.clientid" for Credentials and Authorization related fields
And Enter input plugin property: "clientSecret" with value: "admin.clientsecret" for Credentials and Authorization related fields
And Enter input plugin property: "authEndpoint" with value: "admin.base.uri" for Credentials and Authorization related fields
And Enter input plugin property: "soapEndpoint" with value: "admin.soap.endpoint" for Credentials and Authorization related fields
Then Click on the Test Connection button
And Verify the test connection is successful
Then Click on the Create button
And Use new connection
And Select radio button plugin property: "truncateText" with value: "true"
And Select radio button plugin property: "failOnError" with value: "true"
And Select radio button plugin property: "replaceWithSpaces" with value: "false"
And Replace input plugin property: "maxBatchSize" with value: "1000"
Then Validate "Salesforce Marketing" plugin properties
And Close the Plugin Properties page
And Preview and run the pipeline
And Wait till pipeline preview is in running state
And Open and capture pipeline preview logs
And Verify the preview run status of pipeline in the logs is "succeeded"
And Close the pipeline logs
And Close the preview
And Save and Deploy Pipeline
And Run the Pipeline in Runtime
And Wait till pipeline is in running state
Then Verify the pipeline status is "Succeeded"
56 changes: 56 additions & 0 deletions src/e2e-test/features/sfmcsink/RunTimeWithMacros.feature
Original file line number Diff line number Diff line change
Expand Up @@ -123,3 +123,59 @@ Feature: Salesforce Marketing Cloud Sink - Run time scenarios (macros)
And Verify the pipeline status is "Succeeded"
And Close the pipeline logs
Then Validate record created in Sink application for Object is equal to expected record

@SINK-TS-SFMC-RNTM-MACRO-03 @BQ_SOURCE_TABLE @BQ_SOURCE_CLEANUP @CONNECTION
Scenario:Verify user should be able to preview and deploy the pipeline when plugin is configured for Connection Manager with macros
When Open Datafusion Project to configure pipeline
And Select plugin: "BigQuery" from the plugins list as: "Source"
And Navigate to the properties page of plugin: "BigQuery"
And Enter input plugin property: "referenceName" with value: "Reference"
And Replace input plugin property: "project" with value: "project.id" for Credentials and Authorization related fields
And Enter input plugin property: "datasetProject" with value: "datasetprojectId" for Credentials and Authorization related fields
And Enter input plugin property: "dataset" with value: "dataset" for Credentials and Authorization related fields
And Enter input plugin property: "table" with value: "bqsource.table"
Then Validate "BigQuery" plugin properties
And Close the Plugin Properties page
And Select Sink plugin: "SalesforceDataExtension" from the plugins list
And Connect source as "BigQuery" and sink as "SalesforceDataExtension" to establish connection
And Navigate to the properties page of plugin: "Salesforce Marketing"
And Enter input plugin property: "referenceName" with value: "Referencename"
And Enter input plugin property: "dataExtension" with value: "Stores"
And Select radio button plugin property: "operation" with value: "INSERT"
And Click plugin property: "switch-useConnection"
And Click on the Browse Connections button
And Click on the Add Connection button
And Click plugin property: "connector-MarketingCloud"
And Enter input plugin property: "name" with value: "connection.name"
And Enter input plugin property: "clientId" with value: "admin.clientid" for Credentials and Authorization related fields
And Enter input plugin property: "clientSecret" with value: "admin.clientsecret" for Credentials and Authorization related fields
And Enter input plugin property: "authEndpoint" with value: "admin.base.uri" for Credentials and Authorization related fields
And Enter input plugin property: "soapEndpoint" with value: "admin.soap.endpoint" for Credentials and Authorization related fields
Then Click on the Test Connection button
And Verify the test connection is successful
Then Click on the Create button
And Use new connection
And Click on the Macro button of Property: "connection" and set the value to: "Connection"
And Select radio button plugin property: "truncateText" with value: "true"
And Select radio button plugin property: "failOnError" with value: "true"
And Select radio button plugin property: "replaceWithSpaces" with value: "false"
And Replace input plugin property: "maxBatchSize" with value: "1000"
Then Validate "Salesforce Marketing" plugin properties
And Close the Plugin Properties page
And Save the pipeline
And Preview and run the pipeline
And Enter runtime argument value "connectionMacros" for key "Connection"
And Run the preview of pipeline with runtime arguments
And Wait till pipeline preview is in running state
And Open and capture pipeline preview logs
And Verify the preview run status of pipeline in the logs is "succeeded"
And Close the pipeline logs
And Close the preview
And Save and Deploy Pipeline
And Run the Pipeline in Runtime
And Enter runtime argument value "connectionMacros" for key "Connection"
And Run the Pipeline in Runtime with runtime arguments
And Wait till pipeline is in running state
And Open and capture logs
And Verify the pipeline status is "Succeeded"
And Close the pipeline logs
17 changes: 17 additions & 0 deletions src/e2e-test/features/sfmcsource/DesignTime.feature
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,20 @@ Feature: Salesforce Marketing Cloud Source - Design time scenarios
Examples:
| ObjectName | ExpectedSchema | Filter |
| BOUNCE_EVENT | sfmcSourceSchema.bounceevent | filter.value |

@BATCH-TS-SFMC-DSGN-06 @CONNECTION
Scenario: Verify user should be able to create the valid connection using connection manager functionality
When Open Datafusion Project to configure pipeline
And Select plugin: "Salesforce Marketing" from the plugins list as: "Source"
And Navigate to the properties page of plugin: "Salesforce Marketing"
And Click plugin property: "switch-useConnection"
And Click on the Browse Connections button
And Click on the Add Connection button
And Click plugin property: "connector-MarketingCloud"
And Enter input plugin property: "name" with value: "connection.name"
And Enter input plugin property: "clientId" with value: "admin.clientid" for Credentials and Authorization related fields
And Enter input plugin property: "clientSecret" with value: "admin.clientsecret" for Credentials and Authorization related fields
And Enter input plugin property: "authEndpoint" with value: "admin.base.uri" for Credentials and Authorization related fields
And Enter input plugin property: "soapEndpoint" with value: "admin.soap.endpoint" for Credentials and Authorization related fields
Then Click on the Test Connection button
And Verify the test connection is successful
17 changes: 17 additions & 0 deletions src/e2e-test/features/sfmcsource/DesignTimeValidation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,20 @@ Feature: Salesforce Marketing Cloud Source - Design time Validation scenarios
| DATA_EXTENSION | BOUNCE_EVENT |
And Click on the Validate button
Then Verify that the Plugin Property: "dataExtensionKeyList" is displaying an in-line error message: "required.property.dataextensionkeymultiobject"

@BATCH-TS-SFMC-DSGN-ERROR-05 @CONNECTION
Scenario: Verify user should be able to get invalid credentials validation message when using invalid credentials in the connection manager functionality

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Scenario: Verify user should be able to get invalid credentials validation message when using invalid credentials in the connection manager functionality
Scenario: Verify user should get invalid credentials error message when using invalid credentials in the connection manager functionality

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed

When Open Datafusion Project to configure pipeline
And Select plugin: "Salesforce Marketing" from the plugins list as: "Source"
And Navigate to the properties page of plugin: "Salesforce Marketing"
And Click plugin property: "switch-useConnection"
And Click on the Browse Connections button
And Click on the Add Connection button
And Click plugin property: "connector-MarketingCloud"
And Enter input plugin property: "name" with value: "connection.name"
And Enter input plugin property: "clientId" with value: "invalid.clientid"
And Enter input plugin property: "clientSecret" with value: "invalid.clientsecret"
And Enter input plugin property: "authEndpoint" with value: "invalid.authenticationbase.uri"
And Enter input plugin property: "soapEndpoint" with value: "invalid.soapapi.endpoint"
Then Click on the Test Connection button
Then Verify the invalid connection error message: "invalid.testconnection.logmessage" on the footer
15 changes: 13 additions & 2 deletions src/e2e-test/features/sfmcsource/DesignTimeWithMacros.feature
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Feature: Salesforce Marketing Cloud Source - Design time Scenarios (macros)
And Enter input plugin property: "soapEndpoint" with value: "admin.soap.endpoint" for Credentials and Authorization related fields
And Click on the Macro button of Property: "queryMode" and set the value to: "queryMode"
And Click on the Macro button of Property: "objectName" and set the value to: "objectName"
And Click on the Macro button of Property: "dataExtensionKey" and set the value to: "dataExtensionKey"
And Click on the Macro button of Property: "dataExtensionKey" and set the value to: "DataExtensionKey"
Then Validate "Salesforce Marketing" plugin properties

@BATCH-TS-SFMC-DSGN-MACRO-03
Expand All @@ -60,7 +60,7 @@ Feature: Salesforce Marketing Cloud Source - Design time Scenarios (macros)
And Enter input plugin property: "soapEndpoint" with value: "admin.soap.endpoint" for Credentials and Authorization related fields
And Click on the Macro button of Property: "queryMode" and set the value to: "queryMode"
And Click on the Macro button of Property: "objectList" and set the value to: "objectList"
And Click on the Macro button of Property: "dataExtensionKeyList" and set the value to: "dataExtensionKeyList"
And Click on the Macro button of Property: "dataExtensionKey" and set the value to: "DataExtensionKey"
And Click on the Macro button of Property: "tableNameField" and set the value to: "tablename"
Then Validate "Salesforce Marketing" plugin properties

Expand All @@ -77,3 +77,14 @@ Feature: Salesforce Marketing Cloud Source - Design time Scenarios (macros)
And Click on the Macro button of Property: "objectName" and set the value to: "objectName"
And Click on the Macro button of Property: "filter" and set the value to: "filter"
Then Validate "Salesforce Marketing" plugin properties

@BATCH-TS-SFMC-DSGN-MACRO-05 @CONNECTION
Scenario: Verify user should be able to validate the plugin when configured for Connection Manager property with macros
When Open Datafusion Project to configure pipeline
And Select plugin: "Salesforce Marketing" from the plugins list as: "Source"
And Navigate to the properties page of plugin: "Salesforce Marketing"
And Enter input plugin property: "referenceName" with value: "Referencename"
And Click plugin property: "switch-useConnection"
And Click on the Macro button of Property: "connection" and set the value to: "Connection"
And Click on the Macro button of Property: "dataExtensionKey" and set the value to: "DataExtensionKey"
Then Validate "Salesforce Marketing" plugin properties
Loading