forked from cdapio/cdap
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SystemAdmin feature scenarios addition
- Loading branch information
1 parent
30c8856
commit 6e6217f
Showing
7 changed files
with
216 additions
and
0 deletions.
There are no files selected for viewing
69 changes: 69 additions & 0 deletions
69
cdap-e2e-tests/src/e2e-test/features/systemadmin/SysAdminDesignTime.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# | ||
# Copyright © 2023 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. | ||
# | ||
|
||
@Sysadmin | ||
Feature: Sysadmin - Validate system admin page design time scenarios | ||
|
||
@Sysadmin | ||
Scenario:Validate user is able to create new system preferences and able to delete the added system preferences successfully | ||
Given Open Datafusion Project to configure pipeline | ||
Then Open "System Admin" menu | ||
Then Click on the Configuration link on the System admin page | ||
Then Select "systemPreferences" option from Configuration page | ||
Then Click on edit system preferences | ||
Then Set system preferences with key: "keyValue" and value: "systemPreferences1" | ||
Then Click on the Save & Close preferences button | ||
Then Select "systemPreferences" option from Configuration page | ||
Then Click on edit system preferences | ||
Then Delete the preferences | ||
Then Click on the Save & Close preferences button | ||
|
||
Scenario:Validate user is able to add multiple system preferences inside system admin successfully | ||
Given Open Datafusion Project to configure pipeline | ||
Then Open "System Admin" menu | ||
Then Click on the Configuration link on the System admin page | ||
Then Select "systemPreferences" option from Configuration page | ||
Then Click on edit system preferences | ||
Then Set system preferences with key: "keyValue" and value: "systemPreferences2" | ||
Then Click on the Save & Close preferences button | ||
Then Click on edit system preferences | ||
Then Delete the preferences | ||
Then Delete the preferences | ||
Then Click on the Save & Close preferences button | ||
|
||
Scenario:Validate user is able to successfully reload system artifacts using reload | ||
Given Open Datafusion Project to configure pipeline | ||
Then Open "System Admin" menu | ||
Then Click on the Configuration link on the System admin page | ||
Then Click on Reload System Artifacts from the System admin page | ||
Then Click on Reload button on popup to reload the System Artifacts successfully | ||
Then Select "systemPreferences" option from Configuration page | ||
|
||
Scenario:Validate user is able to open compute profile page and create a compute profile for selected provisioner | ||
Given Open Datafusion Project to configure pipeline | ||
Then Open "System Admin" menu | ||
Then Click on the Configuration link on the System admin page | ||
Then Click on the Compute Profile from the System admin page | ||
Then Click on create compute profile button | ||
Then Select a provisioner: "remoteHadoopProvisioner" for the compute profile | ||
Then Verify the Create a Profile page is loaded for selected provisioner | ||
Then Enter input plugin property: "profileLabel" with value: "validProfile" | ||
Then Enter textarea plugin property: "profileDescription" with value: "validDescription" | ||
Then Enter input plugin property: "host" with value: "testHost" | ||
Then Enter input plugin property: "user" with value: "testUser" | ||
Then Enter textarea plugin property: "sshKey" with value: "testSSHKey" | ||
Then Click on: "Create" button in the properties | ||
Then Verify the created compute profile: "validProfile" is displayed in system compute profile list |
64 changes: 64 additions & 0 deletions
64
cdap-e2e-tests/src/e2e-test/features/systemadmin/SysAdminDesignTimeValidation.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# | ||
# Copyright © 2023 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. | ||
# | ||
|
||
@Sysadmin | ||
Feature: Sysadmin - Validate system admin page design time validation scenarios | ||
|
||
Scenario:Validate user is able reset the system preferences added inside system admin successfully | ||
Given Open Datafusion Project to configure pipeline | ||
Then Open "System Admin" menu | ||
Then Click on the Configuration link on the System admin page | ||
Then Select "systemPreferences" option from Configuration page | ||
Then Click on edit system preferences | ||
Then Set system preferences with key: "keyValue" and value: "systemPreferences1" | ||
Then Reset the preferences | ||
Then Verify the reset is successful for added preferences | ||
|
||
Scenario:To verify the validation error message with invalid cluster name | ||
Given Open Datafusion Project to configure pipeline | ||
Then Open "System Admin" menu | ||
Then Click on the Configuration link on the System admin page | ||
Then Click on the Compute Profile from the System admin page | ||
Then Click on create compute profile button | ||
Then Select a provisioner: "existingDataProc" for the compute profile | ||
Then Enter input plugin property: "profileLabel" with value: "validProfile" | ||
Then Enter textarea plugin property: "profileDescription" with value: "validDescription" | ||
Then Enter input plugin property: "clusterName" with value: "invalidClusterName" | ||
Then Click on: "Create" button in the properties | ||
Then Verify that the compute profile is displaying an error message: "errorInvalidClusterName" on the footer | ||
|
||
Scenario:To verify the validation error message with invalid profile name | ||
Given Open Datafusion Project to configure pipeline | ||
Then Open "System Admin" menu | ||
Then Click on the Configuration link on the System admin page | ||
Then Click on the Compute Profile from the System admin page | ||
Then Click on create compute profile button | ||
Then Select a provisioner: "existingDataProc" for the compute profile | ||
Then Enter input plugin property: "profileLabel" with value: "invalidProfile" | ||
Then Enter textarea plugin property: "profileDescription" with value: "validDescription" | ||
Then Enter input plugin property: "clusterName" with value: "validClusterName" | ||
Then Click on: "Create" button in the properties | ||
Then Verify that the compute profile is displaying an error message: "errorInvalidProfileName" on the footer | ||
|
||
Scenario:To verify the validation error message with invalid namespace name | ||
Given Open Datafusion Project to configure pipeline | ||
Then Open "System Admin" menu | ||
Then Click on the Configuration link on the System admin page | ||
Then Click on Create New Namespace button | ||
Then Enter the New Namespace Name with value: "invalidNamespaceName" | ||
Then Enter the Namespace Description with value: "validNamespaceDescription" | ||
Then Click on: "Finish" button in the properties | ||
Then Verify the failed error message: "errorInvalidNamespace" displayed on dialog box |
36 changes: 36 additions & 0 deletions
36
cdap-e2e-tests/src/e2e-test/java/io/cdap/cdap/systemadmin/runners/TestRunner.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
* Copyright © 2023 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.cdap.systemadmin.runners; | ||
|
||
import io.cucumber.junit.Cucumber; | ||
import io.cucumber.junit.CucumberOptions; | ||
import org.junit.runner.RunWith; | ||
|
||
/** | ||
* Test Runner to execute system admin related test cases. | ||
*/ | ||
@RunWith(Cucumber.class) | ||
@CucumberOptions( | ||
features = {"src/e2e-test/features"}, | ||
glue = {"io.cdap.cdap.systemadmin.stepsdesign", "stepsdesign"}, | ||
tags = {"@Sysadmin"}, | ||
plugin = {"pretty", "html:target/cucumber-html-report/systemadmin", | ||
"json:target/cucumber-reports/cucumber-systemadmin.json", | ||
"junit:target/cucumber-reports/cucumber-systemadmin.xml"} | ||
) | ||
public class TestRunner { | ||
} |
20 changes: 20 additions & 0 deletions
20
cdap-e2e-tests/src/e2e-test/java/io/cdap/cdap/systemadmin/runners/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* Copyright © 2023 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 contains the runners for system admin features. | ||
*/ | ||
package io.cdap.cdap.systemadmin.runners; |
4 changes: 4 additions & 0 deletions
4
cdap-e2e-tests/src/e2e-test/resources/errorMessage.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
validationResetSuccessMessage=Reset Successful | ||
errorInvalidClusterName=Unable to get credentials from the environment. Please explicitly set the account key. | ||
errorInvalidProfileName=Invalid profile ID: 6*&gjh879. Should only contain alphanumeric characters and _ or -. | ||
errorInvalidNamespace=Failed to Add namespace |
11 changes: 11 additions & 0 deletions
11
cdap-e2e-tests/src/e2e-test/resources/pluginDataCyAttributes.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
systemPreferences=system-prefs-accordion | ||
keyValue=key-value-pair- | ||
existingDataProc=provisioner-gcp-existing-dataproc | ||
gcpDataProc=provisioner-gcp-dataproc | ||
remoteHadoopProvisioner=provisioner-remote-hadoop | ||
Create=profile-create-btn | ||
Finish=wizard-finish-btn | ||
Next=wizard-next-btn | ||
Previous=wizard-previous-btn | ||
profileName=profile-list- | ||
amazonEMRProvisioner=provisioner-aws-emr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters