Framework
A
For
of
to assist JavaScript programmers to test their codes.
var webdriver = require('selenium-webdriver');
var driver = new webdriver.Builder().
withCapabilities(webdriver.Capabilities.chrome()).
build();
driver.get('http://www.google.com');
driver.findElement(webdriver.By.name('q')).sendKeys('webdriver');
driver.findElement(webdriver.By.name('btnG')).click();
driver.wait(function() {
return driver.getTitle().then(function(title) {
return title === 'webdriver - Google Search';
});
}, 1000);
driver.quit();
require 'watir-webdriver'
b = Watir::Browser.new
b.goto 'bit.ly/watir-webdriver-demo'
b.text_field(:id => 'entry_0').set 'your name'
b.select_list(:id => 'entry_1').select 'Ruby'
b.select_list(:id => 'entry_1').selected? 'Ruby'
b.button(:name => 'submit').click
b.text.include? 'Thank you'
JS is Event Driven
+ Event parameter map
+ Form state map
+ Browser state
Event
+ URL
+ Server/Browser State
+ Sequence of Events
Test Input
Execution Unit
Prioritaizer
Input Generator
the set of event handlers that are executed when the i’th event is triggered during the execution of c.
Reasonable event parameters
maintains
Research Questions
Research Questions
Research Questions
Research Questions
+ Minified Javascript
+ Dynamically generated code (eval or <script>)
+ Dynamically generated code by Server
100 test inputs
at most 2 minutes.
PC running Linux
3.2Ghz CPU and 2GB of memory