Launch URL: https://www.saucedemo.com/
- Type any credentials into "Username" and "Password" fields.
- Clear the inputs.
- Hit the "Login" button.
- Check the error messages: "Username is required".
- Type any credentials in username.
- Enter password.
- Clear the "Password" input.
- Hit the "Login" button.
- Check the error messages: "Password is required".
- Type credentials in username which are under Accepted username are sections.
- Enter password as secret sauce.
- Click on Login and validate the title “Swag Labs” in the dashboard.
- Provide parallel execution, add logging for tests and use Data Provider to parametrize tests.
Make sure that all tasks are supported by these 3 conditions: UC-1; UC-2; UC-3.
- Please, add task description as README.md into your solution!
- To perform the task use the various of additional options:
- Test Automation tool: Selenium WebDriver;
- Project Builder: Maven;
- Browsers: 1) Chrome; 2) Edge;
- Locators: XPath;
- Test Runner: JUnit;
Use the following patterns
- Singleton
- Builder]]
- Decorator
Test automation approach: BDD; Assertions: Built-in assertions of Unit-runners JUnit vs TestNG; Loggers: SLF4J._
- Java version: 17.0.12
- Chrome, Firefox and Edge are supported
- I use TestNG, and 1 test is left to fail on purpose, specifically
username = "locked_out_user"
Run the tests
mvn -Dbrowser=chrome -Denvironment=dev clean test
mvn -Dbrowser=firefox -Denvironment=dev clean test
mvn -Dbrowser=edge -Denvironment=dev clean test
- BDD Approach