Slide 1

Slide 1 text

JAVASCRIPT TESTING BY A PYTHON DEVELOPER @aaronbassett www.twig-world.co.uk

Slide 2

Slide 2 text

www.twig-world.co.uk

Slide 3

Slide 3 text

• 86MB Repo • 205,684 lines of code • 70,378 lines of Python • 21 contributors • First commit July 26th, 2011 - 3+ years
 (Initial Commit. Models for Basic apps)

Slide 4

Slide 4 text

¯\(°_o)/¯ Test coverage?

Slide 5

Slide 5 text

“we have as many testers as we have developers. And testers spend all their time testing, and developers spend half their time testing. We're more of a testing, a quality software organization than we're a software organization.”

Slide 6

Slide 6 text

“we have as many testers as we have developers. And testers spend all their time testing, and developers spend half their time testing. We're more of a testing, a quality software organization than we're a software organization.” – Bill Gates, Microsoft

Slide 7

Slide 7 text

DO OVER!

Slide 8

Slide 8 text

www.twig-bilim.kz

Slide 9

Slide 9 text

• 25MB Repo • 86,098 lines of code • 36,491 lines of Python • 18 contributors • First commit Sept 3rd, 2013 - <1 year
 (Awww yis)

Slide 10

Slide 10 text

556TESTS 90.34% Coverage

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

17.5% Javascript

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

1 describe 'Calculator', -> 2 3 it 'can add two positive numbers', -> 4 calculator = new Calculator() 5 result = calculator.add 2, 3 6 expect(result).toBe 5

Slide 18

Slide 18 text

Live Demo (why do you do this to yourself?)

Slide 19

Slide 19 text

No content

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

1 2 3 4 5 6 7 8 9 10 11 12 jasmine.getEnv().addReporter(new jasmine.ConsoleReporter()); 13 jasmine.getEnv().addReporter(new jasmine.TrivialReporter()); 14 jasmine.getEnv().execute(); 15 16 17

Slide 22

Slide 22 text

Live Demo (AGAIN!? You’re just asking for trouble.)

Slide 23

Slide 23 text

1 language: node_js 2 node_js: 3 - '0.10' 4 script: phantomjs phantom-jasmine.js SpecRunner.html 5 before_script: 6 - 'npm install -g coffee-script' 7 - 'coffee --compile --output static/ src/'

Slide 24

Slide 24 text

1 before_install: 2 - sudo add-apt-repository -y ppa:chris-lea/node.js 3 - sudo apt-get update 4 - sudo apt-get install nodejs 5 - sudo npm install -g coffee-script

Slide 25

Slide 25 text

1 language: node_js 2 node_js: 3 - '0.10' 4 script: phantomjs phantom-jasmine.js SpecRunner.html 5 before_script: 6 - 'npm install -g coffee-script' 7 - 'coffee --compile --output static/ src/‘

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

No content

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

No content

Slide 31

Slide 31 text

@aaronbassett www.twig-world.co.uk