Hercules Retail 360 App - Login and basic navigation unit tests

Register
Submit a solution
The challenge is finished.

Challenge Overview

The Retail 360 iOS App is a tool used by Hercules employees in their retail stores.  The app allows for looking up customer details and will eventually contain lots of functionality for managing customer accounts, making changes to their accounts, and adding notes, sending emails, etc...

We have released version 1 of the app to some employees, and version 2 is nearing completion.  As we add more and more functionality, we need to ensure that the existing functionality isn't broken by any new changes.

This challenge will start the UI unit tests for the app, which we will build on over the next couple of months to get proper coverage of the app.

Requirements:

This challenge will build the base for future challenges.  This challenge will cover some of the basic app navigation (login, basic tabs, and logout), and will also ensure the unit tests for the base libraries are linked in and run during the testing process.

Base libraries and targets:

Each target (dev, staging, prod) should have a corresponding test target.  We build the app through a Continuous Integration environment, and we will run the tests as part of the build.  Because each target has a different configuration, we want to test the configuration that matches the target to ensure there aren't issues with specific configuration values that might be used for either dev, staging, or prod.  The base libraries have unit tests already.  We won't change them for this challenge, but we'll ensure they run as part of any new test targets added.

Coverage:

Generating a coverage report must be documented, and information below can help with that.  Note that no specific % is required, but the reviewers will ensure that your implementation is correct and provides proper functional coverage.

Required tests:

* Ensure that the app launches properly
* Ensure that the "Login" button opens up a web view
* Ensure that the login web view opens properly (no 404 or 500 error)
* Good login (creds will be provided in forum)
* Bad login
* Closing the web view without logging in and reopening the login panel
* Logout after a good login (should redirect back to the main launch screen)
* After logout, ensure that the login window loads properly and doesn't automatically log the user in

Right tools menu after login:
* Ensure the "XFinity Store Locations" web page loads properly (no 404 or 500 error)
* Ensure the "XFinity Store Locations" page can be closed properly
* Ensure the "Training" web page loads properly (no 404 or 500 error)
* Ensure the "Training" page can be closed properly
* Ensure the "About" page opens
* Ensure the version on the "About" page matches the app version
* Ensure the survey link on the "About" page loads properly (no 404 or 500 error).  Make sure to properly test an unset configuration URL for the survey.
* Ensure the user can go back from the survey page
* Ensure the user can navigate the side menu tabs without losing content or overlapping other tabs that might be open

Note - the "Modesto" tab is not in scope on the right menu

Helpful links:

https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/testing_with_xcode/chapters/09-ui_testing.html
https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/testing_with_xcode/chapters/07-code_coverage.html
* http://cleanswifter.com/measuring-swift-code-coverage/
https://developer.apple.com/videos/play/wwdc2015/410/
http://mgrebenets.github.io/mobile%20ci/2015/09/21/code-coverage-for-ios-xcode-7
 
Submission format

Your submission should be provided as a Git patch file against the commit hash mentioned in the forum.  MAKE SURE TO TEST YOUR PATCH FILE!

No video is required for this challenge.

A separate UNIT_TESTS_README.md can be provided for the unit tests - you don't have to update the existing README.


Final Submission Guidelines

Please see above.

ELIGIBLE EVENTS:

2017 TopCoder(R) Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30055774