Martin Pilch
Martin Pilch

Reputation: 3315

Unit Tests on iOS: testing file upload/download

I am new to unit testing and I want to write some tests to existing iOS app. The key feature of the app I want to test is uploading/downloading of the file to amazon S3 storage.

What I want to know is:

  1. I want to test if the file was uploaded/downloaded successfully. Is it possible to wait for delegate method or notification?
  2. Is it possible to test network failure during upload/download?
  3. Is it possible to test app termination during upload/download?

Thank you.

Upvotes: 1

Views: 721

Answers (1)

August Lilleaas
August Lilleaas

Reputation: 54603

  1. OCUnit doesn't support asynchronous test cases. So you'll have to use another test framework, such as GHUnit.
  2. No.
  3. No.

What you are describing here are integration tests. And the frameworks that comes with the SDK aren't made for unit tests. So that's why they don't include async, networking, etc.

Upvotes: 2

Related Questions