Skip to content

Commit

Permalink
gherkin script for HPA-add,edit an delete-ODC-3556
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanket committed Aug 27, 2020
1 parent 06495d2 commit 945001d
Show file tree
Hide file tree
Showing 4 changed files with 183 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
Feature: Add HPA action and topology sidebar modifications
As a user, I want to add a HPA to a workload

Background:
Given user is in developer perspective
And user has created a deployment
And user has added CPU resource limit
And user has added Memory resource limit

@regression
Scenario: Add HPA form
Given user is in topology
When user opens sidebar of workload
And user opens action menu
And user clicks on Add Horizontal Pod Autoscaler option
Then user can see Add Horizontal Pod Autoscaler page opens with form view selected
And user can see name field
And user can see minimum and maximum pods with increasing and decreasing button
And user can see CPU Utilization
And user can see Memory Utilization
And user can see save and cancel button at the end

@regression
Scenario: Add HPA to deployment from action menu
Given user is in topology
When user opens sidebar of workload
And user opens action menu
And user clicks on Add Horizontal Pod Autoscaler option
And user sees Add Horizontal Pod Autoscaler page opens with form view selected
And user adds name 'example'
And user assigns minimum pods value to 2
And user assigns maximum pods value to 5
And user gives CPU Utilizationvalue as 60
And user gives Memory Utilization value as 30
And user clicks on save to get back to topology page
And user opens the sidebar
Then user can see two pods under pod section in details tab
And user can see Horizontal Pod Autoscalers section
And user can see the example with HPA tag associated present under HPA section

@regression
Scenario: Add HPA to deployment from context menu
Given user is in topology
When user right click on workload to open context menu
And user clicks on Add Horizontal Pod Autoscaler option
And user sees Add Horizontal Pod Autoscaler page opens with form view selected
And user adds name 'example'
And user assigns minimum pods value to 2
And user assigns maximum pods value to 5
And user gives CPU Utilizationvalue as 60
And user gives Memory Utilization value as 30
And user clicks on save to get back to topology page
And user opens the sidebar
Then user can see two pods under pod section in details tab
And user can see Horizontal Pod Autoscalers section
And user can see the example with HPA tag associated present under HPA section

@regression, @manual
Scenario: Add HPA form YAML view
Given user is in topology
When user opens sidebar of workload
And user opens action menu
And user clicks on Add Horizontal Pod Autoscaler option
And user sees Add Horizontal Pod Autoscaler page opens with form view selected
And user selects YAML view option
And user sees schema on the right sidebar
And user scrolls the and checks schema
And user closes the schema
And user checks the YAML
And user assigns name value as example
And user gives value to averageUtilization under cpu target as 60
And user clicks on save to get back to topology page
And user opens the sidebar
Then user can see Horizontal Pod Autoscalers section
And user can see the example with HPA tag associated present under HPA section
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Feature: Delete HPA action
As a user, I want to remove the HPA assigned to a workload

Background:
Given user is in developer perspective
And user has created a deployment
And user has added CPU resource limit
And user has added Memory resource limit
And user is in topology

@regression
Scenario: Remove HPA
Given user has a workload with HPA assigned to it
When user opens sidebar of workload
And user opens action menu
And user clicks on Remove Horizontal Pod Autoscaler option
And user sees Remove Horizontal Pod Autoscaler modal opens
And user sees Remove and Cancel option
And user clicks Remove
Then user can see HPA section gets removed
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
Feature: Edit HPA action
As a user, I want to edit the HPA assigned to a workload

Background:
Given user is in developer perspective
And user has created a deployment
And user has added CPU resource limit
And user has added Memory resource limit
And user is in topology

@regression
Scenario: Edit HPA action form view
Given user has a workload with HPA assigned to it
When user opens sidebar of workload
And user opens action menu
And user clicks on Edit Horizontal Pod Autoscaler option
And user sees Edit Horizontal Pod Autoscaler form opens
And user sees values are prefilled
And user checks the name value but can not edit it
And user checks and edit the value for maximum and minimum pods
And user checks and edit the cpu value
And user checks and edit the memory value
And user clicks on save to get back to topology page
And user opens the sidebar
And user sees Horizontal Pod Autoscalers section
And user goes to the details tab
Then user can see the changed pods number

@regression, @manual
Scenario: Edit HPA action YAML view
Given user has a workload with HPA assigned to it
When user opens sidebar of workload
And user opens action menu
And user clicks on Edit Horizontal Pod Autoscaler option
And user sees Edit Horizontal Pod Autoscaler page opens with form view selected
And user selects YAML view option
And user sees schema on the right sidebar
And user scrolls the and checks schema
And user closes the schema
And user checks the YAML
And user checks and edits values of cpu and memory under metrics.resource.target.averageUtilization
And user checks and edits minimum and maximum pods value in minReplicas and maxReplicas
And user checks the name value under metadata.name
And user clicks on save to get back to topology page
And user opens the sidebar
And user can see Horizontal Pod Autoscalers section
And user goes to the details tab
Then user can see the changed pods number

@regression, @manual
Scenario: Edit HPA YAML view to form view
Given user has a workload with HPA assigned to it
When user opens sidebar of workload
And user opens action menu
And user clicks on Edit Horizontal Pod Autoscaler option
And user sees Edit Horizontal Pod Autoscaler page opens with form view selected
And user selects YAML view option
And user sees schema on the right sidebar
And user scrolls the and checks schema
And user closes the schema
And user checks the YAML
And user changes values of cpu and memory under metrics.resource.target.averageUtilization
And user changes minimum and maximum pods value in minReplicas and maxReplicas
And user edits the name value under metadata.name
And user switches to form view
Then user checks the changed values in form view

Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Feature: Add HPA action and topology sidebar modifications
As a user, I want to add a HPA to a workload

Background:
Given user is in developer perspective
And user has created a deployment
And user has added CPU resource limit
And user has added Memory resource limit
And user has a workload with HPA assigned to it

@regression @manual
Scenario: Add HPA Sidebar
Given user is in topology
When user opens sidebar of workload
And user sees Horizontal Pod Autoscalers section under resource tab
And user opens action menu
And user can not see Edit Pod Count option
And user clicks on details tab
Then user can see the scaling of the pod disabled
And user can see the arrows to increase and decrease pod is not present
And user can see 'Autoscaling to' inside the pod donut

0 comments on commit 945001d

Please sign in to comment.