89
Continuous Testing at Code.org @bcjordan Brian Jordan, software engineer at Code.org

[Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

Embed Size (px)

Citation preview

Page 1: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

Continuous Testing at Code.org

@bcjordanBrian Jordan, software engineer at Code.org

Page 2: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

Code.org

Page 3: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

non-profit

Page 4: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

expanding participation in CS

Page 5: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

Hour of Code

Page 6: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit
Page 7: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

230 million tried Hour of Code

Page 8: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

now what?

Page 9: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

full curricula, district partnerships,

professional development, policy change

Page 10: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

K-12 CS Curriculum

Page 11: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

25k K-12 teachers trained

Page 12: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

courses: 300k teachers 10mm students

Page 13: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit
Page 14: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit
Page 15: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

how did Code.org start automated testing?

Page 16: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

development in 2013-2014

Page 17: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

why test? what is Code.org's testing context?

Page 18: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

the context

Page 19: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

the context

Page 20: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

the context

Page 21: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

the context

Page 22: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

the context

Page 23: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

so how do we test all that?

Page 24: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

how we started Selenium testing

Page 25: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

how our tests are organized and run

selenium-webdriver cucumber

Page 26: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit
Page 27: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit
Page 28: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

takeaways

Page 29: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

Build a library of steps

Page 30: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

Build a library of test levels

Page 31: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

Build a library of annotations

@no_mobile@no_ie9

@skip

@db_access@as_student

@eyes

Page 32: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

who writes tests?

Page 33: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

who/what runs tests?

Page 34: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit
Page 35: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

what challenges did we end up facing?

Page 36: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

challenge:multiple browsers

Page 37: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

solution:selenium-webdriver

Sauce Labs

Page 38: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit
Page 39: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit
Page 40: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit
Page 41: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

challenge:testing new changes

Page 42: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

solution:chromedriver sauce-connect

Page 43: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

solution (soon):pull request tests in CI

Page 44: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

challenge:

interaction, drag-and-drop

Page 45: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

solution:jQuery Simulate

$(selector).drag…

Page 46: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

challenge:

visual, responsive changes

Page 47: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

hackathon solution?

Page 48: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

not easy...

Page 49: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

actual thing!

Page 50: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

using eyes

Page 51: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

converted feature

Page 52: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit
Page 53: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

ignoring regions

Page 54: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit
Page 55: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit
Page 56: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit
Page 57: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit
Page 58: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit
Page 59: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

what do tests look like when running?

Page 60: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

(not) wasting time

Page 61: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

speeding up test runs

Page 62: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

2014: 60-90 min of tests

Page 63: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

parallelizationat runner level

Page 64: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

2015: 60-90 min of tests

to 20-30 min of tests

Page 65: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

justifying tests

Page 66: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

the bug collection

Page 67: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

missing button

Page 68: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

duplicate button

Page 69: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

Firefox getBBox()

Page 70: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

JS % error: node build issue

Page 71: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

Chrome 50 offsetWidth

Page 72: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

my favorite bug ever

Page 73: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit
Page 74: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit
Page 75: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit
Page 76: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit
Page 77: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

who investigates failures?

what about failures pass tests?

Page 78: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

dev of the day

Page 79: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit
Page 80: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

what's next?

Page 81: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

per-PR tests

Page 82: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

managing more eyes tests

Page 83: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

cross-browser responsive eyes tests

github.com/tourdedave/responsive-web-testing

Page 84: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

takeaways

Page 85: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

start small

Page 86: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

everybody tests

Page 87: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

periodically invest in speed-ups

Page 88: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

code.org/help

github.com/code-dot-org

Thanks!

@bcjordanBrian Jordan, software engineer at Code.org

Page 89: [Webinar] Continuous Testing Done Right: Test Automation at the World's Leading Non-profit

code.org/help

github.com/code-dot-org

Thanks!

@bcjordanBrian Jordan, software engineer at Code.org