Skip to content

End to End Test Plan

Scott Low edited this page Jan 30, 2015 · 1 revision

End to End Test Plan

The following page outlines the end to end test plan for beLocal. It's important to note that these tests are only to do with UI/UX type scenarios (in other words, they do not include unit testing!) Please feel free to ping me on Slack if you feel any test cases are missing and I'll try to add them ASAP!

Installation and Execution

To run the current end to end test suite, please complete the following steps:

  1. npm install -g protractor
  2. webdriver-manager update
  3. webdriver-manager start
  4. Navigate to the /client/test/protractor folder and run bash protractor.sh

If you only wish to run certain segments of the test cases, feel free to run these manually using the commands found in protractor.sh. (For example, to run just farmer tests, use the command protractor facebook-farmer-tests)

NOTE: This will wipe your database and create new foodies, farmers and superusers that will be used for testing purposes!

For a successful test case run, your output should look something like this: Successful Test Case Run Note the green lines that show each test case has completed successfully. There should be no red blocks of text anywhere in the output of the test cases. If there is, that means one of your tests failed!

Test Plan

  1. Vendor Setup
    1. Register as a vendor with Facebook
    2. Register as a vendor without Facebook
    3. Check to make sure that clicking the Get Started button redirects to home page
    4. Check to make sure the Register as a Farmer drop down button redirects back to the welcome screen
    5. Check that attempting to register with the same Facebook account pops an error message
    6. Check that attempting to register with the same username causes an error message to be displayed
    7. Check that attempting to register with the same email causes an error message to be displayed
  2. Foodie Setup
    1. Register as a foodie with Facebook
    2. Register as a foodie without Facebook
    3. Check to make sure the Register as a Farmer drop down button redirects back to the welcome screen
    4. Check that attempting to register with the same Facebook account pops an error message
    5. Check that attempting to register with the same username causes an error message to be displayed
    6. Check that attempting to register with the same email causes an error message to be displayed
  3. Superuser Setup
    1. Register as a superuser without Facebook (the sign up method doesn't really matter here)
  4. Superuser Tests
    1. Log in as a superuser
    2. Activate a vendor
    3. Delete a vendor
  5. Farmer Tests
    1. Test sign in with Facebook
    2. Test sign in without Facebook
    3. Test editing of profile photo
    4. Test editing of user profile (company_name)
    5. Test editing of website URL
    6. Test joining/leaving markets
    7. Test creating one time custom locations
    8. Test editing one time custom locations (change description and make sure it saves)
    9. Test deletion of one time custom locations
    10. Test undoing the deletion of one time custom locations
    11. Test creating recurring custom locations
    12. Test editing recurring custom locations (change hours and make sure it saves)
    13. Test deleting recurring custom locations
    14. Test undoing the deletion of recurring custom locations
    15. Test creating a product (including uploading a product image)
    16. Test editing a product
    17. Test deleting a product
    18. Test undoing the deletion of a product
    19. Check that the My Profile button takes vendors back to their account
    20. Test that the Vendor Tour button starts the tour
    21. Test that vendors are able to log out

Before logging out in the above process, some products with different categories and tags should likely be created so that customer functionality can be tested.

  1. Foodie Tests
    1. Test sign in with Facebook
    2. Test sign in without Facebook
    3. Test filtering by category (including clicking All Products)
    4. Test filtering by a single tag (including clicking All Products)
    5. Test filtering by multiple tags
    6. Test filtering inside a category with a single tag
    7. Test filtering inside a category with multiple tags
    8. Test clicking tag in product details modal on Trending page
    9. Test liking/unliking of products
    10. Check that clicking vendor name on product card goes to vendor details page
    11. Check that clicking vendor name on vendor card goes to vendor details page
    12. Check that clicking product on vendor card opens product details modal
    13. Test clicking tag in product details modal on Producers page
    14. Test that clicking vendor name on map goes to vendor details page
    15. Test that clicking market name on market card goes to market details page
    16. Test that clicking market name on map goes to market details page
    17. Test liking of vendors on vendor details page
    18. Test liking of markets on market details page
    19. Test liking of markets on market cards

There are honestly so many more things we could test, but I think this is a pretty decent list to start with. Other things that I haven't listed, but are coming to mind include the following:

  1. Test for empty strings (i.e. "No markets to display!") displaying
  2. Test for maps displaying depending on ng-show/hide logic
  3. Test back button behaviour through various workflows