Automatización Unit Testing Javascript
-
Upload
tomas-corral-casas -
Category
Technology
-
view
2.419 -
download
2
description
Transcript of Automatización Unit Testing Javascript
![Page 1: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/1.jpg)
1/44
![Page 2: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/2.jpg)
AUTOMATIZACIÓN UNIT TESTING
JAVASCRIPT
Tomás Corral
2/44
![Page 3: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/3.jpg)
3/44
![Page 4: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/4.jpg)
EVOLUCIÓN DE LAS PRUEBAS EN JAVASCRIPT
JAVASCRIPTNATIVO
HERRAMIENTASDE
DESARROLLO
MOSTRARERRORESEN CAPAS
LIBRERÍASDE
TEST UNITARIO
TESTDISTRIBUIDO
4/44
![Page 5: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/5.jpg)
HERRAMIENTAS
• JsTestDriver• Sinon.js• Jenkins
5/44
![Page 6: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/6.jpg)
6/44
![Page 7: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/7.jpg)
TEST RUNNER
7/44
![Page 8: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/8.jpg)
8/44
![Page 9: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/9.jpg)
ADAPTERS
9/44
![Page 10: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/10.jpg)
PLUGINS IDE’S
10/44
![Page 11: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/11.jpg)
11/44
![Page 12: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/12.jpg)
12/44
![Page 13: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/13.jpg)
SPY
13/44
![Page 14: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/14.jpg)
SPYFunción / Método no existente
14/44
![Page 15: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/15.jpg)
SPYFunción / Método existente
15/44
![Page 16: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/16.jpg)
STUB
16/44
![Page 17: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/17.jpg)
STUB
17/44
![Page 18: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/18.jpg)
MOCK
18/44
![Page 19: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/19.jpg)
MOCK
19/44
![Page 20: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/20.jpg)
useFakeTimers
20/44
![Page 21: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/21.jpg)
useFakeTimers
21/44
![Page 22: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/22.jpg)
useFakeXMLHttpRequest
22/44
![Page 23: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/23.jpg)
useFakeXMLHttpRequest
23/44
![Page 24: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/24.jpg)
fakeServer.create
24/44
![Page 25: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/25.jpg)
fakeServer.create
25/44
![Page 26: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/26.jpg)
26/44
![Page 27: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/27.jpg)
27/44
![Page 28: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/28.jpg)
Integración Continua
28/44
![Page 29: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/29.jpg)
29/44
![Page 30: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/30.jpg)
30/44
![Page 31: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/31.jpg)
Aumentarla calidad del
código31/44
![Page 32: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/32.jpg)
32/44
![Page 33: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/33.jpg)
32/4333/44
![Page 34: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/34.jpg)
Warning! JSLint will hurt your feelings.
34/44
![Page 35: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/35.jpg)
Programar
+
HARNESS
35/44
![Page 36: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/36.jpg)
CONFIGURACIÓNSERVIDOR
UNIT TESTING
36/44
![Page 37: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/37.jpg)
2Gb RAM
¿Están escuchando todos los navegadores? ¿Hay algún servidor bloqueado?
Reiniciamos todos los navegadores: Internet Explorer
Reiniciamos todos los navegadores: Firefox
:XXX1:XXX2
:XXX3:XXX4
:XXX5:XXX6
:XXX7:XXX8
:XXX9:XX10
:XX11:XX12
5 min
2 horas
4 horas
Al lanzar los test
Scripts
Balanceo de carga de servidores. ¿Que servidor queda libre?
37/44
![Page 38: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/38.jpg)
COLABORA
38/44
![Page 39: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/39.jpg)
39/44
![Page 41: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/41.jpg)
http://bit.ly/softhire
41/44
![Page 42: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/42.jpg)
42/44
![Page 43: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/43.jpg)
Qunit adapter : http://code.google.com/p/js-test-driver/wiki/QUnitAdapter
Jasmine adapter : http://github.com/ibolmo/jasmine-jstd-adapter
JsTestDriver : http://code.google.com/p/js-test-driver/
Sinon.js : http://sinonjs.org
SVN : http://subversion.tigris.org/
GIT : http://git-scm.com/
Test Harness : http://en.wikipedia.org/wiki/Test_harness/
Pre-commit hooks : http://wordaligned.org/articles/a-subversion-pre-commit-hook
Balanceo de carga : http://es.wikipedia.org/wiki/Balance_de_carga
43/44
![Page 44: Automatización Unit Testing Javascript](https://reader034.fdocuments.net/reader034/viewer/2022051412/549a4849b47959564d8b597c/html5/thumbnails/44.jpg)
Images disclaimer: All the images and photographs used in this presentation are of their legal owners.Images found using Google Images on:
http://muengg.com/blog/http://60secondmarketer.com/blog/2010/08/30/20-questions-to-help-you-differentiate-your-brand/http://crashtestdummy.com.au/wp-content/uploads/2010/12/crash-test-dummy-awards.jpghttp://www.collution.com.ar/http://techcenterpc.blogspot.com/http://www.wallpaper1080hd.com/desk/1920x1200/2010/0718/4340.htmlhttp://jenkins-ci.org/http://comecocos.com/2011/es-imposible-viajar-en-el-tiempo/the_time_machine/http://luauf.com/category/programacion/ajax/http://www.movies-wallpapers.net/Wallpaper-Austin%20Powers%20In%20Goldmember/Austin%20Powers%20In%20Goldmember-49.jpg.htmlhttp://www.masoportunidades.com.ar/aviso/6173058-el-super-agente-86-todas-las-temporadas-completas-disponible-en-capital-federalhttp://www.sololistas.net/los-mejores-james-bond.htmlhttp://sinonjs.orghttp://www.pixalonstudios.com/index.php?page=games&game=dummieshttp://code.google.com/p/js-test-driver/http://www.shutterstock.com/index.mhtml?language=es&gclid=CMyP-5-M5a4CFZARfAodnBArvwhttp://www.wordans.com.au/lego+designshttp://www.moebiusonline.eu/fuorionda/RobotCrashTest.shtmlhttp://www.latostadora.com/disponibilidad_dibujo/crash_test_dummies/57175http://subversion.tigris.org/http://git-scm.com/https://www.pyro-tection.com/rescueshop/catalog/index.php/cPath/59http://www.disfrazmania.com/seccion/Todo-para-piratas/articulo/Garfio
44/44