-
Notifications
You must be signed in to change notification settings - Fork 1
10) User Tests
smccorma edited this page Jun 15, 2017
·
3 revisions
Regarding Selenium:
- To use Selenium and build test scripts, please install Selenium Builder for Firefox and set up an account with Sauce Labs.
- While on the page you want to test, right click and select "Launch Selenium Builder" (should be under "Inspect Element"). The builder should launch.
- Click >>Manage plugins and install the Sauce for Selenium Builder. Return to the original view.
- Click the "Record" button to start recording. Here, you can select "File>Sauce Settings" from the menu bar at the top.
- Enter in your Sauce Lab username and the Access Key. Find your Access Key on your "My Profile" page in Sauce Labs.
- Click around to generate your test. When you are done, click "Stop recording".
- To run the test, select "Run>Run on Selenium Server". This will bring up Selenium Server Settings. Add in your Host:Port of Selenium Server from Sauce Labs. You will find it under Automated Tests when you have no tests.
- Hit "Run" to start the test. You can watch a video of your test being emulated on Sauce Labs under the Automated Tests.
- "File>Export" the script to save it as a
.jsonfile. This file can be used to repeat the tests through "File>Open a script or suite". Move this file into theclient\test\seleniumfolder.
Example of Successful Selenium Script Run on Builder
Note: At some point, it is possible that, when trying to run the script on the Selenium Server, you will be asked to authenticate. I don't know what user name and password it wants, but I managed to get rid of it by uninstalling and reinstalling the Sauce Lab plugin.
Sign Up Page Test
- should reach the sign up page: http://dockin.herokuapp.com/signup.html
- should detect "Step 1/2:"
- should detect "Create a company"
- should detect Company Name field
- should detect Company Email field
- should detect Company Phone field
- should detect "Next"
- should set the Company Name
- should set the Company Email
- should set the Company Phone
- should click "Next" button
- should detect "Step 2/2:"
- should detect "Create an user account"
- should detect First Name field
- should detect Last Name field
- should detect Email field
- should detect Phone Number field
- should detect Password field
- should detect Confirm Password field
- should detect "Next"
- should set First Name
- should set Last Name
- should set Email
- should set Phone Number
- should set Password
- should set Confirm Password
Note: There are values set, but they can be changed in the signup.json test file.
Login Page Test
- should reach the login page: http://dockin.herokuapp.com/login.html
- should detect Emissary logo
- should detect "Dear user, log in to access the admin area"
- should detect small person glyph in Email field
- should detect Email field
- should detect Password field
- should detect "Login"
- should detect "Forgot Password"
- should detect "ToS"
- should detect "Privacy Policy"
Forgot Password Page Test
- should reach the forgot password page: http://dockin.herokuapp.com/forgot-password.html
- should detect Emissary logo
- should detect "Enter your email, and we will send the reset link"
- should detect Email field
- should detect "Send Reset Link"
- should detect "Return to Login Page"
- should detect "ToS"
- should detect "Privacy Policy"
