Testing Code.org's Interactive CS Curriculum
-
Upload
brian-jordan -
Category
Software
-
view
138 -
download
1
description
Transcript of Testing Code.org's Interactive CS Curriculum
Testing Code.org's Interactive Computer Science Curriculum
bcjordan.com
[email protected]@bcjordan
Brian Jordan, software engineer at Code.org
Code.org
non-profit
expanding participation in CS
Hour of Code
10 million
43 million
now?
district partnerships, professional development
700 teachers trained 10 school districts
policy changes
K-12 CS Curriculum
Testing Challenges
what are we up against?
demo time!
testing challenges
multiple browsers
multiple browsers
iOS / Android
IE 9
localization
33 languages
left-to-right
right-to-left
browser features
<svg>, <canvas>
Javascript
conditional logic to support all browsers
tough but important
now let's test it!
Unit Tests!
Unit Tests?blockly (JS, svg, canvas, grunt)
blockly-core (JS, svg, Closure Tools)
dashboard (Ruby on Rails)
Dashboard
Blockly CoreBlockly Apps
Rails testing
ActiveSupport::TestCase
Factory Girl
Factory Girl
SimpleCov
Blockly testing
solution tests
node-canvas for drawing
Chai for assertions
grunt-mocha-test
solution tests
solution tests
solution tests
UI tests
challenge:multiple browsers
solution:
BrowserStack
challenge:
interaction, drag-and-drop
solution:jQuery Simulate
$(selector).drag…
Cucumber —> Selenium
local tests with chromedriver
@browser = Selenium::WebDriver.for :chrome, :url=>"http://127.0.0.1:9515"
remote tests with BrowserStack
@browser = Selenium::WebDriver.for :remote, url => "http://#{browserstack_username}:#{browserstack_authkey} @hub.browserstack.com/wd/hub"
Cucumber is uncomfortable to start with
DSL should be high-level
And I drag block "2" to block "4"
Build a library of steps
Visit the URLGiven I am on "http://learn.code.org/s/1/level/24"
Visit the URLGiven /^I am on "([^"]*)"$/ do |url| url = replace_hostname(url) @browser.navigate.to "#{url}" end
Annotations
@no_mobile
@no_ie@skip
@db_access
On BrowserStack
Demo: Speed Run
Monitoring
integration with CI
HipChat all the things
completion rates
per-browser completion rates
Travis CI <> GitHub
Takeaways
Build up Library of Tests
Culture of Testing
Saves time in test writing
Saves time in development
Thanks!
bcjordan.com
[email protected]@bcjordan
Brian Jordan, software engineer at Code.org
http://code.org/help
http://github.com/code-dot-org