Enviar búsqueda
Cargar
Javascript Unit Testing
•
1 recomendación
•
1,482 vistas
T
Tom Van Herreweghe
Seguir
These are the slides I presented at the PHPBenelux 2012 conference.
Leer menos
Leer más
Tecnología
Educación
Denunciar
Compartir
Denunciar
Compartir
1 de 53
Descargar ahora
Descargar para leer sin conexión
Recomendados
Painless JavaScript Testing with Jest
Painless JavaScript Testing with Jest
Michał Pierzchała
Testing javascript in the frontend
Testing javascript in the frontend
Frederic CABASSUT
jUnit
jUnit
sundar22in
Unit Testing with Jest
Unit Testing with Jest
Maayan Glikser
Unit Testing - The Whys, Whens and Hows
Unit Testing - The Whys, Whens and Hows
atesgoral
Understanding JavaScript Testing
Understanding JavaScript Testing
Kissy Team
Testacular
Testacular
James Ford
AngularJS Unit Testing w/Karma and Jasmine
AngularJS Unit Testing w/Karma and Jasmine
foxp2code
Recomendados
Painless JavaScript Testing with Jest
Painless JavaScript Testing with Jest
Michał Pierzchała
Testing javascript in the frontend
Testing javascript in the frontend
Frederic CABASSUT
jUnit
jUnit
sundar22in
Unit Testing with Jest
Unit Testing with Jest
Maayan Glikser
Unit Testing - The Whys, Whens and Hows
Unit Testing - The Whys, Whens and Hows
atesgoral
Understanding JavaScript Testing
Understanding JavaScript Testing
Kissy Team
Testacular
Testacular
James Ford
AngularJS Unit Testing w/Karma and Jasmine
AngularJS Unit Testing w/Karma and Jasmine
foxp2code
Understanding JavaScript Testing
Understanding JavaScript Testing
jeresig
Angular testing
Angular testing
Raissa Ferreira
Javascript tdd byandreapaciolla
Javascript tdd byandreapaciolla
Andrea Paciolla
Сергей Больщиков "Protractor Tips & Tricks"
Сергей Больщиков "Protractor Tips & Tricks"
Fwdays
JavaScript TDD with Jasmine and Karma
JavaScript TDD with Jasmine and Karma
Christopher Bartling
Qunit Java script Un
Qunit Java script Un
akanksha arora
JavaScript Unit Testing
JavaScript Unit Testing
Christian Johansen
JavaFX8 TestFX - CDI
JavaFX8 TestFX - CDI
Sven Ruppert
Unit testing on mobile apps
Unit testing on mobile apps
Buşra Deniz, CSM
Intro to Unit Testing in AngularJS
Intro to Unit Testing in AngularJS
Jim Lynch
Testing with VS2010 - A Bugs Life
Testing with VS2010 - A Bugs Life
Peter Gfader
JavaScript Unit Testing
JavaScript Unit Testing
Christian Johansen
おっぴろげJavaEE DevOps
おっぴろげJavaEE DevOps
Taiichilow Nagase
Automation testing with Drupal 8
Automation testing with Drupal 8
nagpalprachi
Advanced Jasmine - Front-End JavaScript Unit Testing
Advanced Jasmine - Front-End JavaScript Unit Testing
Lars Thorup
Quick tour to front end unit testing using jasmine
Quick tour to front end unit testing using jasmine
Gil Fink
Unit testing of java script and angularjs application using Karma Jasmine Fra...
Unit testing of java script and angularjs application using Karma Jasmine Fra...
Samyak Bhalerao
Unit-testing and E2E testing in JS
Unit-testing and E2E testing in JS
Michael Haberman
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
Ortus Solutions, Corp
Efficient JavaScript Unit Testing, May 2012
Efficient JavaScript Unit Testing, May 2012
Hazem Saleh
Test strategy for web development
Test strategy for web development
alice yang
Efficient JavaScript Unit Testing, March 2013
Efficient JavaScript Unit Testing, March 2013
Hazem Saleh
Más contenido relacionado
La actualidad más candente
Understanding JavaScript Testing
Understanding JavaScript Testing
jeresig
Angular testing
Angular testing
Raissa Ferreira
Javascript tdd byandreapaciolla
Javascript tdd byandreapaciolla
Andrea Paciolla
Сергей Больщиков "Protractor Tips & Tricks"
Сергей Больщиков "Protractor Tips & Tricks"
Fwdays
JavaScript TDD with Jasmine and Karma
JavaScript TDD with Jasmine and Karma
Christopher Bartling
Qunit Java script Un
Qunit Java script Un
akanksha arora
JavaScript Unit Testing
JavaScript Unit Testing
Christian Johansen
JavaFX8 TestFX - CDI
JavaFX8 TestFX - CDI
Sven Ruppert
Unit testing on mobile apps
Unit testing on mobile apps
Buşra Deniz, CSM
Intro to Unit Testing in AngularJS
Intro to Unit Testing in AngularJS
Jim Lynch
Testing with VS2010 - A Bugs Life
Testing with VS2010 - A Bugs Life
Peter Gfader
JavaScript Unit Testing
JavaScript Unit Testing
Christian Johansen
おっぴろげJavaEE DevOps
おっぴろげJavaEE DevOps
Taiichilow Nagase
Automation testing with Drupal 8
Automation testing with Drupal 8
nagpalprachi
Advanced Jasmine - Front-End JavaScript Unit Testing
Advanced Jasmine - Front-End JavaScript Unit Testing
Lars Thorup
Quick tour to front end unit testing using jasmine
Quick tour to front end unit testing using jasmine
Gil Fink
Unit testing of java script and angularjs application using Karma Jasmine Fra...
Unit testing of java script and angularjs application using Karma Jasmine Fra...
Samyak Bhalerao
Unit-testing and E2E testing in JS
Unit-testing and E2E testing in JS
Michael Haberman
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
Ortus Solutions, Corp
Efficient JavaScript Unit Testing, May 2012
Efficient JavaScript Unit Testing, May 2012
Hazem Saleh
La actualidad más candente
(20)
Understanding JavaScript Testing
Understanding JavaScript Testing
Angular testing
Angular testing
Javascript tdd byandreapaciolla
Javascript tdd byandreapaciolla
Сергей Больщиков "Protractor Tips & Tricks"
Сергей Больщиков "Protractor Tips & Tricks"
JavaScript TDD with Jasmine and Karma
JavaScript TDD with Jasmine and Karma
Qunit Java script Un
Qunit Java script Un
JavaScript Unit Testing
JavaScript Unit Testing
JavaFX8 TestFX - CDI
JavaFX8 TestFX - CDI
Unit testing on mobile apps
Unit testing on mobile apps
Intro to Unit Testing in AngularJS
Intro to Unit Testing in AngularJS
Testing with VS2010 - A Bugs Life
Testing with VS2010 - A Bugs Life
JavaScript Unit Testing
JavaScript Unit Testing
おっぴろげJavaEE DevOps
おっぴろげJavaEE DevOps
Automation testing with Drupal 8
Automation testing with Drupal 8
Advanced Jasmine - Front-End JavaScript Unit Testing
Advanced Jasmine - Front-End JavaScript Unit Testing
Quick tour to front end unit testing using jasmine
Quick tour to front end unit testing using jasmine
Unit testing of java script and angularjs application using Karma Jasmine Fra...
Unit testing of java script and angularjs application using Karma Jasmine Fra...
Unit-testing and E2E testing in JS
Unit-testing and E2E testing in JS
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
Efficient JavaScript Unit Testing, May 2012
Efficient JavaScript Unit Testing, May 2012
Similar a Javascript Unit Testing
Test strategy for web development
Test strategy for web development
alice yang
Efficient JavaScript Unit Testing, March 2013
Efficient JavaScript Unit Testing, March 2013
Hazem Saleh
Efficient JavaScript Unit Testing, JavaOne China 2013
Efficient JavaScript Unit Testing, JavaOne China 2013
Hazem Saleh
Mxunit
Mxunit
VIkas Patel
1 aleksandr gritsevski - attd example using
1 aleksandr gritsevski - attd example using
Ievgenii Katsan
Automated acceptance test
Automated acceptance test
Bryan Liu
Protractor framework architecture with example
Protractor framework architecture with example
shadabgilani
Web UI test automation instruments
Web UI test automation instruments
Artem Nagornyi
Automated javascript unit testing
Automated javascript unit testing
ryan_chambers
Lesson 2
Lesson 2
Andrii Trybynenko
Junit_.pptx
Junit_.pptx
Suman Sourav
From Web App Model Design to Production with Wakanda
From Web App Model Design to Production with Wakanda
Alexandre Morgaut
Slaven tomac unit testing in angular js
Slaven tomac unit testing in angular js
Slaven Tomac
Selenium
Selenium
傑倫 鍾
Beyond Unit Testing
Beyond Unit Testing
Steve Loughran
Testing basics for developers
Testing basics for developers
Anton Udovychenko
Agile Android
Agile Android
Godfrey Nolan
Integration tests: use the containers, Luke!
Integration tests: use the containers, Luke!
Roberto Franchini
Web ui testing
Web ui testing
Radim Pavlicek
Testing in JavaScript - August 2018 - WebElement Bardejov
Testing in JavaScript - August 2018 - WebElement Bardejov
Marian Rusnak
Similar a Javascript Unit Testing
(20)
Test strategy for web development
Test strategy for web development
Efficient JavaScript Unit Testing, March 2013
Efficient JavaScript Unit Testing, March 2013
Efficient JavaScript Unit Testing, JavaOne China 2013
Efficient JavaScript Unit Testing, JavaOne China 2013
Mxunit
Mxunit
1 aleksandr gritsevski - attd example using
1 aleksandr gritsevski - attd example using
Automated acceptance test
Automated acceptance test
Protractor framework architecture with example
Protractor framework architecture with example
Web UI test automation instruments
Web UI test automation instruments
Automated javascript unit testing
Automated javascript unit testing
Lesson 2
Lesson 2
Junit_.pptx
Junit_.pptx
From Web App Model Design to Production with Wakanda
From Web App Model Design to Production with Wakanda
Slaven tomac unit testing in angular js
Slaven tomac unit testing in angular js
Selenium
Selenium
Beyond Unit Testing
Beyond Unit Testing
Testing basics for developers
Testing basics for developers
Agile Android
Agile Android
Integration tests: use the containers, Luke!
Integration tests: use the containers, Luke!
Web ui testing
Web ui testing
Testing in JavaScript - August 2018 - WebElement Bardejov
Testing in JavaScript - August 2018 - WebElement Bardejov
Último
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
UK Journal
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
sudhanshuwaghmare1
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Safe Software
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
RTylerCroy
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Neo4j
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ThousandEyes
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
debabhi2
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
The Digital Insurer
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Roshan Dwivedi
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
apidays
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Gabriella Davis
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
The Digital Insurer
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
MIND CTI
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Radu Cotescu
presentation ICT roal in 21st century education
presentation ICT roal in 21st century education
jfdjdjcjdnsjd
Último
(20)
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
presentation ICT roal in 21st century education
presentation ICT roal in 21st century education
Javascript Unit Testing
1.
Javascript Unit
Testing Introduction to QUnit & JsTestDriver
2.
Tom Van Herreweghe PHP
developer ZCE 5.0 & 5.3 I like Javascript http://blog.theanalogguy.be @miljar
3.
Overview Javascript Unit Testing? Introduction
to QUnit Introduction to JsTestDriver
4.
Javascript Unit
Testing
5.
JS Unit Testing Not
functional testing Selenium, Watir Example: http://www.cuttherope.ie
6.
JS Unit Testing Multitier
Architecture Write DRY code Avoid event-coupling through HTML do it in the business logic
7.
QUnit
8.
QUnit JS Unit Testing
library JQuery http://docs.jquery.com/Qunit
9.
QUnit Testrunner = browser
10.
QUnit setup
Demo
11.
QUnit structure module(‘name’[, {lifecycle}])
12.
QUnit structure test(‘name’[, expected],
test-code)
13.
QUnit structure
Demo
14.
QUnit assertions ok(state[, ‘message’])
15.
QUnit assertions equal(actual, expected[,
‘message’]) corresponds with: ==
16.
QUnit assertions strictEqual(actual, expected[,
‘message’])
17.
QUnit assertions notEqual(actual, expected[,
‘message’]) corresponds with: !=
18.
QUnit assertions
Demo
19.
QUnit assertions deepEqual(actual, expected[,
‘message’]) corresponds with: === (recursive)
20.
QUnit assertions notDeepEqual(actual, expected[,
‘message’]) corresponds with: !== (recursive)
21.
QUnit assertions
Demo
22.
QUnit assertions raises(function[, expected][,
‘message’])
23.
QUnit assertions
Demo
24.
Async testing the good:
callbacks the bad: timers the ugly: currently not in QUnitAdapter for JsTestDriver
25.
Async testing
Timers: hard to predict running time + slows down
26.
Async testing Callbacks: run
assertions
27.
Async testing Currently not
supported in QUnitAdapter
28.
Async testing stop() start() expect() asyncTest()
29.
Async testing
Demo
30.
PHPUnit
QUnit PHPUnit_Framework_TestCase module test* methods test assertTrue() ok() equal() assertEquals() deepEqual() assertSame() strictEqual() notEqual() assertNotEquals() notDeepEqual() setExpectedException raises()
31.
JsTestDriver
32.
JsTestDriver Testrunner for your
Unit Tests Written in Java Client / Server architecture http://code.google.com/p/js-test-driver
33.
JsTestDriver
34.
JsTestDriver Custom unit testing
syntax Need mapping from QUnit to JsTestDriver Some QUnit functionalities not (yet) available
35.
JsTestDriver module() test() ok() equals() same() (old name
for deepEqual())
36.
JsTestDriver
Fetch JAR from http://code.google.com/p/js-test-driver/downloads/list
37.
JsTestDriver
Run server java -jar /path/to/JsTestDriver-1.3.2.jar --port 4224
38.
JsTestDriver Point browser(s) to
http://localhost:4224
39.
JsTestDriver
Demo
40.
JsTestDriver
Download QUnit adapter http://code.google.com/p/js-test-driver/wiki/ QUnitAdapter
41.
JsTestDriver Create config
42.
JsTestDriver
Run tests java -jar /path/to/JsTestDriver-1.3.2.jar --config /path/to/jsTestDriver.conf --tests all
43.
JsTestDriver
Demo
44.
Questions? Read more? Joind.in https://joind.in/4777 Github https://github.com/Miljar/
45.
Code Coverage
46.
Code Coverage
Download plugin from http://code.google.com/p/js-test-driver/downloads/list
47.
Code Coverage Include plugin
in config
48.
Code Coverage Add flags
when executing tests --testOutput /path/to/outputfolder
49.
Code Coverage Install
LCOV
50.
Code Coverage
Generate HTML genhtml /path/to/jsTestDriver.conf-coverage.dat
51.
Code Coverage
Demo
52.
Some links QUnit http://docs.jquery.com/Qunit JsTestDriver http://code.google.com/p/js-test-driver/ CI with
JsTestDriver http://j.mp/acO6QI
53.
Copyrights Ben Scholzen (http://www.flickr.com/photos/dasprid/5142854471/in/ set-72157625158543743) JsTestDriver
schema (http://code.google.com/p/js-test-driver/) Christian Johansen (http://cjohansen.no/)
Descargar ahora