New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement comprehensive unit tests #552

Closed
yaronyg opened this Issue Feb 19, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@yaronyg
Member

yaronyg commented Feb 19, 2016

Our current CI based testing for our native code is non-existent. We have a few ad-hoc tests for iOS and even fewer for Android. Right now isn't the time to put in a full native test environment into CI (although I've added that to the back log). But we depend on this code to work and so our substitute will be to define comprehensive thaliMobileNative tests to really put the code through its paces.

We need to test things like

  • Making the thaliMobile tests actually use PSK, right now they don't because we don't pass in a psk function. See the tests in testThaliMobileNativeWrapper and testThaliWifiInfrastructure for examples of how to configure things.
  • honoring the logic around connection loss (e.g. any time either end of a native connection is lost we have to make sure that everything is torn down).
    • I'm doing some very basic testing on connection loss but more thorough testing is called for, take a look when I check it in and decide what you think
  • We have to make sure to do most of the testing using the coordination server since every test needs to run across at least two iOS devices in both directions to make sure we cover all the fun issues around bigger vs smaller peerIDs.
    • This is the main area I'll be focusing on. My plan is to write tests both at the thaliMobileNative and thaliMobileNativeWrapper layers.
  • We also need tests that show that we can successfully sync data with multiple devices simultaneously.
  • We also need to more aggressively test our ability to start/stop/start/stop with connections in between.
  • We need tests that intentionally kill and then recreate connections to show that the stack can handle it
  • We need tests that use kill connection and make sure we can successfully recover
  • Put in a test for Android where we are advertising and not listening on one end and the inverse at the other so we can test if the Bluetooth handshake will work.
  • We need a test to make sure that if we haven't called one of the start methods (e.g. advertising or listening) then we don't publish any peer availability changed events.

@yaronyg yaronyg self-assigned this Feb 19, 2016

@yaronyg yaronyg added this to the New Infra milestone Feb 19, 2016

@yaronyg yaronyg added 0 - Icebox and removed 0 - Icebox labels Feb 19, 2016

@yaronyg yaronyg assigned vjrantal and unassigned yaronyg Feb 22, 2016

@vjrantal vjrantal added 2 - Ready and removed 3 - Working labels Feb 23, 2016

@vjrantal vjrantal changed the title from Define comprehensive thaliMobileNative tests to Define comprehensive unit tests Mar 23, 2016

@vjrantal vjrantal added 3 - Working and removed 2 - Ready labels Mar 23, 2016

@vjrantal vjrantal changed the title from Define comprehensive unit tests to Implement comprehensive unit tests Mar 23, 2016

@vjrantal vjrantal assigned yaronyg and unassigned vjrantal Mar 30, 2016

@yaronyg yaronyg added 2 - Ready and removed 3 - Working labels Apr 1, 2016

@yaronyg yaronyg removed their assignment Jul 15, 2016

@yaronyg

This comment has been minimized.

Show comment
Hide comment
@yaronyg

yaronyg Sep 26, 2016

Member

Done

Member

yaronyg commented Sep 26, 2016

Done

@yaronyg yaronyg closed this Sep 26, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment