-
Notifications
You must be signed in to change notification settings - Fork 165
[1LP][RFR] - Adding test to login new user using upper case password in the existing testcase #10105
[1LP][RFR] - Adding test to login new user using upper case password in the existing testcase #10105
Conversation
c6ef8d9
to
5f0c895
Compare
user, _ = user_self_service_role | ||
|
||
# login with user having self service role and uppercase password | ||
with user: | ||
appliance.server.login(user) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like how neatly this has been implemented, but if the user creation is a part of the test, I think it will be better if you put user creation within the test and not as a part of setup i.e. don't use fixture to create user.
Also it kinda looks like it should be a part of smoke test, thoughts on adding a smoke test marker?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@valaparthvi I think it's fine having it in the fixture. I think creating the user is really a part of the setup, and the point of the test is ensuring that the user is able to login. That said, I'd be fine if you want to include the user creation as part of the test, so up to you @dgaikwad.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@valaparthvi @john-dupuy I have added user creation inside test and also put a smoke marker.
5f0c895
to
cd3bcdb
Compare
8f0b8f1
to
83ac65f
Compare
83ac65f
to
e843dbf
Compare
@@ -2577,7 +2577,38 @@ def test_authorized_users_can_login(): | |||
1. User created | |||
2. User logged in | |||
""" | |||
pass | |||
# creating role |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we already have automated coverage for this test.
test_db_auth is creating a user with a credential randomized by fauxfactory.gen_alpha, which will include lower and uppercase characters.
It doesn't always include an uppercase character, as its randomized.
I think the existing test cases and fixture should be modified to always include a capital letter in the credential, than create a new test case for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the automated test coverage already exists, please adjust existing test case and remove this duplicate case.
3d8eba6
to
3704d44
Compare
3704d44
to
9fccdd4
Compare
I detected some fixture changes in commit 9fccdd4 The local fixture
Please, consider creating a PRT run to make sure your fixture changes do not break existing usage 😃 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect! Great job using existing parametrization to get the coverage.
adding_test Test to login new user and user having password capital case character in the existing testcase and removed
test_authorized_users_can_login
Purpose or Intent
PRT Run
{{pytest: cfme/tests/integration/test_db_auth.py -k "test_db_user_pwd" --long-running -v}}