[Greasemonkey] Optional field

Michael Bierman greasemonkey at thebiermans.net
Fri Apr 15 12:59:40 EDT 2005


-----Original Message-----
From: Mark Wubben

A specialized test case you mean? Not sure.. I don't think much people will
run tests like that. And of course you can create that test page and link to
it.

MB> Hi Mark.  I didn't necessarily mean a special test case--that wouldn't
make sense for all scripts. For example, if a user script modifies CNN, the
best test page is probably CNN. But for scripts that modify all pages, it is
sometimes useful to have an example/test page.

Developing such a test page may or may not help the developer, but it is not
time consuming to construct either.  There are a few reasons I suggested
that developers provide a test case.

First, some user scripts have little to no explanation of what they do.  I
guess that the authors felt that the code spoke for itself...of course not
everyone is conversant in JavaScript--and some code can be dense or opaque
to less experienced coders.

By having a test page users would have some insight into what the script
does and if it is working.  If nothing else, it highlights what's going on
and helps "sell" the user that the script is useful to them.  There have
been scripts I've installed that don't seem to do anything.  Were they
broken?  If so, how?  Was there a conflict with another script? Was I
missing some subtle change that the script made to the page I was viewing? I
have no easy way of figuring this out.  I would have to look through all my
user scripts and determine where there might be a conflict or overlap.  If
the developer provided any "more" information, I can check out their
site--but as I said, many developers don't provide that, and some don't
provide much if any description in the script.

Second, user scripts can conflict with each other.  By having a test page
that the developer asserts "works" there is a baseline for users to use for
comparison and debug pages that are known to work.  When problems arise, the
user can discuss it with the developer with a known quantity.

Michael




More information about the Greasemonkey mailing list