openbmc / openbmc-test-automation

Apache License 2.0
104 stars 92 forks source link

'Test Stability On Large Number Of Wrong Login Attempts To GUI' in security/test_bmc_connections.robot will always pass #2168

Closed generatz closed 2 years ago

generatz commented 2 years ago

There is an apparent mis-copy in testcase Test Stability On Large Number Of Wrong Login Attempts To GUI that allows the test to pass when it should not. Along with correcting the immediate problem, perhaps some additional refactoring of the design could be done so that a similar failure cannot result in a testcase pass.

Here's the git patch that fixes the typo and makes the Documentation look less like a keyword:

diff --git a/security/test_bmc_connections.robot b/security/test_bmc_connections.robot
index 83bed20d..07b5364c 100644
--- a/security/test_bmc_connections.robot
+++ b/security/test_bmc_connections.robot
@@ -163,7 +163,7 @@ Test Stability On Large Number Of Wrong Login Attempts To GUI

     FOR  ${i}  IN RANGE  ${1}  ${iterations}
         Log To Console  ${i}th login
-        Run Keyword And Ignore Error  Login to GUI With Wrong Credentials
+        Run Keyword And Ignore Error  Login to GUI With Incorrect Credentials

         # Every 100th iteration, check BMC GUI is responsive.
         ${status}=  Run Keyword If  ${i} % 100 == 0  Run Keyword And Return Status
@@ -296,7 +296,7 @@ Set Account Lockout Threshold

 Login to GUI With Incorrect Credentials
-    [Documentation]  Login to GUI With Wrong Credentials.
+    [Documentation]  Login to GUI with wrong credentials.

     Input Text  ${xpath_textbox_username}  root
     Input Password  ${xpath_textbox_password}  incorrect_password
gkeishin commented 2 years ago

@prkatti1 Please look into it.

gkeishin commented 2 years ago

https://gerrit.openbmc-project.xyz/c/openbmc/openbmc-test-automation/+/52751