/[jscoverage]/trunk/doc/manual.html
ViewVC logotype

Diff of /trunk/doc/manual.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 14 by siliconforks, Tue Aug 14 14:46:04 2007 UTC revision 41 by siliconforks, Wed Aug 22 18:46:11 2007 UTC
# Line 36  Line 36 
36  </p>  </p>
37    
38  <pre>  <pre>
39  tar jxvf jscoverage-0.1.tar.bz2  tar jxvf jscoverage-0.3.tar.bz2
40  cd jscoverage-0.1  cd jscoverage-0.3/
41  ./configure  ./configure
42  make  make
43  </pre>  </pre>
# Line 222  Line 222 
222  <img src="screenshot4.png" alt="Screenshot">  <img src="screenshot4.png" alt="Screenshot">
223    
224  <p>  <p>
225  From the "Summary" tab, you can click the links to get a detailed view of a JavaScript source file.  You can click the checkbox to show a list of statements missed during execution.
226  </p>  </p>
227    
228  <img src="screenshot5.png" alt="Screenshot">  <img src="screenshot5.png" alt="Screenshot">
229    
230    <p>
231    You can click one of the links to get a detailed view of a JavaScript source file.
232    </p>
233    
234    <img src="screenshot6.png" alt="Screenshot">
235    
236  <h2>Inverted mode</h2>  <h2>Inverted mode</h2>
237    
238  <p>  <p>
239  In some circumstances it may be difficult to execute your code within the  In some situations it may be difficult to execute your code within the
240  JSCoverage "Browser" tab. For example, the code may assume that it is running in  JSCoverage "Browser" tab. For example, the code may assume that it is running in
241  the top-level browser window, generating errors if it is executed from within a  the top-level browser window, generating errors if it is executed from within a
242  frame. JSCoverage has an alternative mode of operation, called <dfn>inverted  frame. JSCoverage has an alternative mode of operation, called <dfn>inverted
243  mode</dfn>, which may be useful in this situation.  mode</dfn>, which may be useful in this case.
244  </p>  </p>
245    
246  <p>  <p>
# Line 265  Line 271 
271  </pre>  </pre>
272    
273  <p>  <p>
274    Note that you <em>must</em> use a <code>window.open</code> call; simply making a
275    link to <code>jscoverage.html</code> is not sufficient.
276    </p>
277    
278    <p>
279  An example is located in the <code>doc/example-inverted</code> directory.  An example is located in the <code>doc/example-inverted</code> directory.
280  You can instrument the code and launch the <code>index.html</code> page:  You can instrument the code and launch the <code>index.html</code> page:
281  </p>  </p>
# Line 279  Line 290 
290  report" button to launch the JSCoverage report.  report" button to launch the JSCoverage report.
291  </p>  </p>
292    
293    <h2>Command line options</h2>
294    
295    <p>
296    The <code>jscoverage</code> program accepts the following options:
297    </p>
298    
299    <dl>
300    <dt><code>-h</code>, <code>--help</code>
301    <dd>Display a brief help message.
302    <dt><code>-V</code>, <code>--version</code>
303    <dd>Display the version of the program.
304    <dt><code>-v</code>, <code>--verbose</code>
305    <dd>Explain what is being done.
306    <dt><code>--exclude=<var>PATH</var></code>
307    <dd>The command
308    <pre>
309    jscoverage --exclude=<var>PATH</var> <var>SOURCE-DIRECTORY</var> <var>DESTINATION-DIRECTORY</var>
310    </pre>
311    copies <var>SOURCE-DIRECTORY</var> to <var>DESTINATION-DIRECTORY</var>
312    recursively, but does not copy <var>SOURCE-DIRECTORY</var>/<var>PATH</var>.
313    <var>PATH</var> must be a complete path relative to <var>SOURCE-DIRECTORY</var>.
314    <var>PATH</var> can be a file or a directory (in which case the directory and
315    its entire contents are skipped). This option may be given multiple times.
316    <dt><code>--no-instrument=<var>PATH</var></code>
317    <dd>The command
318    <pre>
319    jscoverage --no-instrument=<var>PATH</var> <var>SOURCE-DIRECTORY</var> <var>DESTINATION-DIRECTORY</var>
320    </pre>
321    copies <var>SOURCE-DIRECTORY</var> to <var>DESTINATION-DIRECTORY</var>
322    recursively, but does not instrument any JavaScript code in
323    <var>SOURCE-DIRECTORY</var>/<var>PATH</var>. <var>PATH</var> must be a complete
324    path relative to <var>SOURCE-DIRECTORY</var> <var>PATH</var> can be a
325    (JavaScript) file or a directory (in which case any JavaScript files located
326    anywhere underneath the directory are not instrumented). This option may be
327    given multiple times.
328    </dl>
329    
330    <h2>Query string options</h2>
331    
332    <p>
333    When accessing <code>jscoverage.html</code> in a web browser, you may provide a
334    query string consisting of options separated by ampersand (<code>&amp;</code>)
335    or semicolon (<code>;</code>). Any option not containing an equals sign
336    (<code>=</code>) is considered to be a URL which will be loaded in the "Browser"
337    tab.
338    </p>
339    
340    <dl>
341    <dt><code>u=<var>URL</var></code>, <code>url=<var>URL</var></code>
342    <dd>Load <var>URL</var> in the "Browser" tab.  (This is the same as specifying
343    an option without an equals sign.)
344    <dt><code>m=<var>BOOLEAN</var></code>, <code>missing=<var>BOOLEAN</var></code>
345    <dd>Determines whether to initially display the "Missing" column in the "Summary"
346    tab.  <var>BOOLEAN</var> can be
347    <code>true</code>, <code>t</code>, <code>yes</code>, <code>y</code> <code>on</code>, <code>1</code>
348    (to display the "Missing" column), or
349    <code>false</code>, <code>f</code>, <code>no</code>, <code>n</code>, <code>off</code>, <code>0</code>
350    (to hide the "Missing" column).  By default, the "Missing" column is not displayed.
351    </dl>
352    
353  <h2>Caveats</h2>  <h2>Caveats</h2>
354    
355  <ul>  <ul>
# Line 298  Line 369 
369    
370  <address>  <address>
371    Copyright &copy; 2007 siliconforks.com<br>    Copyright &copy; 2007 siliconforks.com<br>
372    Last updated July 8, 2007<br>    Last updated August 20, 2007<br>
373    <a href="mailto:jscoverage@siliconforks.com">jscoverage@siliconforks.com</a>    <a href="mailto:jscoverage@siliconforks.com">jscoverage@siliconforks.com</a>
374  </address>  </address>
375    

Legend:
Removed from v.14  
changed lines
  Added in v.41

  ViewVC Help
Powered by ViewVC 1.1.24