ng-conf 2014

Testeando aplicaciones AngularJS con Protactor

Julie Ralph  · 


HTML (pincha para descargar)



Extracto de la transcripción automática del vídeo realizada por YouTube.

good afternoon almost towards the end sad excited ready for more prices so my name is Julie I work at Google and I'm going to be talking about protractor which is the shiny new end-to-end testing framework for angular so first of all Who am I um might

not have seen me before I'm a software engineer and test at Google uh look I wasn't backing methods that's great um I work at the Seattle office and you can think of me as a 20% plus plus plus team member with angular um I plus plus plus plus plus

so I got into angular working with the project at Google that was associated with double-click so they started using angular pretty early and we had some issues with the angular scenario runner testing framework and so I had the opportunity to start working

on a new framework and my boss gave me the okay and the angular team gave me the okay so I've been running with it since then replacing the angular scenario Runner with protractor um a lot of people asked what su T's do at Google and I think that's

kind of important to understand where we're coming from so Google's philosophy is that devs should test their own code and that means you write your own unit tests preferably doing some sort of test-driven development but you also write your own end-to-end

tests if you're changing big features or your front-end dev and this means that the role of the sut is setting up systems that help devs write tests and help devs be more productive so I come at testing from the perspective that if you're writing the

code you'll probably be writing the tests and these are programmers writing tests and they know what they're doing but they don't want to be worrying about the infrastructure very much alright so what's the big idea around protractor first

of all what's the big idea around end-to-end testing for me testing is about gaining confidence that your code does what you think your code should do and if you give me an application in a set of really well unit tested modules and say we're going

to put this together I will tell you but that will not work I have no confidence that your application is going to run and to end without some sort of testing that all the parts are going to fit together so end-to-end testing is about how would a user see

this does my back-end communicate with my front-end am i ready to release this code it's not a replacement for unit testing but it's a really nice complement to unit testing and the main system that protractor is built on top of is webdriver so that

probably deserves a slide webdriver is a kind of complicated system it's working towards becoming a web standard so it's a really solid foundation to build off of and when you run webdriver you've got a couple of processes going on three actually

the first is your test process in protractors case it's a node application so this is just node but there's also bindings for Java and Python and you may have seen things like capybara and then there's the webdriver process which is some sort of

standalone server webdriver is also called selenium I use them interchangeably there are historical differences and that's what's actually running your real browsers with some sort of add-ons that help to drive native events so you can run Chrome drivers

the one that drives Chrome Firefox driver you can interpolate from there and then finally that's a real browser so it can connect to anything so your application could be something that's running on localhost or it could be a production instance or

a staging instance of your app that's shared somewhere so the idea behind webdriver is you're testing like a user you're using native events and this gets around a lot of the limitations that the angular scenario runner had because it was running

[ ... ]

Nota: se han omitido las otras 1.792 palabras de la transcripción completa para cumplir con las normas de «uso razonable» de YouTube.