Skip to content
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
65 changes: 65 additions & 0 deletions e2e-test/features/DesignTimeSLT.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Copyright © 2022 Cask Data, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
Feature: Design Time SLT Scenario

@SLT @Design-Time @Sanity

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

@SLT tag can be added on Feature instead of duplicating on each scenario.

Scenario Outline: Validate mandatory SLT parameters is present and editable
Given Open CDF replication and initiate pipeline creation
When Select SAP SLT as source
Then Validate SLT parameter "<option>" can be set as "<input>"
Examples:
| option | input |

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Check all Examples table -> Update headers with Title Case

i.e option -> Option , input -> Input

| gcsDataPath | invalid |
| guid | invalidguid |
| massTransferId | ZZZ66 |
| sapJcoLibGcsPath |gs://ga_slt_cdf|
| jco.client.ashost | invalid |
| jco.client.sysnr | abc |
| jco.client.client | abc |
| jco.client.lang | invalid |
| jco.client.user | invalid |
| jco.client.passwd | invalid |

@SLT @Design-Time @Sanity
Scenario: Validate Replicate Existing Data can be set as false
Given Open CDF replication and initiate pipeline creation
When Select SAP SLT as source
Then Validate Replicate Existing Data can be set to false

@SLT @Design-Time @Sanity
Scenario: Validate suspend Slt Job can be set as true
Given Open CDF replication and initiate pipeline creation
When Select SAP SLT as source
Then Validate Suspend Slt Job can be set to true

@SLT @Design-Time @Sanity
Scenario Outline: Validate CDF replication job can be configured job for "<table>"
Given Create new MTID on "Automation" SAP
When Validate that MTID can be Updated using CDF_R_SLT_SETTINGS program
Then Verify that user is able to update table "<table>" to "replication" on LTRC
Given Open CDF replication and initiate pipeline creation
When Select SAP SLT as source and fill connection parameters
Then Click on next
Then Validate Table is available and can be selected "<table>"
Then Click on next
Then Enter the BigQuery Properties for slt datasource
Then Click on next
Then Click on next
Then Click on next
Then Validate Replication Pipeline can be deployed
Then Verify that user is able to update table "<table>" to "stop_load" on LTRC
Examples:
| table |
| vbap |
| ekko |
34 changes: 34 additions & 0 deletions e2e-test/features/DesignTimeSLTError.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright © 2022 Cask Data, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
Feature: Design Time SLT Negative Scenario

@SLT @Design-Time @Sanity @Negative
Scenario Outline: Validate for wrong parameters plugin throws proper error messages
Given Open CDF replication and initiate pipeline creation
When Create new MTID on "Automation" SAP
When Validate that MTID can be Updated using CDF_R_SLT_SETTINGS program
When Select SAP SLT as source and fill connection parameters
Then Verify that after setting SLT parameter <option> as <input> plugin is throws error <errorMessage>
Examples:
| option | input | errorMessage |
| gcsDataPath | invalid | invalidgcsDataPath |
| guid | invalidguid | invalidMTorGUID |
| massTransferId | ZZZ66 | invalidMTorGUID |
| sapJcoLibGcsPath | gs://ga_slt_cdf | invalidsapJcoLibGcsPath |
| jco.client.ashost | invalid | invalidIP |
| jco.client.sysnr | abc | invalidSysNr |
| jco.client.client | abc | invalidClient |
| jco.client.lang | invalid | invalidLang |
| jco.client.user | invalid | invalidCred |
| jco.client.passwd | invalid | invalidCred |
158 changes: 158 additions & 0 deletions e2e-test/features/RunTimeSLT.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
# Copyright © 2022 Cask Data, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
Feature:Run-Time SLT Scenario

@SLT @Run-Time @Sanity
Scenario: Validate that MTID can be created and updated using CDF_R_SLT_SETTINGS program
Given Create new MTID on "Automation" SAP
When Validate that MTID can be Updated using CDF_R_SLT_SETTINGS program

@SLT @Run-Time @Sanity
Scenario Outline: Validate that SLT job can be configured for table containing all data types
Given Create new MTID on "Automation" SAP
When Validate that MTID can be Updated using CDF_R_SLT_SETTINGS program
Then Verify that user is able to update table "<table>" to "stop_load" on LTRC
Given Open CDF replication and initiate pipeline creation
When Fetche the record count of table : "<table>" from SAP
Then Delete GCS folder for mass transfer id table "<table>"
Then Drop target BigQuery table "<table>"

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Perform this as test prerequisite in @Before scenario

Then Verify that user is able to update table "<table>" to "<mode>" on LTRC
When Select SAP SLT as source and fill connection parameters
Then Click on next
Then Validate Table is available and can be selected "<table>"
Then Click on next
Then Enter the BigQuery Properties for slt datasource
Then Click on next
Then Click on next
Then Click on next

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

We have three steps clicking on the Next button. I believe, they are clicking the Next button element on three different pages. It will make test more readable if the step can be enhanced to take the page name and print it in the logs.

Then Click on next button on "String"

Then Validate Replication Pipeline can be deployed
Then Run the slt Pipeline in Runtime
Then Open Logs of SLT Pipeline
Then Wait till SLT pipeline is in running state and no error occurs
Then Close logs and stop the pipeline
Then Get Count of no of records transferred from SLT to BigQuery in "<table>"
Then Validate record count in BQ matches with count in SAP
Examples:
| table | mode |
| ZDATA_TYPE | replication |

@SLT @Run-Time @Sanity
Scenario Outline: Validate that SLT job can be configured for in LTRC and executed for Initial Load Mode
Given Create new MTID on "Automation" SAP
When Validate that MTID can be Updated using CDF_R_SLT_SETTINGS program
Then Verify that user is able to update table "<table>" to "stop_load" on LTRC
Given Open CDF replication and initiate pipeline creation
When Fetche the record count of table : "<table>" from SAP
Then Delete GCS folder for mass transfer id table "<table>"
Then Drop target BigQuery table "<table>"
Then Verify that user is able to update table "<table>" to "<mode>" on LTRC
When Select SAP SLT as source and fill connection parameters
Then Click on next
Then Validate Table is available and can be selected "<table>"
Then Click on next
Then Enter the BigQuery Properties for slt datasource
Then Click on next
Then Click on next
Then Click on next
Then Validate Replication Pipeline can be deployed
Then Run the slt Pipeline in Runtime
Then Open Logs of SLT Pipeline
Then Wait till SLT pipeline is in running state and no error occurs
Then Close logs and stop the pipeline
Then Get Count of no of records transferred from SLT to BigQuery in "<table>"
Then Validate record count in BQ matches with count in SAP
Examples:
| table | mode |
| adr6 | initial_load |
| t001 | initial_load |
| t006a | initial_load |
| t023t | initial_load |
| t023 | initial_load |


@SLT @Run-Time
Scenario Outline: Validate that SLT job can be configured for job in LTRC and executed in Replication mode
Given Create new MTID on "Automation" SAP
When Validate that MTID can be Updated using CDF_R_SLT_SETTINGS program
Then Verify that user is able to update table "<table>" to "stop_load" on LTRC
Given Open CDF replication and initiate pipeline creation
When Fetche the record count of table : "<table>" from SAP
Then Delete GCS folder for mass transfer id table "<table>"
Then Drop target BigQuery table "<table>"
Then Verify that user is able to update table "<table>" to "<mode>" on LTRC
When Select SAP SLT as source and fill connection parameters
Then Click on next
Then Validate Table is available and can be selected "<table>"
Then Click on next
Then Enter the BigQuery Properties for slt datasource
Then Click on next
Then Click on next
Then Click on next
Then Validate Replication Pipeline can be deployed
Then Run the slt Pipeline in Runtime
Then Open Logs of SLT Pipeline
Then Wait till SLT pipeline is in running state and no error occurs
Then Get Count of no of records transferred from SLT to BigQuery in "<table>"
Then Validate record count in BQ matches with count in SAP
Then "<cud_type>" the "<count>" records with "<rfc>" in the sap table
Then Wait till SLT pipeline is in running state and no error occurs
Then Close logs and stop the pipeline
Then Get Count of no of records transferred from SLT to BigQuery in "<table>"
Then Validate record count in BQ matches with count in SAP
Then "<cud_type>" the "<count>" records with "<rfc>" in the sap table
Then Run the slt Pipeline in Runtime
Then Open Logs of SLT Pipeline
Then Wait till SLT pipeline is in running state and no error occurs
Then Close logs and stop the pipeline
When Fetche the record count of table : "<table>" from SAP
Then Get Count of no of records transferred from SLT to BigQuery in "<table>"
Then Validate record count in BQ matches with count in SAP
Then Verify that user is able to update table "<table>" to "stop_load" on LTRC
Examples:
| table | mode | count | cud_type | rfc |
| mara | replication | 1 | create | rfc_matnr |

@SLT @Run-Time
Scenario Outline: Verify only replication data transfers when Replicate Existing Data is false
Given Create new MTID on "Automation" SAP
When Validate that MTID can be Updated using CDF_R_SLT_SETTINGS program
Then Verify that user is able to update table "<table>" to "stop_load" on LTRC
Given Open CDF replication and initiate pipeline creation
When Fetche the record count of table : "<table>" from SAP
Then Delete GCS folder for mass transfer id table "<table>"
Then Drop target BigQuery table "<table>"
Then Verify that user is able to update table "<table>" to "<mode>" on LTRC
When Select SAP SLT as source and fill connection parameters
Then Validate Replicate Existing Data can be set to false
Then Click on next
Then Validate Table is available and can be selected "<table>"
Then Click on next
Then Enter the BigQuery Properties for slt datasource
Then Click on next
Then Click on next
Then Click on next
Then Validate Replication Pipeline can be deployed
Then "<cud_type>" the "<count>" records with "<rfc>" in the sap table
Then Run the slt Pipeline in Runtime
Then Open Logs of SLT Pipeline
Then Wait till SLT pipeline is in running state and no error occurs
Then Close logs and stop the pipeline
When Fetche the record count of table : "<table>" from SAP
Then Verify that user is able to update table "<table>" to "stop_load" on LTRC
Then Delete the mtid
Then Get Count of no of records transferred from SLT to BigQuery in "<table>"
Then Validate only replication data is loaded ie "<count>"
Examples:
| table | mode | count | cud_type | rfc |
| mara | replication | 1 | create | rfc_matnr |
101 changes: 101 additions & 0 deletions e2e-test/java/io/cdap/plugin/slt/actions/SLTActions.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
/*
* Copyright © 2022 Cask Data, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package io.cdap.plugin.slt.actions;

import io.cdap.e2e.utils.ElementHelper;
import io.cdap.e2e.utils.PluginPropertyUtils;
import io.cdap.plugin.slt.locators.SLTLocators;

/**
* SLT Actions.
*/
public class SLTActions {

private static PluginPropertyUtils pluginPropertyUtils = new PluginPropertyUtils();

public static void enterName(String name) {
ElementHelper.sendKeys(SLTLocators.name, name);
}

public void enterMandatoryParameters(String gcpProjectId,
String gcsDataPath,
String massTransferId,
String sapJcoLibGcsPath,
String jcoclienthost,
String jcoclient,
String jcoclientsysnr,
String jcoclientuser,
String jcoclientpasswd) {
ElementHelper.replaceElementValue(SLTLocators.gcpProjectId,
pluginPropertyUtils.pluginProp(gcpProjectId));
ElementHelper.sendKeys(SLTLocators.gcsDataPath, pluginPropertyUtils.pluginProp(gcsDataPath));
ElementHelper.sendKeys(SLTLocators.massTransferId, massTransferId);
ElementHelper.sendKeys(SLTLocators.sapJcoLibGcsPath, pluginPropertyUtils.pluginProp(sapJcoLibGcsPath));
ElementHelper.sendKeys(SLTLocators.jcoClientHost, pluginPropertyUtils.pluginProp(jcoclienthost));
ElementHelper.sendKeys(SLTLocators.jcoClient, pluginPropertyUtils.pluginProp(jcoclient));
ElementHelper.sendKeys(SLTLocators.jcoClientSysnr, pluginPropertyUtils.pluginProp(jcoclientsysnr));
ElementHelper.sendKeys(SLTLocators.jcoClientUser, pluginPropertyUtils.pluginProp(jcoclientuser));
ElementHelper.sendKeys(SLTLocators.jcoClientPasswd, pluginPropertyUtils.pluginProp(jcoclientpasswd));
}

public void clickSltPlugin() {
ElementHelper.clickOnElement(SLTLocators.sltplugin);
}

public String getRowErrorBorderColor() {
return ElementHelper.getElementCssProperty(SLTLocators.rowError, "border-color");
}

public void clickNextButton() {
ElementHelper.clickOnElement(SLTLocators.next);
}

public void selectTable(String tableName) {
ElementHelper.clickOnElement(SLTLocators.table(tableName));
}

public void enterDatasetName(String stagingBucket) {
ElementHelper.sendKeys(SLTLocators.datasetName, stagingBucket);
}

public void deployPipelineClick() {
ElementHelper.clickOnElement(SLTLocators.deployPipeline);
}

public void startPipeline() {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

clickStartPipelineButton

Check all method names. Should start with action(i.e click , enter , select, get etc)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Updated as per method action.

ElementHelper.clickIfDisplayed(SLTLocators.start, 60l);
}

public void stopPipeline() {
ElementHelper.clickOnElement(SLTLocators.stop);
}

public void clickReplicateExistingData() {
ElementHelper.clickOnElement(SLTLocators.replicateExistingData);
}

public String getReplicateExistingDataText() {
return ElementHelper.getElementText(SLTLocators.replicateExistingData);
}

public void clickSuspendSltJob() {
ElementHelper.clickOnElement(SLTLocators.suspendSltJob);
}

public String getSuspendSltJobText() {
return ElementHelper.getElementText(SLTLocators.suspendSltJob);
}
}
20 changes: 20 additions & 0 deletions e2e-test/java/io/cdap/plugin/slt/actions/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* Copyright © 2022 Cask Data, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/

/**
* contains Actions methods.
*/
package io.cdap.plugin.slt.actions;
Binary file not shown.
Binary file not shown.
Loading