Bestand wählen
Merken

The Unofficial, Official Ember Testing Guide

Zitierlink des Filmsegments
Embed Code

Automatisierte Medienanalyse

Beta
Erkannte Entitäten
Sprachtranskript
in the in the the in the the and you have the and so do I. ago so
I I and it that you guys about the unofficial and the testing and I I do is start off with 2 conventions and the first one is I'm really nervous and I've never done this before so I need everybody to this in the you would be my the you know what to do now I The 2nd part is is that of I've only been testy Lamba applications for about 3 watts and from what I've been hearing talking to people I think that's uncommon old photino which which is great for me so little about myself of my name is
Eric Berry II to encode a very I have to in the past that Kavner but that became really hard to tell people what it meant so I switch to put a very I did have his cabinet I work structure which is the best company in the world work working as registered working their contact any of us we are also and I run the Amboseli community so linked imbecilic city not 1 more thing is I've been getting a lot of people coming up to me and saying did you know look like you have talked and and that is to on you do you know what like but you have a if you know how how to study the homeless in their everyday and sees that that's what I see so screw you guys on the heart get back this is about me those by you guys
and I really come to care about all of you over the last few days I've I've I've gained a sense of family and and it kind of has added a little bit more depth to where 1 resounds day so we all as amber and radios we wanna be good right we want
be so we wanna be X so developers you wanna have if we want irresponsible we also
won't be productive and to be honest that's why we chose right is makes us the most productive we can be so on top of that we wanna
be confident in our code and along with confidence word I need to distance that it it takes a little bit on our part show about a year ago beauty about a year ago we had a visit from bring a cost right so he
came anything that everybody all by the way when Photoshop beside inhabited his beard so I could have so he can give us and the testing and right along that number testing died was born
and that was roughly about a year ago so I
want to say Happy Birthday and thank you to everybody who help on that we had a new round of applause to all those people who did work on the 5th and FIL how we test I want
cover 2 main aspects so again I told you that about 3 months ago at low about a month and a half ago 2 months you as nervous stock and Stephen the part of when I sniffer talkers MIT presented anything like this is what I really want to learn about so probably spend about 14 hours a day and I gave 50 no joke I gained 15 pounds presenting for preparing for this talk so but I learned a lot and so my goal is to provide this information to you guys I wanted like a list because right now as you can see on this on
this this is this is what we have for testing and to me that wasn't much of star is great but it's not much of a story so the 1st part of
testing is assertions known assertion is testing the state of your code so it is that the OK so assertions let us test the state of our code and Amber has chosen as its the bold assertion library given and unit looks
like this there is a module in the module we have a set up and tear down and we have our tests of all the model meant in that set up and tear down we call code that will run before and after and that's what we call the call that X. so you know also provides assertions these assertions achieve all seen before the very common across all the different languages so we get assertions and some of the sewing under make a lot of assumptions that under under assumed that I can read all of your minds and 1
of the things that you might be thinking is this so Amber has this weird relationship with K. Ono with that where I mean you can just see them like frolicking down the fields them holding hands and and what's sad is the
Jasminum Altaville really left that they're not they're like all so I here to dispel this myth so here's the fact this
the filter so embers paving the way the paying the habitat of unit but were not excluding others but this talk and you can see that currently where we're at the happy path is led by
Q U we need so they will be awarded to high no like this is although my iPad by the way so I have teachers will be available to so members providing habit that using humor but it's been built no way that we can create other adapters so we're still figuring out what something hours saying OK but splits create a reference so Backus certain this happened for the testing
but the other half is a boon helpers right I'm units
under the stretch this far you see that guy all over the place but so helpers helpers guide our application to a state where we want for research swear helpers and we have a research so here's an
example of an EMBA test and evidence you know we starts a set of protest instead of protesting there's 2 things that happen it differs the readiness of the application and also sets routers location and so that makes it so we can we want as without having you weird stuff then we call inject test helpers what I'll do is I'll inject all of these helpers error bread and all the other people brought component available on the Windows still so we can use them then we have our test so you can see helpers we have couple helpers you're among the top bottom right now but if you have a couple Helibras men inside there we have a couple of assertions and that is exactly happened so to
Amber provides helpers and the test provides helpers Acuna provides assertions so back to bring to us he brought a 6
helpers the visit fill and
click and then find in Cuba and the 2 type of helpers
that these provide so we have a group of asynchronous offers in these helpers what they do is they will wait for the preceding helpers were triggered finished for they run and then so it's kind of like a at you then we have our synchronous helpers run instantly no we have as we're helper over here and the come the he's not any weirder than the other guy but but as we have an and then open and then what we'll do is it will wait for all of the proceedings asynchronous helpers to complete for so it's Maizuru hold up here right now in so here's an example of a test that a
China include all by couldn't some not to talk about you that I had a siting units thinking that maybe grumpy that's been make big like a negative but not negative so I I will not talk about you right in so we have a test where we 1 avenue posts we visit the URL and we feel an input field then we click a button and we call and then which is a weird helper the way Frolov those preceding the Finnish and once that's done we go inside and former certain inside assertion we call asynchronous operations and hope to be able to get that information so is everybody with me so far it is not hard so far this is testing amber testing is and tell me who has just going through the mind when I do this and and thing why then that so II and under the Moses Fund OK so now understand importance helpers were they divorced what happens we want create custom we
can do that so customers there's 2 types of help as we talk about the citizens secrets this is how we
create synchronous help very simple it's enroute test that register helper inside here you can see were registering help role that will have a look up the router and then get the URL from you know that basically this is the complicating could you have to do to get current world so you may have a helper like that in your code that does that so here is a way that we can create an asynchronous helper and 1 of the tests that I had the right I have a a form where I want to submit the form but I don't have a submit button because it's a it's a search so like how it's meant that so I created a asynchronous test helper which allows me just passing the selected then I'll pass along you that's that's how you create a asynchronous sulfur and with the asynchronous helper or any help as when you register help read I remember that you still have to call Apple injector stoppers because it will not register and in the won't be part of your test sleep until you do that again so if you add more young you so so we we got everything pretty pretty good so again and make assumptions what you guys are thinking z None of the questions and 819 part over not just getting so is that it everything I shown you so far in bits and pieces has been presented on 4 there's nothing so I want to talk to you about and a 1 comma decimal 5 this summer editions that were added in number 1 comma decimal 5 really excited talk but again with
respect you that's this talk is about it's about us it's about making it so that we can provide the best code possible and have the best experience possible them this is about us making amber the best so for all I hear Dubow to thinking thinking here comes
Robert Jackson because but of the people you know and it was lot so I like to call these helpers the next generation of polymers
2nd it was actually a trigger event we have the right name from path incurred you so China events pretty easy but is actually used
already in the back as a private method notes exposed and 1 comma decimal 5 you can currently is in beta trigger event takes 3 arguments the first one being the selective site 1 being events and then the 3rd 1 being any additional arguments you might it in the visual context United States they were using here current rout name so I put on the very bottom you decide what the way he used to have to go so I figured I would probably the best way to explain like this is often because that's right same thing with the current path and also we have her new world so you remember I show the example and registering a the asynchronous helper with pre-Euro well I did not just make yes they cool that hot now days so yet some make another search in here whom a
lot of the guys might well some have might be taken the so
so hot right now but the people who left left see the
movie those who haven't had so is
and where or there's a talk given last
week them out Review Conference and
Julian City on I apologist by this enough gave a presentation require that aggression test prove your communication unit has proven your code so we talk about the 1st part how innovations as previous communications and to do that I want to show an example of that
hopefully as a visual thing that triggers a feeling 1 of my being the cucumbers but may not have the other thing is that this is a flow right so oftentimes we call this
BDD and to build a test as we use
immigration so let's go back to this in mind we convert this the code of so we have
an example where we visit the URL we fill in the search field we type in a filter and then we assert that the results only show what we're doing right something right so what we look at what Smith doubling the deeper say of you are actually doing this in 2 spots so doing the same thing for users as we are are for approach so let's delve deeper and find out what we're doing in the so inside the coat of look both controllers were extending the app filterable array mixing well we got to test testing 1 thing so let's take a look and see OK they're focused on the next slide so now so the rate for a array of or filterable array next so you can see what happens is on the controller or on a template for that controller would filter text changes will trigger this now the problem that we have is that this is very difficult test in isolation right now we would have to write and immigration test for every part and we would have to basically guide the application at that point and the like the whole experience and count the number of list items on but is that really what we're testing no testing that were testing and makes in on this so that's we call unit testing in unit testing
is where we prove our code Sinai make a confession you guys and I think a lot of you already know this if thank you he said that she is units it's not fun an explain why it's not from the 1st to understand what's the point yet understand a little bit more about it and lordy you might this this might be this might be a recap for you let's talk about a container and how work so let's say this is and convey where this is application it contains controllers routs used all this different stuff the container is what holds all of
us so there's been a lot of talk recently about other resolvent to meet I'm a visual guy I have to understand this and so the resolver find stuff the fine fine stuff in confusion right so who's the 1 person in the world that you know always knows where everything is in the the whole wide world to so
we have a resolved right know the problem is on every single 1 of our
tests we are dumping the entire container on top so how do we test in isolation we have all of this stuff on top of the so again this is about you guys by way thank you for
everybody for securing the when you take a photo last night was a blast and thank you for the sponsors who did that as it was arson cell and he has been good it comes cause here comes right
phone to class and step comic lover he's like there's only the 1 headed guy so all is using so ambit
unit is a library written by a bunch of very smart people not myself and what this does is it allows you to perform unit test
without loading the entire contain it is
inspired by our respect and it's package
for all of these different but the instead although right commandeers and in in a global GlobalSign globalism water right so if you think about like how do you test applications using levels it's hard because everything's on the app namespace well guess what they figured out Ryan's often enough to let me presented to you and said it himself I thank you right the best thing is it easy everything I've shown you so far is not hard there's a stigma random attacks and it's hard it's not the problem is it's unknown so I wanna share with you the story of how to do this so every example and show you there's image has and I didn't wanna S that's so every single day has been you see is a functional version of a unit test you can run right now so let's 1st talk about said
center for global disease when you include and the key unit gives you a global object called the Q and you has a function called globalizing no take all of those helpers and put them onto the Windows still so there's that slight whichever at the click to right now here is a resolvent
also requires results and if you are running it but in global you have to set the resolver display if you don't it will conflict with Member death oral click conflicted some examples of models are a little bit easier the only differences the stadium for the resolve on existing resolvent yes do with this is yes 6 example so but so it's not about 1 it
provides so is that of providing test helpers I like to call model so now back to that site worry had all of the you know the sad Jasmina's said of MoCA we have Jasminum OK here but what we're doing is we're providing the happy path were providing a way that can be replicated and other frame of the testing things so we have model for we have model for component and we have model for model now before you know those of unexplained how this works the wide support so module for would replace
module on your key unit test and the 1st argument be whatever the result or needs to look it up so those in a model for that passes the resolver the resolver looks over the
resolver looks so sorry right here we have this little despite so I'm try and research an image that represents an isolated contain what better represent isolated container than a sad-looking bowl on the back of living there hookup so the model for has its own isolated contained it contacts resolver it possible losses of hey resolver I need you to pull this off of the container
that will pull it back into this isolated container and now in each 1 of our tests we're going to have a function called subject in this function calls it aliases the create on whatever factory were tested so in this case we have rout indexed so temple the right that factories were going to create a with this that subject now we can test that way extremely simple and what's the best part about it is at the very end a dumpster contain so we have a very nice little sandbox container so yeah let's let's hear those guys at the work on the had enough of of alone will get from
so module for works this way you pass the full name description callbacks in addition to the normal 7 teardown of callback can also passive and needs I will show an example that so how unit test
rats very simply haven't index trout in
this it's the most basic of models returns red-green-blue juco model for out index in our test it's a bar out it was this index and now we can test that function and nothing else is loaded but some its results are a
really used the script It's resolver comes back provides a set subject and that's that's we have research and do them book controllers now we have a control is a little bit different the
set so we have a controller of your application control which contains the user and we have a profile controller which has a dependency on the application show how do we test the profile controller and still bring in that dependence well that's when he comes in so here's a test so we have some
model for with profile controller as our name and then we pass a needs array which says hey they mumbled go the the rest of these 2 and bring back in August there's no evidence in the contains 2 objects so it returns back and now we have this not subject which Wilkes which will again it aliases a crate of whatever we're testing and then you could see we actually the exact same
way and now we can perform our tests really really simple module for
component this is really cool so instead of passing on the full name that you would you pass in the name that you would use in your handlebars whatever would be so the here we have a pretty
color component and in this you can see that we are we have a style that changes based on the color of the past so here's a test and it's we
pass a pretty color which is the name the components because the resolver the Solver comes back and says OK now you have this available and when you call this a subject it will create an instance of that 1 but what also happens is resolvable blot look and see is there also the worst temple the same name so it'll load for so you don't need to do any of that stuff that we come in and you can
see we call a we can perform certain up the 1st time he called but dollar it will render that your view there's also this that append which is the same thing so that's we tested now John Paul's he gave
me a challenge so if you guys are interested the the component that he wrote yesterday and showed this is full test coverage of component completely isolated and they sprinkle module 4 model same thing you
given the name on every year the name and here's a here is a model
same thing with testy given the name that would be used in the start sort of find whatever it goes out it
comes back now the difference here is what I call this the subject it aliases great the same thing you know and now we can go there and at the very end it dumps the isolating thinner out so it's
completely up to you can get us right now this is the oral and you can install it with Bauer Install ambit unit it's Artie's it's already included in and rapped it's a part of embassy a lie and there is 1 more
thing were completely redoing the testing at
so that is a link to
the the pull request have a bunch of
things and like the dominant and hope they will have a single
I wanna say thank you know people well me prepare and I wanna say sorry to those who I meant costly about it as
someone gives special things out all the spouses the partners all of those people who when you work on open source and you're out your significant other doesn't seem money coming in for it they they're like why and I heard somebody say that when you work open source your spouse leases you out and so I wonder personally think all of those people that do that i it's amazing and my wife said you cannot go to another conference for a long time so thank you for making this 1 gets on method the yeah me questions the that's
not photoshopped this not ocean yes the the the poster in my room in the car that any options factory grow that are you talking about being able to the mark out like API responses so something you that run on you and it's it's it's that type that is being built an embassy lights are a part of the there are different ways to do it it's I don't think there's any fixed way yet but yeah there is there are many ways to do that but that's more along the lines of I I plan there's there's a part in the guide which is testing at Saint Hoare and I'd like to show you how to do that using different methods that will no other questions yes but yet and I think I don't know the answer to the 2nd part and I've been doing everything beta 1 comma decimal 5 as far as the a test and the data OK so the question was what's early is really member and answer is 1 point 3 in the other part is there's a test and the data the the model for model specifically for so any other questions yes absolutely so how many questions that that yes I believe it pulls in the real control of the container the past so you would set you would set resolver to be the existing manner that will pull the controller of that would be the real joy as far as they understand yeah back there just thank you thank you the I think some of you in the in the in the form of this thing and and and and the the the the the the the the the and you can use it in the of my him
Videokonferenz
Softwaretest
Softwaretest
Elektronischer Programmführer
Mereologie
Kartesische Koordinaten
Bit
Rechter Winkel
Familie <Mathematik>
Datenstruktur
Bit
Bereichsschätzung
Rechter Winkel
Mereologie
Wort <Informatik>
Softwareentwickler
Code
Softwaretest
Leck
Objekt <Kategorie>
SCI <Informatik>
Desintegration <Mathematik>
Default
Zahlenbereich
Unrundheit
Tablet PC
Sichtenkonzept
Zeitrichtung
Komponente <Software>
Lemma <Logik>
Softwaretest
Rechter Winkel
Ruhmasse
Routing
Modelltheorie
Softwaretest
Kontrollstruktur
Desintegration <Mathematik>
Mereologie
Mailing-Liste
Information
Sichtenkonzept
Überlagerung <Mathematik>
Leck
Softwaretest
SCI <Informatik>
Desintegration <Mathematik>
Default
Tablet PC
Sichtenkonzept
Code
Template
Komponente <Software>
Objektmodell
Softwaretest
Einheit <Mathematik>
LASER <Mikrocomputer>
Programmbibliothek
Flächeninhalt
Routing
Modelltheorie
Gammafunktion
Aggregatzustand
Softwaretest
Informationsmodellierung
Softwaretest
Datenfeld
Funktion <Mathematik>
Gruppenkeim
Formale Sprache
Systemaufruf
Gleichheitszeichen
Modul
Code
Modul
Einheit <Mathematik>
Softwaretest
Einheit <Mathematik>
Rechter Winkel
Softwaretest
Softwaretest
Funktion <Mathematik>
Menge
Minimum
Injektivität
Bildschirmfenster
Router
Kartesische Koordinaten
URL
Homepage
Fehlermeldung
Aggregatzustand
Softwaretest
Datentyp
Gruppenkeim
Softwaretest
Nichtlinearer Operator
Datenfeld
Einheit <Mathematik>
Funktion <Mathematik>
Datentyp
Information
Ein-Ausgabe
Hilfesystem
Softwaretest
Bit
Synchronisierung
Zahlenbereich
Systemaufruf
Gleichheitszeichen
Kontextbezogenes System
Code
Bildschirmmaske
Softwaretest
Rechter Winkel
Mereologie
Router
Hilfesystem
Normalvektor
Generator <Informatik>
Rechter Winkel
Ereignishorizont
Router
Parametersystem
Web Site
Betafunktion
Indexberechnung
Routing
Strömungsrichtung
Kontextbezogenes System
Gleichheitszeichen
Ereignishorizont
Bewegungsunschärfe
Funktion <Mathematik>
Rechter Winkel
Gamecontroller
Visualisierung
Softwaretest
Telekommunikation
Softwaretest
Einheit <Mathematik>
Einheit <Mathematik>
Desintegration <Mathematik>
Code
Mereologie
Telekommunikation
E-Mail
Kombinatorische Gruppentheorie
Code
Softwaretest
Desintegration <Mathematik>
Digitalfilter
Binäres Entscheidungsdiagramm
Datenfluss
Resultante
Bit
Punkt
Komponententest
Desintegration <Mathematik>
Mathematisierung
Zahlenbereich
Kartesische Koordinaten
Code
Softwaretest
Einheit <Mathematik>
Code
Gamecontroller
Autorisierung
Datentyp
Softwaretest
App <Programm>
Filter <Stochastik>
Template
Telekommunikation
Mailing-Liste
Routing
Digitalfilter
Bitrate
Web log
Rechenschieber
Datenfeld
Funktion <Mathematik>
Einheit <Mathematik>
Mereologie
Gamecontroller
URL
Rechter Winkel
Resolvente
Softwaretest
Digitale Photographie
Rechter Winkel
Physikalischer Effekt
Zellularer Automat
Komponententest
Einheit <Mathematik>
Einheit <Mathematik>
Klasse <Mathematik>
Programmbibliothek
Softwaretest
NP-hartes Problem
App <Programm>
Namensraum
Komponententest
Gemeinsamer Speicher
Wasserdampftafel
Versionsverwaltung
Randomisierung
Kartesische Koordinaten
Bildgebendes Verfahren
Übergang
Objekt <Kategorie>
Lineares Funktional
Bit
Subtraktion
Informationsmodellierung
Einheit <Mathematik>
Modul <Datentyp>
Einheit <Mathematik>
Namensraum
Datensichtgerät
Default
Bildschirmfenster
Resolvente
Softwaretest
Resultante
Parametersystem
Web Site
Komponententest
Rahmenproblem
Indexberechnung
Modul
Informationsmodellierung
Einheit <Mathematik>
Resolvente
Zusammenhängender Graph
Schlüsselverwaltung
Modul
Einfügungsdämpfung
Informationsmodellierung
Rechter Winkel
Indexberechnung
Resolvente
Bildgebendes Verfahren
Modul
Softwaretest
Lineares Funktional
Addition
Komponententest
Indexberechnung
Routing
Deskriptive Statistik
Softwaretest
Funktion <Mathematik>
Einheit <Mathematik>
Rechter Winkel
Mereologie
Faktor <Algebra>
Addition
Normalvektor
Cliquenweite
Modul
Softwaretest
Resultante
Lineares Funktional
Informationsmodellierung
Softwaretest
Einheit <Mathematik>
Automatische Indexierung
Datenmodell
Indexberechnung
Modul
Softwaretest
Bit
Menge
Gamecontroller
Gamecontroller
Kategorie <Mathematik>
Profil <Aerodynamik>
Resolvente
Skript <Programm>
Kartesische Koordinaten
Menge
Softwaretest
Objekt <Kategorie>
Informationsmodellierung
Einheit <Mathematik>
Gamecontroller
Gamecontroller
Profil <Aerodynamik>
Softwaretest
Komponente <Software>
Softwaretest
Funktion <Mathematik>
Einheit <Mathematik>
Green-Funktion
Kategorie <Mathematik>
Farbenraum
Zusammenhängender Graph
Addition
Kantenfärbung
Normalvektor
Cliquenweite
Modul
Komponente <Software>
Sichtenkonzept
Einheit <Mathematik>
Last
Resolvente
Zusammenhängender Graph
Kantenfärbung
Gleichheitszeichen
Instantiierung
Softwaretest
Informationsmodellierung
Datenmodell
Zusammenhängender Graph
Addition
Operations Research
Cliquenweite
Normalvektor
Modul
Zeichenkette
Subtraktion
Einheit <Mathematik>
Einheit <Mathematik>
Default
Mereologie
Datenmodell
Installation <Informatik>
Lie-Gruppe
Quick-Sort
Softwaretest
Primzahlzwillinge
Binder <Informatik>
Open Source
Softwaretest
Informationsmodellierung
Bildschirmmaske
Punkt
Betafunktion
Datentyp
Endogene Variable
Mereologie
Gamecontroller
Resolvente
Faktor <Algebra>
Elektronischer Programmführer
Gerade
Konfiguration <Informatik>

Metadaten

Formale Metadaten

Titel The Unofficial, Official Ember Testing Guide
Serientitel EmberConf 2014
Autor Berry, Eric
Lizenz CC-Namensnennung - Weitergabe unter gleichen Bedingungen 3.0 Unported:
Sie dürfen das Werk bzw. den Inhalt zu jedem legalen und nicht-kommerziellen Zweck nutzen, verändern und in unveränderter oder veränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen, sofern Sie den Namen des Autors/Rechteinhabers in der von ihm festgelegten Weise nennen und das Werk bzw. diesen Inhalt auch in veränderter Form nur unter den Bedingungen dieser Lizenz weitergeben.
DOI 10.5446/35000
Herausgeber Confreaks, LLC
Erscheinungsjahr 2014
Sprache Englisch

Inhaltliche Metadaten

Fachgebiet Informatik
Abstract Ember is a framework for creating ambitious web applications. Ambitious applications need tests. Although many find it difficult to weed through the various sources of information, it is possible to thoroughly test your Ember application today. We've aggregated the collective experiences, trials and errors regarding testing Ember applications from leaders in the Ember community to create The Unofficial, Official Ember Testing Guide. We'll walk through it live, cover specific testing scenarios and solve real testing dilemmas. You'll leave this session knowing what to test, how to approach it with confidence, and the resources available to fall back on when you need it.

Ähnliche Filme

Loading...
Feedback