[swift-corelibs-dev] URLSession test fest!
Tony Parker
anthony.parker at apple.com
Thu Mar 9 15:38:52 CST 2017
Hi Pushkar,
Another option is to continue to use httpbin.org <http://httpbin.org/>, but make the tests that use that network service not part of the normal unit tests but runnable on demand by us as we develop. That means we don’t have to reimplement the whole thing but we at least have some tools at our disposal to help debug and diagnose issues. As we make fixes we can improve our local unit test server’s infrastructure to prevent regressions.
- Tony
> On Mar 9, 2017, at 7:02 AM, Pushkar N Kulkarni <pushkar.nk at in.ibm.com> wrote:
>
> Hi Tony,
>
> PRs 911 and 913 reminded me of this conversation you started.
>
> The current unit testing infrastructure for URLSession may prove insufficient for future contributions. I've been looking at these tests <https://github.com/mike-ferenduros/swift-corelibs-foundation/blob/more-urlsession-tests/TestFoundation/TestNSURLSession.swift> written by Mike Ferenduros and they appear quite exhaustive! The only issue is that they connect to an external HTTP test service - http://httpbin.org. <http://httpbin.org./>
>
> A quick look at httpbin.org tells me it has sufficient functionality to aid in URLSession unit testing. Do you think it would make sense to emulate this functionality within TestFoundation?
>
>
> Pushkar N Kulkarni,
> IBM Runtimes
>
> Simplicity is prerequisite for reliability - Edsger W. Dijkstra
>
>
>
> -----swift-corelibs-dev-bounces at swift.org <mailto:-----swift-corelibs-dev-bounces at swift.org> wrote: -----
> To: swift-corelibs-dev <swift-corelibs-dev at swift.org <mailto:swift-corelibs-dev at swift.org>>
> From: Tony Parker via swift-corelibs-dev
> Sent by: swift-corelibs-dev-bounces at swift.org <mailto:swift-corelibs-dev-bounces at swift.org>
> Date: 01/25/2017 01:13AM
> Subject: [swift-corelibs-dev] URLSession test fest!
>
> Hi everyone,
>
> As we’re wrapping up Swift 3.1, I think it’d be a great opportunity to have a quality focus area on one of our most important APIs: URLSession. If you’ve been wondering how to make a meaningful contribution, this is the perfect time.
>
> It’d be great to greatly expand both unit test and higher level test coverage of URLSession. For testing that can’t really be part of a unit test and CI like poorly performing networks or esoteric configurations, it would also be nice to build a different kind of test tool. That tool would provide a lot of knobs for controlling a URLSession. We could make this tool part of the swift-corelibs-foundation project.
>
> Is anyone interested in chipping in here? We don’t have to start big. Even small contributions could get us moving in the right direction.
>
> Thanks,
> - Tony
>
>
>
> _______________________________________________
> swift-corelibs-dev mailing list
> swift-corelibs-dev at swift.org <mailto:swift-corelibs-dev at swift.org>
> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev <https://lists.swift.org/mailman/listinfo/swift-corelibs-dev>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-corelibs-dev/attachments/20170309/fd9f1462/attachment.html>
More information about the swift-corelibs-dev
mailing list