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 fix up the unit tests for the base libraries to ensure they run and properly test the new API server.

Requirements:

Recent changes have been put into the base libraries to use an API proxy instead of direct backend server access.  We need to update the base library unit tests to account for this change. Only the pre-production target is in scope

Coverage:

Proper coverage is required, of positive and negative test cases.  The reviewers should ensure that the coverage report can be run and that the coverage % is appropriate for the functionality tested.

Any existing tests that fail are out of scope.

Required tests:

Note:  All tests require a login.  Login is already covered by other tests, but it will need to be updated by competitors to ensure it works properly.

For this challenge, only the base library tests are in scope, nothing in the UI.  We want to ensure the base libraries can be tested, and that all base library calls are properly covered by unit tests.

In addition to the existing functionality, like customer lookup, billing, manage devices, etc..., you will also need to add new unit tests for:

* Modesto API calls
* Modesto links
* Consent link
  
Test data

Test data will be provided in the forum.

Note that your tests should be able to be run in any state of a given test account, according to the data above.  So, if you're doing a swap on an account, your test should be able to handle either the original *or* swapped device registered on the account, just so we don't have to do all sorts of resetting before the unit test run.

Not in scope

Currently, we don't have a reliable way of getting inactive devices, so we can leave out anything that requires that, like testing the removal flow and testing adding a disabled device.

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 exists in Git.  It should be updated for this challenge.
 

 



Final Submission Guidelines

Please see above

ELIGIBLE EVENTS:

2017 TopCoder(R) Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30057660