AliSoftware / OHHTTPStubs

Stub your network requests easily! Test your apps with fake network data and custom response time, response code and headers!
MIT License
5.03k stars 601 forks source link

Current amount of Unit Test Coverage #282

Closed partho-maple closed 5 years ago

partho-maple commented 6 years ago

New Issue Checklist

Environment

Issue Description

I just wanted to know that what's the current amount of Unit Test Coverage of this library ?

AliSoftware commented 6 years ago

Hi

I'd say that OHHTTPStubs is rather well tested, we have quite a lot of unit tests (and also a lot of projects using it in real world, if that counts).

We haven't automated the code coverage reports to show it as a badge in the README for example, but you can open the XcodeProj, check the "Gather Coverage Data" checkbox then run the tests to see the coverage manually. I just did exactly that, and it appears that we're at 75% of coverage overall.

When I look at what's not covered, it's mainly the helper codes to access fixtures from file (e.g. helper methods that wrap calls to [NSBundle bundleForClass:self.class] URLForResource: withExtension:…]; followed by [NSData dataWithContentsOfURL:responseURL]; then responseWithHTTPMessageData:, stuff like that — especially the parts using the Mocktail or HTTPMessage file formats for describing stubs, if you choose to use those subspecs (which are not enabled by default). About all the rest of the code dealing with actually stubbing, the code coverage report seems to confirm that our whole suite of unit tests covers all the main stubbing mechanisms — even if, of course, we're always welcoming PRs and contribution to always add more tests (we never have too much tests) :wink:

AliSoftware commented 6 years ago

FYI

ohhttpstubs-coverage

HTH

Liquidsoul commented 5 years ago

I suppose that the question is answered. I'll close this then.