<?xml version="1.0" encoding="utf-8"?>
<data>
<r t="9.81">okay a viral i'm gonna talk about some work often recently so for testing web</r>
<r t="16.29">services or all the testing the client codes which we use and i still to</r>
<r t="20.67">web services</r>
<r t="23.04">so what is web service because of examples to go contacts people you to i</r>
<r t="29.48">guess a web</r>
<r t="30.67">open street maps a few also downloading map files facebook scruffy ple basically any hasty</r>
<r t="37.26">gpus H T S service which</r>
<r t="40.88">can be and is used by the desktop</r>
<r t="43.32">i don't specifically limiting my work eight H T P and he cts because it</r>
<r t="47.86">makes everything a whole is</r>
<r t="50.73">and doesn't really</r>
<r t="52.34">restrictive anyway because</r>
<r t="54.53">pretty much every web service uses one of the same because you don't get problems</r>
<r t="58.39">of a levels</r>
<r t="59.71">in that sense</r>
<r t="62.23">so</r>
<r t="64.21">when you think about testing web services you go to the big question you can</r>
<r t="67.45">ones there is what you want to test</r>
<r t="70.55">you want to test your point code you wanna make sure isn't crash but you</r>
<r t="74.01">want tested the point conforms to the current behaviour of the server or some cost</r>
<r t="79.7">behaviour which is what you actually programmed against</r>
<r t="82.07">the user would say you want current behaviour because that's what i actually want to</r>
<r t="85.74">use but that's quite tricky to do because that means you gonna test online which</r>
<r t="91.2">gives you of those problems with connectivity and race conditions and slowness and all sorts</r>
<r t="99.37">so we wanna catch regressions in point carried but we also wanna catch that isn't</r>
<r t="104.91">it changes in the save as behaviour which require changes in your point codes the</r>
<r t="109.67">new features or</r>
<r t="111.26">whatever the changed online</r>
<r t="116.86">so</r>
<r t="118.35">you can do it two ways you can do offline testing or online testing and</r>
<r t="122.32">one talking about here is offline testing developing working on</r>
<r t="128.46">the bait basic idea of offline testing is that you somehow record how the server</r>
<r t="132.29">hey and then test against are offline not using that work not touching the curve</r>
<r t="138.4">javier the server so it's reliable because younger always network problem you've eliminated the web</r>
<r t="144.54">service and all the network infrastructure in between from your system on the test</r>
<r t="149.38">so massively cut down a good place</r>
<r t="152.05">but it's not what users care about because the web service changes your point code</r>
<r t="156.36">isn't getting tested against like situation</r>
<r t="160.55">you can also</r>
<r t="162.52">test against the carburetor the server</r>
<r t="165.11">which is as i said what we use just care about but it requires a</r>
<r t="167.86">network connections the instantly eliminates any kind of continuous integration or testing on a seven</r>
<r t="173.61">provided by know because it's just so unreliable it's hassles that so and network admins</r>
<r t="179.2">don't like it</r>
<r t="180.66">it's unreliable</r>
<r t="182.73">and that's a problem that's it's and me a lot in the G data which</r>
<r t="186.77">is more based this work on where basically every time a run make check it</r>
<r t="191.21">failed and that would be D to</r>
<r t="193.92">transient network problems or subtle changes in the so that it behaviour that S how</r>
<r t="199.75">to compensated for but the point was actually point</r>
<r t="205.3">another thing about online testing is that web services change so if you're gonna do</r>
<r t="210.31">offline testing you need to</r>
<r t="212.58">be able to change your tests and update them so they represent the lexus takes</r>
<r t="217.14">of a server and that was easy because you don't wanna spend time doing that</r>
<r t="220.54">you got much better things today</r>
<r t="224.86">finally what services are distributed systems which is a problem it's an lots</r>
<r t="230.14">which means that roger circuit a good wasn't example later just have one server which</r>
<r t="235.29">has a leo contacts on they have hundreds and as it turns out if you</r>
<r t="239.87">say for example instead to contact in your address book and it says another one</r>
<r t="244.12">and then query your address book one you contacts</r>
<r t="247.61">often they don't here for ten twenty seconds</r>
<r t="252.18">which means that your test code has to get to sleep the channel twenty seconds</r>
<r t="255.8">and that's it means your tests take ages to run which is horrible because you</r>
<r t="260.57">can get most of the way three make check and then it'll five and you</r>
<r t="264.46">gotta start again</r>
<r t="266.79">so that's one of the major reasons why online testing bad</r>
<r t="273.98">there are also other problems with</r>
<r t="277.35">online testing do you to things like resource limits and</r>
<r t="282.25">the fact that you have to use not a natural online account so testing against</r>
<r t="286.11">cable services they limit you to say a thousand press today so if you wanna</r>
<r t="290.79">run make checking continuous integration you gonna hit against that limits and also new tests</r>
<r t="295.2">are gonna fail for us today and there's nothing you can do about that</r>
<r t="298.69">similarly if you wanna run test from multiple locations so one developer in europe and</r>
<r t="303.6">one america and they both whatever make czech good people is gonna say well that</r>
<r t="309.31">test account is be involved in two places at once</r>
<r t="312.33">i'm gonna look at out and then again make czech stops working</r>
<r t="317.58">so it would be working on is</r>
<r t="320.96">maybe oscillation for offline testing</r>
<r t="325.29">where you record H T P messages between client and server you save into a</r>
<r t="329.89">file you commit that get you then run only a test again start but periodically</r>
<r t="334.26">you can manually check and compare the trace files against the carburetor was of the</r>
<r t="340.5">and check other the same or if the difference then you know what's changed so</r>
<r t="344.31">you cannot take your code in your tests to match but it means that's for</r>
<r t="348.74">most the time this of one testing can be done in continuous integration it can</r>
<r t="352.71">be a lot faster sleep and you don't have always problems with synchronization or resource</r>
<r t="360.2">limits</r>
<r t="364.15">so there are various other existing solutions i mean it's a pretty simple idea but</r>
<r t="369.86">most of the large over only so the first three they basically exactly what describes</r>
<r t="376.17">why more is a separate process which makes in the paying to set up</r>
<r t="381.47">rest drive a is rest only which eliminates a huge number one services but</r>
<r t="385.98">also means you can test if you don't know number one services and betamax children</r>
<r t="390.2">as well</r>
<r t="391.44">question they will smoke an e-mail of all the open source projects which is similar</r>
<r t="396.09">sort of things with the cost and hardware but obviously not exceeding gonna translate and</r>
<r t="400.79">fractions</r>
<r t="403.9">so the approach of taking would look at it is to a broad enough is</r>
<r t="408.36">a revelation</r>
<r t="410.64">we directly apply requests to a local in precisely but other and then from that</r>
<r t="416.76">replay the trace and compare every incoming H T you request with the trains and</r>
<r t="421.86">then reply with respondent race well</r>
<r t="424.5">if they don't if they you can make the press that match what's in that</r>
<r t="427.58">race while then you get never your tests fail and everyone stopping one happy</r>
<r t="434.14">alternatively you can not a variety S and the test will go straight to the</r>
<r t="438.52">online server and then you can compare the responses not with the choice while and</r>
<r t="443.9">see if the servers changed compared to last time you save the choices</r>
<r t="449.48">so you this operates at H T P level using them so you which is</r>
<r t="454.16">simple things a lot this transpose can be human readable and</r>
<r t="457.92">does debug able</r>
<r t="460.97">it means you can do</r>
<r t="464.01">simulation of H T P errors like timeouts and for a forcible server iras every</r>
<r t="469.75">five hundreds things like that with relative ease you not filling around of the lower</r>
<r t="474.16">levels of T C P I P which would just be too much for fire</r>
<r t="476.79">it gives you extra power but for the most part it's not needed for more</r>
<r t="480.48">web services "'cause" there will be H T to you know like</r>
<r t="484.83">unlike a one or more</r>
<r t="487.34">the server that's your testing against the offline server is kept in process so you</r>
<r t="493.2">don't have process synchronisation signal tests and this mock server so some for things a</r>
<r t="499.61">lot</r>
<r t="503.43">and because it's overriding the N S it requires minimal code changes to your point</r>
<r t="508.34">so of the solutions that people</r>
<r t="512.38">suggest would be to take your clients and split it out into interface isn't and</r>
<r t="516.51">reimplement interfaces with an online petition offline version and that becomes fourty complicated cost many</r>
<r t="522.39">changes and is</r>
<r t="524.42">a real fast</r>
<r t="527.09">so by writing the N S you basically have to change a client to</r>
<r t="532.86">specimen H T people to use because it'll be a wide range one so you'd</r>
<r t="536.4">have to run three but you can easily switch between online and offline just by</r>
<r t="541.24">turning off the gas reservation</r>
<r t="544.99">so diagrams everyone much diagrams</r>
<r t="547.88">so this is have things currently all you've got your system on the test which</r>
<r t="551.44">is your point code running on the desktop and you've got on one server which</r>
<r t="554.92">are testing against you got always this page T V transactions going between them</r>
<r t="560.33">so</r>
<r t="561.42">now introduce a lots of the choice while and you locally say C T V</r>
<r t="566.57">transactions to that race while so we still doing online stuff but once when you</r>
<r t="571.73">first set of tests you save more to try as well</r>
<r t="575.45">and commitment to get</r>
<r t="578.69">you can and the your testing case that race while eliminate on one server everything</r>
<r t="582.87">goes remote server by redirecting guess the choice well get right into that and of</r>
<r t="588.72">course happy</r>
<r t="590.68">you can also compare your choice well against the online so the point again switching</r>
<r t="595.16">to doing the transactions online but also reading interest well i'm comparing now same time</r>
<r t="601.32">so you can see what's changed you do not manually once a month or whatever</r>
<r t="605.79">one of if you like it or something develop to take trough and you continuous</r>
<r t="609.56">integration so</r>
<r t="612.42">so he's a example</r>
<r t="615.69">of how we change your unit test so the test it is here</r>
<r t="620.35">whatever it is something sensation he request gets response pulses it doesn't ounce bottle of</r>
<r t="626.37">and what you have is</r>
<r t="629.01">beginning dedicated and dedicated around each unit test</r>
<r t="633.67">which was a trace the stock price</r>
<r t="636.86">it's cool since your code somewhat susceptible to use because you gonna use this high</r>
<r t="642.38">range pull so you don't wanna use rate don't just use port eighty</r>
<r t="647.8">and then you also tell the D N S resolver which your is to have</r>
<r t="653.36">a right so if you testing able services you know growing people dot com and</r>
<r t="657.57">some supplements that when you set up to run results you'll be back seven</r>
<r t="662.35">this also means that any requests that you don't expect to other domains however unlikely</r>
<r t="668.61">that they would gets a D N S translation arrow and so you can catch</r>
<r t="672.94">buttons that way</r>
<r t="675.14">probably not gonna happen</r>
<r t="677.42">and you can wrap as a lot than us and macros or something so you</r>
<r t="681.14">basically just a one line before and after each unit test</r>
<r t="685.11">there is some code i'm not showing here which you and you log handler which</r>
<r t="690.73">will be htk mess in haiti messages like tricks while but that's just a few</r>
<r t="696.44">lines didn't feel</r>
<r t="700.96">so i've implemented this village a data which is the project a hard on about</r>
<r t="705.24">most</r>
<r t="707.31">so make czech was over ten minutes because of all these sleeps to wait for</r>
<r t="711.3">the synchronisation in the street a system on the server side</r>
<r t="715.36">you can emanate willows and make czech negatives down two hundred and thirty seven seconds</r>
<r t="720.42">done with a quick run of point make check</r>
<r t="723.21">you can cover interesting about the same after implementing this it's likely increased because i</r>
<r t="728.66">did a few tests for every conditions which i can nowadays so i can now</r>
<r t="732.98">simulates and this of the giving you an access denied error or saying your accounts</r>
<r t="737.84">been compromised</r>
<r t="740.13">so you can add test cases for those which you wouldn't be able to do</r>
<r t="742.46">for</r>
<r t="744.56">because you can't manipulate so state</r>
<r t="747.69">but generally it's been useful</r>
<r t="751.44">i haven't</r>
<r t="752.75">applied the store the libraries yes but there's a whole later than can be modified</r>
<r t="756.48">this that and help also there's the facebook graphic the only as a go a</r>
<r t="762.14">do you able a no one counts</r>
<r t="766.35">do the network as it could possibly use it as well this</r>
<r t="769.88">you know as a lot of stuff that could have it and it was is</r>
<r t="772.61">become a bit more stable</r>
<r t="775.53">but there are some problems so</r>
<r t="779.72">in your traditional unit tests that's a you have a set of function the unit</r>
<r t="783.68">test function attend on function and you can reuse the set of content and functions</r>
<r t="787.82">for multiple unit tests because they do common things like you have won the ads</r>
<r t="792.65">the contact and that at a functional remove contacts and then you have there is</r>
<r t="796.68">unit tests do different things with a new contract</r>
<r t="801.91">unfortunately this means that's</r>
<r t="803.77">if you have a choice while</r>
<r t="806.53">per unit test</r>
<r t="808.39">and they have point these in them</r>
<r t="810.8">not identify your contact for example</r>
<r t="814.81">the only these are generated by the server will differ from indication of set up</r>
<r t="818.49">to different invocations that so</r>
<r t="820.85">and there's a bit of written in the trace files which means that your unit</r>
<r t="824.6">tests will need</r>
<r t="826.37">well that response for each unit test believe modifying afterwards to make a list id</r>
<r t="831.21">is the same</r>
<r t="832.48">which is something i haven't worked out how to fix yet</r>
<r t="836.92">probably isn't too hard</r>
<r t="839.01">similarly you go from the time stamps if you have H T P response which</r>
<r t="843.66">includes time stamps well in the body or in that is a nice it up</r>
<r t="847.99">to choice while and then you run test against it next month it's on some</r>
<r t="851.53">so gonna get acetate and i could cause problems in some cases</r>
<r t="856.08">again i think is work around</r>
<r t="859.58">and then also if you may detest against cancellation the messages the current way of</r>
<r t="863.5">will be noticed that race problems knots</r>
<r t="866.02">particularly great</r>
<r t="869.68">and needs a bit of work</r>
<r t="873.14">so currently this work is being done in the G data and i haven't yet</r>
<r t="877.94">split up into separate project i'm in the process of doing that and it'll be</r>
<r t="881.36">committed to get doris shortly</r>
<r t="884.98">sorry please on other people can start using it</r>
<r t="889.1">there's a lot of potential running standard error responses way like return an error five</r>
<r t="894.95">hundred or narrow for a for or whatever and it be good to implements</r>
<r t="900.39">some kind of easy support for that in they</r>
<r t="902.88">the testing code so that every point code uses it doesn't have to read that</r>
<r t="907.62">and goals need to what of the libraries</r>
<r t="911.78">so that was</r>
<r t="914.39">representation of it and also construct a bit of a discussion about this because it's</r>
<r t="918.45">an area when i'm can improve a lot basically most of a networking code websites</r>
<r t="922.96">is good is</r>
<r t="924.19">effectively untested that lines so</r>
<r t="927.26">this is a like a brief implementation of my ideas and i'm sure there's a</r>
<r t="932.02">lot of stuff can be added an improved</r>
<r t="934.7">and i'd welcome any suggestions people have</r>
<r t="937.67">well questions</r>
<r t="951.42">i do you deal with the be catching a bit encrypted connections</r>
<r t="958.14">as in H T us encryption</r>
<r t="961.75">catching</r>
<r t="964.45">well if i understood well the moat server cash the request</r>
<r t="969.64">yes that catches the H T P requests so actually yes</r>
<r t="976.38">packaging of that this is not don't within the tries postal remote server has its</r>
<r t="982.43">own dummy certificates and K which you have to commit to get and then you</r>
<r t="988.67">also have to model for your point code to say no don't districts of course</r>
<r t="993.24">in checks we so there are being work that for that kind of like so</r>
<r t="999.18">you've done some work in yes i mean would you know to use it H</r>
<r t="1003.02">T yes and also working point obviously you modifications district see a checks would be</r>
<r t="1009.53">the okay like and should never be used in production but</r>
<r t="1012.82">this is a few lines</r>
<r t="1027.46">so i wanted to ask you to will who are offering some kind of staging</r>
<r t="1032.66">services like to just it on production servers or</r>
<r t="1038.69">is there something else</r>
<r t="1041.48">so i don't know about anything else but giggle don't have testing service they have</r>
<r t="1046.02">an online api playground which is web only when you can talk in requests on</r>
<r t="1051.49">a web page and test them out but that's mostly documentation thing so what the</r>
<r t="1057.27">test cases that i have run against productions others and that's what you run into</r>
<r t="1060.83">these problems with and request limits and</r>
<r t="1063.98">accounting not so</r>
<r t="1065.82">and it would be nice if they provided</r>
<r t="1068.5">playground sins a staging service</r>
<r t="1071.84">like that</r>
<r t="1081.62">no questions okay so because will be upon victorious hopefully in the next day at</r>
<r t="1088.78">the moment it's in the G data in the tests directory and wants to take</r>
<r t="1093.22">a look and or controlled we have to is about me</r>
<r t="1097.01">thoughts you have so thank you much</r>
<r t="1099.91">thank you</r>
</data>
