HTML and CSS Reference
In-Depth Information
messages are less than helpful; you have probably seen “Object does not support
this property or method” more times than you care for. The second reason is that
IE, at least in older versions, handles script errors badly. Running a TDD session
in IE will cause it to frequently choke, requiring you to manually refresh it. Not to
mention the lack of performance in IE, which is quite noticeable compared to, e.g.,
Google Chrome.
Disregarding Internet Explorer, I would still advise against keeping too many
browsers in your primary TDD process, because doing so clutters up the test runner's
report, repeating errors and log messages once for every captured browser. My
advice is to develop against one server that only captures your browser of choice, and
frequently run tests against a second server that captures many browsers. You can
run against this second server as often as needed—after each passed test, completed
method, or if you are feeling bold, even more. Keep in mind that the more code you
add between each run, the harder it will be to spot any bugs that creep up in those
secondary browsers.
To ease this sort of development, it's best to remove the server line from the
configuration file and use the --server command line option. Personally I do
this kind of development against Firefox, which is reasonably fast, has good error
messages, and always runs on my computer anyway. As soon as I pass a test, I issue
a run on a remote server that captures a wider variety of browsers, new and old.
3.4.4 Using JsTestDriver From an IDE
JsTestDriver also ships plugins for popular integrated development environments
(IDEs), Eclipse and IntelliJ IDEA. In this section I will walk through setting up the
Eclipse plugin and using it to support a test-driven development process. If you are
not interested in developing in Eclipse (or Aptana), feel free to skip to Section 3.4.5,
Improved Command Line Productivity . Installing JsTestDriver in Eclipse
To get started you need to have Eclipse (or Aptana Studio, an IDE based on Eclipse
aimed at web developers) installed. Eclipse is a free open source IDE and can be
downloaded from Once Eclipse is running, go to the Help menu
and select Install new software. In the window that opens, enter the following URL
as a new update site:
“JS Test Driver Eclipse Plugin” should now be displayed with a checkbox next
to it. Check it and click Next . The next screen is a confirmation that sums up the
plugins to be installed. Click Next once again and Eclipse asks you to accept the
Search WWH ::

Custom Search