Je code donc je teste - Paris Web 2013

Preview:

DESCRIPTION

Historiquement, le front a longtemps été le parent pauvre du test. Passons sur les illustres « alert » et « console.log », il aura fallu attendre des outils comme Selenium pour professionnaliser la démarche. Aujourd’hui les solutions sont abouties, complètes et utilisables et il y en a pour tous les goûts. Des tests unitaires, des tests d’intégrations en passant par les tests fonctionnels, les tests de compatibilités, les tests end2end… Nous avons les outils, nous n’avons plus d’excuses.

Citation preview

JE CODE DONC JE TESTE…

@cbalit@NewsDuFront@3k1n0

POURQUOI ?

LES BUGS

1 BUG= 370 MILLIONS DE $

QUALITÉ

PÉRENNITÉ

CONFIANCE

DEBUG

9

PLUS ÇA !!!

PAS ÇA !!!

10

DANS LE BROWSER

11

DANS L’IDE

12

ANDROID (3.2)

13

https://developers.google.com/chrome-developer-tools/docs/remote-debugging

DEVICE (IOS6)+SAFARI

14

https://developer.apple.com/library/safari/documentation/appleapplications/reference/safariwebcontent/DebuggingSafarioniPhoneContent/DebuggingSafarioniPhoneContent.html

TERMINOLOGIE

3 FAMILLES

Unitaire

Intégration ou end2end

Fonctionnel

16

PYRAMIDE DE TEST

17

TESTS UNITAIRES

POURQUOI ?

POUR VALIDER LE COMPORTEMENT INTRINSÈQUE DE NOS COMPOSANTS

19

QUI ET QUOI ?

20

COMMENT ?

21

TESTS D’INTÉGRATION

POURQUOI ?

VALIDER TECHNIQUEMENT LES INTERACTIONS DES COMPOSANTS AU NIVEAU DE L’APPLICATION

23

QUI ET QUOI ?

24

COMMENT ?

25

TESTS FONCTIONNELS

POURQUOI ?

VALIDER FONCTIONNELLEMENT LES RÈGLES DE GESTION, LES PARCOURS

27

QUI ET QUOI ?

28

COMMENT ?

29

TESTS DE VALIDITÉ

POURQUOI ?

31

VALIDER DES CONVENTIONS RECONNUES PAR LA COMMUNAUTÉ

QUI ET QUOI ?

32

COMMENT ?

33

TESTS DE COMPATIBILITÉ

VALIDER LE FONCTIONNEMENT DE L’APPLICATION DANS PLUSIEURS CONTEXTES

POURQUOI ?

35

QUI ET QUOI ?

36

COMMENT ?

37

INDUSTRIALISATION

JENKINS

39

BREF …

Apprentissage

41

Réalisme

42

43

Mais toujours tester…

44

“If you write code, write tests.

Don’t get stuck on unit testing dogma.

Embrace unit testing karma.

Think of code and test as one.

The test is more important than the unit.

The best time to test is when the code is fresh.

Tests not run waste away.

An imperfect test today is better than a perfect test someday.

An ugly test is better than no test.

Sometimes, the test justifies the means.

Only fools use no tools.

Good tests fail.”

• http://www.agitar.com/downloads/TheWayOfTestivus.pdf

THE WAY OF TESTIVUS

45

THE WAY OF TESTIVUS

Think of code and test as one.

THE WAY OF TESTIVUS

46

Think of code and test as one.

The best time to test is when the code is

fresh.

47

THE WAY OF TESTIVUS

Think of code and test as one.

The best time to test is when the code is

fresh.

An imperfect test today is better than a

perfect test someday.

48

Think of code and test as one.

The best time to test is when the code is

fresh.

An imperfect test today is better than a

perfect test someday.

An ugly test is better than no test.

THE WAY OF TESTIVUS