Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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: User is able to provides input to SLT parameters

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.

->Verify user is able to provides input to SLT parameters

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.

Similar comment for all scenario descriptions

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.

Working in progress.

Given Open CDF replication and initiate pipeline creation
When Source is SAP SLT
Then User is able to set SLT parameter "<option>" 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: User is able to set Replicate Existing Data as false
Given Open CDF replication and initiate pipeline creation
When Source is SAP SLT
Then Replicate Existing Data is set to false

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.

-> Then verify Replicate Existing Data is set to false

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.

Working in progress.


@SLT @Design-Time @Sanity
Scenario: User is able to set suspend Slt Job as true
Given Open CDF replication and initiate pipeline creation
When Source is SAP SLT
Then Suspend Slt Job is set to true

@SLT @Design-Time @Sanity
Scenario Outline: User is able to configured job for "<table>"
Given User crates new MTID on "Automation" SAP
When User updates mtid config in CDF_R_SLT_SETTINGS program
Then Update mass transfer id table: "<table>" job mode to "replication"
Given Open CDF replication and initiate pipeline creation
When Source is SAP SLT fill connection parameters
Then Click on next
Then Select Table "<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 Click on Deploy Replication Pipeline
Then Update mass transfer id table: "<table>" job mode to "stop_load"

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.

Add validation

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.

Working in progress.

Examples:
| table |
| vbap |
| ekko |
36 changes: 36 additions & 0 deletions e2e-test/features/DesignTimeSLTError.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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: User provides wrong parameters and able to verify error messages
Given Open CDF replication and initiate pipeline creation
When User crates new MTID on "Automation" SAP
When User updates mtid config in CDF_R_SLT_SETTINGS program
When Source is SAP SLT fill connection parameters
Then User is able to set SLT parameter <option> as <input> and getting row <errorMessage> for wrong input
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 |


162 changes: 162 additions & 0 deletions e2e-test/features/RunTimeSLT.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
# 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: User is able to create MTID and update CDF_R_SLT_SETTINGS program
Given User crates new MTID on "Automation" SAP
When User updates mtid config in CDF_R_SLT_SETTINGS program

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.

Add validation step

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.

Working in progress.


@SLT @Run-Time @Sanity
Scenario Outline: User configured SLT job for table containing all data types
Given User crates new MTID on "Automation" SAP
When User updates mtid config in CDF_R_SLT_SETTINGS program
Then Update mass transfer id table: "<table>" job mode to "stop_load"
Given Open CDF replication and initiate pipeline creation
When User fetches 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 Update mass transfer id table: "<table>" job mode to "<mode>"
When Source is SAP SLT fill connection parameters
Then Click on next
Then Select Table "<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 Click on Deploy Replication Pipeline
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 User is able to validate record count in BQ matches with count in SAP

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.

->Validate record count in BQ matches with count in SAP

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.

Working in progress.

Examples:
| table | mode |
| ZDATA_TYPE | replication |

@SLT @Run-Time @Sanity
Scenario Outline: User configured SLT job in LTRC and executes pipeline in Initial Load Mode
Given User crates new MTID on "Automation" SAP
When User updates mtid config in CDF_R_SLT_SETTINGS program
Then Update mass transfer id table: "<table>" job mode to "stop_load"
Given Open CDF replication and initiate pipeline creation
When User fetches 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 Update mass transfer id table: "<table>" job mode to "<mode>"
When Source is SAP SLT fill connection parameters
Then Click on next
Then Select Table "<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 Click on Deploy Replication Pipeline
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 User is able to 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: User configured SLT job in LTRC and executes pipeline in Replication
Given User crates new MTID on "Automation" SAP
When User updates mtid config in CDF_R_SLT_SETTINGS program
Then Update mass transfer id table: "<table>" job mode to "stop_load"
Given Open CDF replication and initiate pipeline creation
When User fetches 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 Update mass transfer id table: "<table>" job mode to "<mode>"
When Source is SAP SLT fill connection parameters
Then Click on next
Then Select Table "<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 Click on Deploy Replication Pipeline
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 User is able to 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 User is able to 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 User fetches the record count of table : "<table>" from SAP
Then Get Count of no of records transferred from SLT to BigQuery in "<table>"
Then User is able to validate record count in BQ matches with count in SAP
Then Update mass transfer id table: "<table>" job mode to "stop_load"
Examples:
| table | mode | count | cud_type| rfc |
| mara | replication | 1 | create | rfc_matnr |

@SLT @Run-Time
Scenario Outline: User is able to verify only replication data transfers when Replicate Existing Data is false
Given User crates new MTID on "Automation" SAP
When User updates mtid config in CDF_R_SLT_SETTINGS program
Then Update mass transfer id table: "<table>" job mode to "stop_load"
Given Open CDF replication and initiate pipeline creation
When User fetches 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 Update mass transfer id table: "<table>" job mode to "<mode>"
When Source is SAP SLT fill connection parameters
Then Replicate Existing Data is set to false
Then Click on next
Then Select Table "<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 Click on Deploy Replication Pipeline
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 User fetches the record count of table : "<table>" from SAP
Then Get Count of no of records transferred from SLT to BigQuery in "<table>"
Then User is able to validate only replication data is loaded ie "<count>"
Then Update mass transfer id table: "<table>" job mode to "stop_load"
Examples:
| table | mode | count | cud_type| rfc |
| mara | replication | 1 | create | rfc_matnr |

@SLT @Run-Time
Scenario: User is able to delete MTID
Then User deletes the mtid

104 changes: 104 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,104 @@
/*
* 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.e2e.utils.SeleniumDriver;
import io.cdap.plugin.slt.locators.SLTLocators;
import org.openqa.selenium.WebDriver;

/**
* SLT Actions.
*/
public class SLTActions {
private static WebDriver cdfDriver;
private static PluginPropertyUtils pluginPropertyUtils = new PluginPropertyUtils();

static {
cdfDriver = SeleniumDriver.getDriver();
}
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 SLT Actions.
*/
package io.cdap.plugin.slt.actions;
Binary file not shown.
Binary file not shown.
Loading