What you want in a test
environment
• Isolated
• Customized
• Manageable
• Shared
Debugging is twice as hard as
writing the code in the first place.
Therefore, if you write the code as
cleverly as possible, you are, by
definition, not smart enough to
debug it.
Brian Kernighan
Web Developer Toolbar
• CSS
• Browser features
• Outline elements
• Manage cookies
• Validate
console.debug('I am debug');
console.info('I am info');
console.warn('I am a warning');
console.error('I am an error');
Inline Debugging
• debugger keyword
• All the usual capabilities
• Step Over
• Step Into
• Step Out
What else?
What about
Internet Explorer?
We know about as much about
software quality problems as they
knew about the Black Plague in the
1600s.
We've seen the victims' agonies and
helped burn the corpses. We don't
know what causes it; we don't really
know if there is only one disease.
We just suffer -- and keep pouring
our sewage into our water supply.
Tom Van Vleck
JsUnit
• Unit testing
• xUnit for Javascript
Concepts
• Test Functions
• Test Page
• include jsUnitCore.js
• setUp and tearDown
• Test Suite
• testRunner.html
Tracing
• A way to view output
• There are 3 trace levels
• Configurable per test run
Automate your tests
• net.jsunit.StandaloneTest
• Browsers
• Test Pages
• JsUnitServer
• net.jsunit.DistributedTest
One test is worth
a thousand
opinions.
Crosscheck
• Unit testing
• Simulator
• Fast!
What does it provide?
• global variables
• functions
• document
Optimism is an
occupational hazard
of programming:
feedback is the
treatment.
Kent Beck
Selenium
• Acceptance testing
• Standard browser technology
• Simulates the user
• Java, Ruby, Perl, Python, .Net, Oh my!
?
session
evaluations
Muness Alrubaie
muness@gmail.com
muness.blogspot.com
This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 2.5
License.
http://creativecommons.org/licenses/by-nc-sa/2.5/
0 comments
Post a comment