JAVASCRIPT unit testing with venus.js presented by seth mclaughlin on 05.30.13
May 11, 2015
JAVASCRIPTunit testing with venus.js
presented by seth mclaughlin on 05.30.13
METHODS OF TESTING
METHODS OF TESTINGa web application
METHODS OF TESTINGa web application
METHODS OF TESTINGa web application
JS UNIT TESTING
METHODS OF TESTINGa web application
JS UNIT TESTINGautomated whitebox testing
METHODS OF TESTINGa web application
JS UNIT TESTINGautomated whitebox testing
BLACK BOX
BLACK BOX
WHITE BOX
EXAMPLE
M
MMaineMarylandMichiganMinnesota
MMaineMarylandMichiganMinnesota
BLACK BOX WHITE BOX
BLACK BOX WHITE BOX
MANUAL
BLACK BOX WHITE BOX
MANUAL
BLACK BOX WHITE BOX
MANUAL
BLACK BOX WHITE BOX
MANUAL
AUTOMATED
BLACK BOX WHITE BOX
MANUAL
AUTOMATED functional tests
BLACK BOX WHITE BOX
MANUAL
AUTOMATED functional tests unit tests
BLACK BOX WHITE BOX
MANUAL
AUTOMATED
JAVASCRIPT UNIT
TESTS
JAVASCRIPT UNIT
TESTS
So...what is a unit test?
SOURCE CODE
TEST CODE
SOURCE CODE
TEST CODE
1
SOURCE CODE
TEST CODE
1
2
SOURCE CODE
TEST CODE
TEST HARNESS HTML PAGE
1
2
SOURCE CODE
TEST CODE
TEST HARNESS HTML PAGE
1
2
process(function () { this.log('Part 1'); this.doFoo();}.bind(this));
process(function () { this.log('Part 1'); this.doFoo();}.bind(this));
Let’s write a test...
Let’s write a test...
Let’s write a test...
THE EASY WAY
CLI Executor UAC Browser
CLI Executor UAC Browser
CLI Executor UAC
run this test & use IE8
Browser
CLI Executor UAC
run this test & use IE8
parse files and build test url
Browser
CLI Executor UAC
run this test & use IE8
parse files and build test url
Browser
we need a browser
CLI Executor UAC
run this test & use IE8
parse files and build test url
Browser
we need a browser
load test url with IE8
CLI Executor UAC
run this test & use IE8
parse files and build test url
Browser
we need a browser
load test url with IE8
test harness page, please
run this test & use IE8
parse files and build test url
we need a browser
load test url with IE8
test harness page, please
CLI Executor UAC Browser
load test url with IE8
test harness page, please
CLI Executor UAC Browser
test harness page, please
CLI Executor UAC Browser
test harness page, please
CLI Executor UAC Browser
here you go
test harness page, please
CLI Executor UAC Browser
here you go
tests execute in browser
test harness page, please
CLI Executor UAC Browser
here you go
tests execute in browser
test results
test harness page, please
CLI Executor UAC Browser
here you go
tests execute in browser
test results
display test results to user
test harness page, please
CLI Executor UAC Browser
here you go
tests execute in browser
test results
display test results to user
NEXT STEPS
NEXT STEPS
VISIT US at www.venusjs.org
3 WRITE & RUN JavaScript Unit Tests!
INSTALL venus.js with npm
NEXT STEPS
VISIT US at www.venusjs.org
WRITE & RUN JavaScript Unit Tests!
INSTALL venus.js with npm
venusjs.org