<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 9, 2017, at 9:52 PM, Pushkar N Kulkarni <<a href="mailto:pushkar.nk@in.ibm.com" class="">pushkar.nk@in.ibm.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><font face="Verdana,Arial,Helvetica,sans-serif" size="2" class=""><div class="">Peter: I agree. A stable testing infrastructure is absolutely necessary. <br class=""></div><div class=""><br class=""></div><div class=""><font face="Verdana,Arial,Helvetica,sans-serif" size="2" class=""><font class=""><font class=""><div class="socmaildefaultfont" dir="ltr"><div class="socmaildefaultfont" dir="ltr"><div class="socmaildefaultfont" dir="ltr"><div dir="ltr" style="font-style: normal;" class="">Tony: I am curious about where the sources for these tests (that use the external <a href="http://httpbin.org" class="">httpbin.org</a>) will be placed? Will it makes sense to have them in TestFoundation and have a guard to exclude them during normal test execution?</div></div></div></div></font></font></font></div></font></div></blockquote><div><br class=""></div>Sure, or we could add a standalone tool like I mentioned at the top of this thread.</div><div><br class=""></div><div>Either way, we should make it as easy as possible to enable the tests when you’re iterating on this code so you can verify the absence of regressions.</div><div><br class=""></div><div>- Tony</div><div><br class=""><blockquote type="cite" class=""><div class=""><font face="Verdana,Arial,Helvetica,sans-serif" size="2" class=""><div class=""><font face="Verdana,Arial,Helvetica,sans-serif" size="2" class=""><font class=""><font class=""><div class="socmaildefaultfont" dir="ltr"><div class="socmaildefaultfont" dir="ltr"><div class="socmaildefaultfont" dir="ltr"><div dir="ltr" style="font-style: normal;" class=""><br class=""><font face="Sans Serif, Verdana, Arial, Helvetica, sans-serif" class="">Pushkar N Kulkarni,</font></div>
<div dir="ltr" style="font-style: normal;" class=""><font face="Sans Serif, Verdana, Arial, Helvetica, sans-serif" class="">IBM Runtimes</font></div><div dir="ltr" style="font-style: normal;" class=""><font face="Sans Serif, Verdana, Arial, Helvetica, sans-serif" class=""><br class=""></font></div><div dir="ltr" class=""><font face="serif, Times New Roman, Times, serif" class=""><i class="">Simplicity is prerequisite for reliability - Edsger W. Dijkstra</i></font></div>
<div dir="ltr" style="font-style: normal; font-size: 10.5pt; font-family: Arial;" class=""><br class=""></div></div></div></div></font></font></font></div><br class=""><br class=""><font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2" class=""><font color="#990099" class="">-----Peter Tomaselli <<a href="mailto:vast.grapes@gmail.com" target="_blank" class="">vast.grapes@gmail.com</a>> wrote: -----</font><div class="iNotesHistory" style="padding-left:5px;"><div style="padding-right:0px;padding-left:5px;border-left:solid black 2px;" class="">To: Tony Parker <<a href="mailto:anthony.parker@apple.com" target="_blank" class="">anthony.parker@apple.com</a>><br class="">From: Peter Tomaselli <<a href="mailto:vast.grapes@gmail.com" target="_blank" class="">vast.grapes@gmail.com</a>><br class="">Date: 03/10/2017 04:47AM<br class="">Cc: Pushkar N Kulkarni <<a href="mailto:pushkar.nk@in.ibm.com" target="_blank" class="">pushkar.nk@in.ibm.com</a>>, swift-corelibs-dev <<a href="mailto:swift-corelibs-dev@swift.org" target="_blank" class="">swift-corelibs-dev@swift.org</a>><br class="">Subject: Re: [swift-corelibs-dev] URLSession test fest!<br class=""><br class=""><!--Notes ACF
<meta http-equiv="content-type" content="text/html; charset=utf8">--><div class=""></div><div class="">Just one outside data point on this: as someone who's been wanting to contribute to the test fest, I agree that being able to test against <a href="http://httpbin.org/" class="">httpbin.org</a> (or some other pre-existing server — as opposed to the loopback server) would make it much easier to make useful contributions.</div><div class=""><br class=""></div><div class="">Not that the loopback server is bad, but I trashed several attempts at a contribution due to lack of confidence about my changes. Specifically, with both "ends" of the test apparatus in flux (for example, having to add "features" to the loopback server just so that features of URLSession could be tested), I found it very hard to know if either end was correct. </div><div class=""><br class=""></div><div class="">So, just two cents from a lurker here, but this sounds like a great idea to me. Cheers,</div><div class=""><br class=""></div><div class="">Peter</div><div class=""><br class="">On Mar 9, 2017, at 4:38 PM, Tony Parker via swift-corelibs-dev <<a href="mailto:swift-corelibs-dev@swift.org" class="">swift-corelibs-dev@swift.org</a>> wrote:<br class=""><br class=""></div><blockquote type="cite" class=""><div class=""><!--Notes ACF
<meta http-equiv="Content-Type" content="text/html charset=utf8">-->Hi Pushkar,<div class=""><br class=""></div><div class="">Another option is to continue to use <a href="http://httpbin.org/" class="">httpbin.org</a>, 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.</div><div class=""><br class=""></div><div class="">- Tony</div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Mar 9, 2017, at 7:02 AM, Pushkar N Kulkarni <<a href="mailto:pushkar.nk@in.ibm.com" class="">pushkar.nk@in.ibm.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><font face="Verdana,Arial,Helvetica,sans-serif" size="2" class=""><div class="">Hi Tony, </div><div class=""><br class=""></div><div class="">PRs 911 and 913 reminded me of this conversation you started. </div><div class=""><br class=""></div><div class="">The current unit testing infrastructure for URLSession may prove insufficient for future contributions. I've been looking at these <a target="_blank" href="https://github.com/mike-ferenduros/swift-corelibs-foundation/blob/more-urlsession-tests/TestFoundation/TestNSURLSession.swift" title="https://github.com/mike-ferenduros/swift-corelibs-foundation/blob/more-urlsession-tests/TestFoundation/TestNSURLSession.swift " class="">tests</a> written by Mike Ferenduros and they appear quite exhaustive! The only issue is that they connect to an external HTTP test service - <a href="http://httpbin.org./" target="_blank" class="">http://httpbin.org.</a> </div><div class=""><br class=""></div><div class="">A quick look at <a href="http://httpbin.org/" class="">httpbin.org</a> 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?</div><div class=""><br class=""></div><div class=""><font face="Verdana,Arial,Helvetica,sans-serif" size="2" class=""><font class=""><font class=""><div class="socmaildefaultfont" dir="ltr"><div class="socmaildefaultfont" dir="ltr"><div class="socmaildefaultfont" dir="ltr"><div dir="ltr" style="font-style: normal;" class=""><br class=""><font face="Sans Serif, Verdana, Arial, Helvetica, sans-serif" class="">Pushkar N Kulkarni,</font></div><div dir="ltr" style="font-style: normal;" class=""><font face="Sans Serif, Verdana, Arial, Helvetica, sans-serif" class="">IBM Runtimes</font></div><div dir="ltr" style="font-style: normal;" class=""><font face="Sans Serif, Verdana, Arial, Helvetica, sans-serif" class=""><br class=""></font></div><div dir="ltr" class=""><font face="serif, Times New Roman, Times, serif" class=""><i class="">Simplicity is prerequisite for reliability - Edsger W. Dijkstra</i></font></div><div dir="ltr" style="font-style: normal; font-size: 10.5pt; font-family: Arial;" class=""><br class=""></div></div></div></div></font></font></font></div><br class=""><br class=""><font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2" class=""><font color="#990099" class=""><a href="mailto:-----swift-corelibs-dev-bounces@swift.org" target="_blank" class="">-----swift-corelibs-dev-bounces@swift.org</a> wrote: -----</font><div class="iNotesHistory" style="padding-left:5px;"><div style="padding-right:0px;padding-left:5px;border-left:solid black 2px;" class="">To: swift-corelibs-dev <<a href="mailto:swift-corelibs-dev@swift.org" target="_blank" class="">swift-corelibs-dev@swift.org</a>><br class="">From: Tony Parker via swift-corelibs-dev <!--Notes ACF
<swift-corelibs-dev@swift.org class="">--><br class="">Sent by: <a href="mailto:swift-corelibs-dev-bounces@swift.org" target="_blank" class="">swift-corelibs-dev-bounces@swift.org</a><br class="">Date: 01/25/2017 01:13AM<br class="">Subject: [swift-corelibs-dev] URLSession test fest!<br class=""><br class=""><div class=""><font face="Courier New,Courier,monospace" size="3" class="">Hi everyone,<br class=""><br class="">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.<br class=""><br class="">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.<br class=""><br class="">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.<br class=""><br class="">Thanks,<br class="">- Tony<br class=""><br class=""><br class=""><br class="">_______________________________________________<br class="">swift-corelibs-dev mailing list<br class=""><a href="mailto:swift-corelibs-dev@swift.org" target="_blank" class="">swift-corelibs-dev@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-corelibs-dev" class="">https://lists.swift.org/mailman/listinfo/swift-corelibs-dev</a><br class=""></font></div><!--Notes ACF
</swift-corelibs-dev@swift.org>--></div></div></font></font><br class="">
</div></blockquote></div><br class=""></div></div></blockquote><blockquote type="cite" class=""><div class=""><span class="">_______________________________________________</span><br class=""><span class="">swift-corelibs-dev mailing list</span><br class=""><span class=""><a href="mailto:swift-corelibs-dev@swift.org" class="">swift-corelibs-dev@swift.org</a></span><br class=""><span class=""><a href="https://lists.swift.org/mailman/listinfo/swift-corelibs-dev" class="">https://lists.swift.org/mailman/listinfo/swift-corelibs-dev</a></span><br class=""></div></blockquote></div></div></font></font><br class="">
</div></blockquote></div><br class=""></body></html>