Skip to content

Commit

Permalink
DEBUG E2E
Browse files Browse the repository at this point in the history
  • Loading branch information
psainics authored and AnkitCLI committed Nov 27, 2024
1 parent 601f62b commit d96588c
Show file tree
Hide file tree
Showing 19 changed files with 52 additions and 179 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
@BigQueryMultiTable_Sink
Feature: BigQueryMultiTable sink -Verification of BigQuery to BigQueryMultiTable successful data transfer

@BQ_TWO_SOURCE_BQMT_TEST @BQ_DELETE_TABLES_TEST
@BQ_TWO_SOURCE_BQMT_TEST
Scenario: Verify data successfully transferred from BigQuery To BigQueryMultiTable in two new tables
Given Open Datafusion Project to configure pipeline
When Expand Plugin group in the LHS plugins list: "Source"
Expand Down Expand Up @@ -57,162 +57,34 @@ Feature: BigQueryMultiTable sink -Verification of BigQuery to BigQueryMultiTable
Then Verify the pipeline status is "Succeeded"
Then Validate data transferred from BigQuery To BigQueryMultiTable is equal

@BQ_SINGLE_SOURCE_BQMT_TEST @BQ_SINK_BQMT_TEST
Scenario: Verify data successfully transferred from BigQuery To BigQueryMultiTable in one table
Given Open Datafusion Project to configure pipeline
When Expand Plugin group in the LHS plugins list: "Source"
When Select plugin: "BigQuery" from the plugins list as: "Source"
Then Navigate to the properties page of plugin: "BigQuery"
Then Replace input plugin property: "project" with value: "projectId"
Then Replace input plugin property: "dataset" with value: "dataset"
Then Replace input plugin property: "table" with value: "bqSourceTable"
Then Click on the Get Schema button
Then Validate "BigQuery" plugin properties
Then Close the Plugin Properties page
When Expand Plugin group in the LHS plugins list: "Sink"
When Select plugin: "BigQuery Multi Table" from the plugins list as: "Sink"
Then Connect plugins: "BigQuery" and "BigQuery Multi Table" to establish connection
Then Navigate to the properties page of plugin: "BigQuery Multi Table"
And Enter input plugin property: "referenceName" with value: "Reference"
And Replace input plugin property: "project" with value: "projectId"
And Enter input plugin property: "datasetProject" with value: "datasetprojectId"
And Enter input plugin property: "dataset" with value: "dataset"
Then Override Service account details if set in environment variables
Then Click plugin property: "flexibleSchema"
Then Validate "BigQuery Multi Table" plugin properties
And Close the Plugin Properties page
Then Save the pipeline
Then Deploy the pipeline
Then Run the Pipeline in Runtime
Then Wait till pipeline is in running state
Then Open and capture logs
Then Verify the pipeline status is "Succeeded"
Then Validate data transferred from BigQuery To BigQueryMultiTable in one table is equal

@BQ_TWO_SOURCE_BQMT_TEST @BQ_EXISTING_TARGET_TEST @BQ_DELETE_TABLES_TEST
Scenario: Verify data successfully transferred from BigQuery To BigQueryMultiTable in two existing tables
Given Open Datafusion Project to configure pipeline
When Expand Plugin group in the LHS plugins list: "Source"
When Select plugin: "BigQuery" from the plugins list as: "Source"
Then Navigate to the properties page of plugin: "BigQuery"
Then Replace input plugin property: "project" with value: "projectId"
Then Replace input plugin property: "dataset" with value: "dataset"
Then Replace input plugin property: "table" with value: "bqSourceTable"
Then Click on the Get Schema button
Then Validate "BigQuery" plugin properties
Then Close the Plugin Properties page
When Expand Plugin group in the LHS plugins list: "Source"
When Select plugin: "BigQuery" from the plugins list as: "Source"
Then Navigate to the properties page of plugin: "BigQuery2"
Then Replace input plugin property: "project" with value: "projectId"
Then Replace input plugin property: "dataset" with value: "dataset"
Then Replace input plugin property: "table" with value: "bqSourceTable2"
Then Click on the Get Schema button
Then Validate "BigQuery2" plugin properties
Then Close the Plugin Properties page
When Expand Plugin group in the LHS plugins list: "Sink"
When Select plugin: "BigQuery Multi Table" from the plugins list as: "Sink"
Then Connect plugins: "BigQuery" and "BigQuery Multi Table" to establish connection
Then Connect plugins: "BigQuery2" and "BigQuery Multi Table" to establish connection
Then Navigate to the properties page of plugin: "BigQuery Multi Table"
And Enter input plugin property: "referenceName" with value: "Reference"
And Replace input plugin property: "project" with value: "projectId"
And Enter input plugin property: "datasetProject" with value: "datasetprojectId"
And Enter input plugin property: "dataset" with value: "dataset"
Then Override Service account details if set in environment variables
Then Click plugin property: "flexibleSchema"
Then Validate "BigQuery Multi Table" plugin properties
And Close the Plugin Properties page
Then Save the pipeline
Then Deploy the pipeline
Then Run the Pipeline in Runtime
Then Wait till pipeline is in running state
Then Open and capture logs
Then Verify the pipeline status is "Succeeded"
Then Validate data transferred from BigQuery To BigQueryMultiTable is equal

@BQ_TWO_SOURCE_BQMT_TEST @BQ_EXISTING_TARGET_TEST @BQ_DELETE_TABLES_TEST
Scenario: Verify data successfully transferred from BigQuery To BigQueryMultiTable in two existing tables using truncate
Given Open Datafusion Project to configure pipeline
When Expand Plugin group in the LHS plugins list: "Source"
When Select plugin: "BigQuery" from the plugins list as: "Source"
Then Navigate to the properties page of plugin: "BigQuery"
Then Replace input plugin property: "project" with value: "projectId"
Then Replace input plugin property: "dataset" with value: "dataset"
Then Replace input plugin property: "table" with value: "bqSourceTable"
Then Click on the Get Schema button
Then Validate "BigQuery" plugin properties
Then Close the Plugin Properties page
When Expand Plugin group in the LHS plugins list: "Source"
When Select plugin: "BigQuery" from the plugins list as: "Source"
Then Navigate to the properties page of plugin: "BigQuery2"
Then Replace input plugin property: "project" with value: "projectId"
Then Replace input plugin property: "dataset" with value: "dataset"
Then Replace input plugin property: "table" with value: "bqSourceTable2"
Then Click on the Get Schema button
Then Validate "BigQuery2" plugin properties
Then Close the Plugin Properties page
When Expand Plugin group in the LHS plugins list: "Sink"
When Select plugin: "BigQuery Multi Table" from the plugins list as: "Sink"
Then Connect plugins: "BigQuery" and "BigQuery Multi Table" to establish connection
Then Connect plugins: "BigQuery2" and "BigQuery Multi Table" to establish connection
Then Navigate to the properties page of plugin: "BigQuery Multi Table"
And Enter input plugin property: "referenceName" with value: "Reference"
And Replace input plugin property: "project" with value: "projectId"
And Enter input plugin property: "datasetProject" with value: "datasetprojectId"
And Enter input plugin property: "dataset" with value: "dataset"
Then Override Service account details if set in environment variables
Then Click plugin property: "flexibleSchema"
Then Toggle BigQuery sink property truncateTable to true
Then Validate "BigQuery Multi Table" plugin properties
And Close the Plugin Properties page
Then Save the pipeline
Then Deploy the pipeline
Then Run the Pipeline in Runtime
Then Wait till pipeline is in running state
Then Open and capture logs
Then Verify the pipeline status is "Succeeded"
Then Validate data transferred from BigQuery To BigQueryMultiTable is equal

@BQ_SOURCE_UPDATE_TEST @BQ_EXISTING_TARGET_TEST @BQ_DELETE_TABLES_TEST
Scenario: Verify data successfully transferred from BigQuery To BigQueryMultiTable in two existing tables after updating schema
Given Open Datafusion Project to configure pipeline
When Expand Plugin group in the LHS plugins list: "Source"
When Select plugin: "BigQuery" from the plugins list as: "Source"
Then Navigate to the properties page of plugin: "BigQuery"
Then Replace input plugin property: "project" with value: "projectId"
Then Replace input plugin property: "dataset" with value: "dataset"
Then Replace input plugin property: "table" with value: "bqSourceTable"
Then Click on the Get Schema button
Then Validate "BigQuery" plugin properties
Then Close the Plugin Properties page
When Expand Plugin group in the LHS plugins list: "Source"
When Select plugin: "BigQuery" from the plugins list as: "Source"
Then Navigate to the properties page of plugin: "BigQuery2"
Then Replace input plugin property: "project" with value: "projectId"
Then Replace input plugin property: "dataset" with value: "dataset"
Then Replace input plugin property: "table" with value: "bqSourceTable2"
Then Click on the Get Schema button
Then Validate "BigQuery2" plugin properties
Then Close the Plugin Properties page
When Expand Plugin group in the LHS plugins list: "Sink"
When Select plugin: "BigQuery Multi Table" from the plugins list as: "Sink"
Then Connect plugins: "BigQuery" and "BigQuery Multi Table" to establish connection
Then Connect plugins: "BigQuery2" and "BigQuery Multi Table" to establish connection
Then Navigate to the properties page of plugin: "BigQuery Multi Table"
And Enter input plugin property: "referenceName" with value: "Reference"
And Replace input plugin property: "project" with value: "projectId"
And Enter input plugin property: "datasetProject" with value: "datasetprojectId"
And Enter input plugin property: "dataset" with value: "dataset"
Then Override Service account details if set in environment variables
Then Click plugin property: "flexibleSchema"
Then Select radio button plugin property: "updateSchema" with value: "true"
Then Validate "BigQuery Multi Table" plugin properties
And Close the Plugin Properties page
Then Save the pipeline
Then Deploy the pipeline
Then Run the Pipeline in Runtime
Then Wait till pipeline is in running state
Then Open and capture logs
Then Verify the pipeline status is "Succeeded"
Then Validate data transferred from BigQuery To BigQueryMultiTable is equal
# @BQ_SINGLE_SOURCE_BQMT_TEST @BQ_SINK_BQMT_TEST
# Scenario: Verify data successfully transferred from BigQuery To BigQueryMultiTable in one table
# Given Open Datafusion Project to configure pipeline
# When Expand Plugin group in the LHS plugins list: "Source"
# When Select plugin: "BigQuery" from the plugins list as: "Source"
# Then Navigate to the properties page of plugin: "BigQuery"
# Then Replace input plugin property: "project" with value: "projectId"
# Then Replace input plugin property: "dataset" with value: "dataset"
# Then Replace input plugin property: "table" with value: "bqSourceTable"
# Then Click on the Get Schema button
# Then Validate "BigQuery" plugin properties
# Then Close the Plugin Properties page
# When Expand Plugin group in the LHS plugins list: "Sink"
# When Select plugin: "BigQuery Multi Table" from the plugins list as: "Sink"
# Then Connect plugins: "BigQuery" and "BigQuery Multi Table" to establish connection
# Then Navigate to the properties page of plugin: "BigQuery Multi Table"
# And Enter input plugin property: "referenceName" with value: "Reference"
# And Replace input plugin property: "project" with value: "projectId"
# And Enter input plugin property: "datasetProject" with value: "datasetprojectId"
# And Enter input plugin property: "dataset" with value: "dataset"
# Then Override Service account details if set in environment variables
# Then Click plugin property: "flexibleSchema"
# Then Validate "BigQuery Multi Table" plugin properties
# And Close the Plugin Properties page
# Then Save the pipeline
# Then Deploy the pipeline
# Then Run the Pipeline in Runtime
# Then Wait till pipeline is in running state
# Then Open and capture logs
# Then Verify the pipeline status is "Succeeded"
# Then Validate data transferred from BigQuery To BigQueryMultiTable in one table is equal
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
features = {"src/e2e-test/features"},
glue = {"io.cdap.plugin.bigquery.stepsdesign", "io.cdap.plugin.gcs.stepsdesign",
"stepsdesign", "io.cdap.plugin.common.stepsdesign"},
tags = {"@BigQuery_Sink and not @CDAP-20830"},
tags = {"@BigQuery_Sinks and not @CDAP-20830"},
//TODO: Enable test once issue is fixed https://cdap.atlassian.net/browse/CDAP-20830
monochrome = true,
plugin = {"pretty", "html:target/cucumber-html-report/bigquery-sink",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
features = {"src/e2e-test/features"},
glue = {"io.cdap.plugin.bigquery.stepsdesign", "io.cdap.plugin.gcs.stepsdesign",
"stepsdesign", "io.cdap.plugin.common.stepsdesign", "io.cdap.plugin.pubsub.stepsdesign"},
tags = {"@BigQuery_Source"},
tags = {"@BigQuery_Sources"},
monochrome = true,
plugin = {"pretty", "html:target/cucumber-html-report/bigquery-source",
"json:target/cucumber-reports/cucumber-bigquery-source.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void validateDataTransferredFromBigQueryToBigQueryMultiTableIsEqual()
PluginPropertyUtils.pluginProp("bqSourceTable2"));

List<String> targetTables = Arrays.asList(PluginPropertyUtils.pluginProp("bqTargetTable"),
PluginPropertyUtils.pluginProp("bqTargetTable2"));
PluginPropertyUtils.pluginProp("bqTargetTable2"));
boolean recordsMatched = BigQueryMultiTableValidation.validateBQToBigQueryMultiTable(sourceTables, targetTables);
Assert.assertTrue("Value of records transferred to the BQ sink should be equal to the value " +
"of the records in the source table", recordsMatched);
Expand All @@ -47,7 +47,8 @@ public void validateDataTransferredFromBigQueryToBigQueryMultiTableInOneTableIsE
throws IOException, InterruptedException {
boolean recordsMatched = BigQueryMultiTableValidation.
validateBQToBigQueryMultiTable(Collections.singletonList(PluginPropertyUtils.pluginProp("bqSourceTable")),
Collections.singletonList(PluginPropertyUtils.pluginProp("bqTargetTable")));
Collections.singletonList(PluginPropertyUtils.pluginProp
("bqmtTargetTableTabB")));
Assert.assertTrue("Value of records transferred to the BQ sink should be equal to the value " +
"of the records in the source table", recordsMatched);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
features = {"src/e2e-test/features"},
glue = {"io.cdap.plugin.bigqueryexecute.stepsdesign", "io.cdap.plugin.common.stepsdesign", "stepsdesign",
"io.cdap.plugin.bigquery.stepsdesign"},
tags = {"@BQExecute"},
tags = {"@BQExecutes"},
monochrome = true,
plugin = {"pretty", "html:target/cucumber-html-report/bqExecute",
"json:target/cucumber-reports/cucumber-bqExecute.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
@CucumberOptions(
features = {"src/e2e-test/features"},
glue = {"io.cdap.plugin.bigtable.stepsdesign", "io.cdap.plugin.common.stepsdesign", "stepsdesign"},
tags = {"@BigTable"},
tags = {"@BigTables"},
monochrome = true,
plugin = {"pretty", "html:target/cucumber-html-report/bigtable",
"json:target/cucumber-reports/cucumber-bigtable.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
glue = {"io.cdap.plugin.gcs.stepsdesign", "io.cdap.plugin.bigquery.stepsdesign",
"stepsdesign", "io.cdap.plugin.common.stepsdesign", "io.cdap.plugin.pubsub.stepsdesign",
"io.cdap.plugin.gcsmove.stepsdesign"},
tags = {"@CMEK"},
tags = {"@CMEKS"},
plugin = {"pretty", "html:target/cucumber-html-report/cmek", "json:target/cucumber-reports/cucumber-cmek.json",
"junit:target/cucumber-reports/cucumber-cmek.xml", "io.cdap.e2e.utils.PropModifier:cmek-config.properties"},
monochrome = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1623,7 +1623,7 @@ public static void deleteAllBqTables() throws IOException, InterruptedException
@After(order = 1, value = "@BQ_SINK_BQMT_TEST")
public static void deleteTargetBqmtTable() throws IOException, InterruptedException {
try {
bqTargetTable = PluginPropertyUtils.pluginProp("bqTargetTable");
bqTargetTable = PluginPropertyUtils.pluginProp("bqmtTargetTableTabB");
BigQueryClient.dropBqQuery(bqTargetTable);
BigQueryClient.dropBqQuery(bqSourceTable);
BeforeActions.scenario.write("BQ Target table - " + bqTargetTable + " deleted successfully");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
features = {"src/e2e-test/features"},
glue = {"io.cdap.plugin.datastore.stepsdesign", "io.cdap.plugin.common.stepsdesign",
"stepsdesign"},
tags = {"@DataStore"},
tags = {"@DataStores"},
monochrome = true,
plugin = {"pretty", "html:target/cucumber-html-report/datastore",
"json:target/cucumber-reports/cucumber-datastore.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
features = {"src/e2e-test/features"},
glue = {"io.cdap.plugin.gcs.stepsdesign", "io.cdap.plugin.bigquery.stepsdesign",
"stepsdesign", "io.cdap.plugin.common.stepsdesign"},
tags = {"@GCS_Sink"},
tags = {"@GCS_Sinks"},
monochrome = true,
plugin = {"pretty", "html:target/cucumber-html-report/gcs-sink",
"json:target/cucumber-reports/cucumber-gcs-sink.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
features = {"src/e2e-test/features"},
glue = {"io.cdap.plugin.gcs.stepsdesign", "io.cdap.plugin.bigquery.stepsdesign",
"stepsdesign", "io.cdap.plugin.common.stepsdesign"},
tags = {"@GCS_Source and not @PLUGIN-823 and not @PLUGIN-1113 and not @PLUGIN-825"},
tags = {"@GCS_Sources and not @PLUGIN-823 and not @PLUGIN-1113 and not @PLUGIN-825"},
/* TODO :Enable tests once issues fixed https://cdap.atlassian.net/browse/PLUGIN-823,
https://cdap.atlassian.net/browse/PLUGIN-1113, https://cdap.atlassian.net/browse/PLUGIN-825 */
monochrome = true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
@CucumberOptions(
features = {"src/e2e-test/features"},
glue = {"io.cdap.plugin.gcscopy.stepsdesign", "stepsdesign" , "io.cdap.plugin.common.stepsdesign"},
tags = {"@GCSCopy"},
tags = {"@GCSCopys"},
monochrome = true,
plugin = {"pretty", "html:target/cucumber-html-report/gcscopy-action",
"json:target/cucumber-reports/cucumber-gcscopy-action.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
features = {"src/e2e-test/features"},
glue = {"io.cdap.plugin.gcscreate.stepsdesign", "io.cdap.plugin.gcs.stepsdesign", "stepsdesign",
"io.cdap.plugin.common.stepsdesign"},
tags = {"@GCSCreate"},
tags = {"@GCSCreates"},
monochrome = true,
plugin = {"pretty", "html:target/cucumber-html-report/gcscreate",
"json:target/cucumber-reports/cucumber-gcscreate.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
features = {"src/e2e-test/features"},
glue = {"io.cdap.plugin.gcsdelete.stepsdesign", "io.cdap.plugin.gcs.stepsdesign", "stepsdesign",
"io.cdap.plugin.common.stepsdesign"},
tags = {"@GCSDelete"},
tags = {"@GCSDeletes"},
monochrome = true,
plugin = {"pretty", "html:target/cucumber-html-report/gcsdelete",
"json:target/cucumber-reports/cucumber-gcsdelete.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
features = {"src/e2e-test/features"},
glue = {"io.cdap.plugin.gcsmove.stepsdesign", "io.cdap.plugin.gcs.stepsdesign",
"stepsdesign", "io.cdap.plugin.common.stepsdesign"},
tags = {"@GCSMove"},
tags = {"@GCSMoves"},
monochrome = true,
plugin = {"pretty", "html:target/cucumber-html-report/gcsmove-action",
"json:target/cucumber-reports/cucumber-gcsmove-action.json",
Expand Down
Loading

0 comments on commit d96588c

Please sign in to comment.