'Want to automate different login scenarios for different username and password combinations
I want to automate test scenarios for login functionality using different username and password combinations. FYI: Using pytest framework and selenium
What should I do to write that scenarios?
- Should I write only one testcase for all login combinations? OR
- Should I write different testcases for different login combination? (Recently, I have applied this method)
Scenarios which i have written:
- test_login_invalid_pass()
- test_login_empty_username()
- test_login_empty_pass()
- test_login_valid_pass()
Then, If I choose first method using parameterization then How to validate user login successfully or having error message of invalid credentials?
If I go for second method then I want to import username and password from excel file. Then How can i pass different login credentials to specific method
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
