Changeset 12744


Ignore:
Timestamp:
10/10/11 23:59:34 (21 months ago)
Author:
GeorgeClark
Message:

Item11177: add a failure hint message to tests

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/TestFixturePlugin/data/System/TestFixturePlugin.txt

    r8546 r12744  
    4242</verbatim> 
    4343 
     44If there are some hints to resolve common failures, you can include them into the failure results by setting the FAILMSG variable to describe possible failures.  Note that this message is expanded after rendering, so it should be defined as plain HTML.  See the example in TestCases.TestCaseAutoSearchOrder (Hidden in HTML comments). 
     45 
    4446Some notes about the comparison process: 
    4547        1 The comparison is performed by Algorithm::Diff, which compares the HTML structures found in the text. See the documentation on Algorithm::Diff for help. 
  • trunk/TestFixturePlugin/lib/Foswiki/Plugins/TestFixturePlugin.pm

    r9542 r12744  
    235235        ); 
    236236        if ($res) { 
    237             $res = "<font color=\"red\">TESTS FAILED</font><p />$res"; 
     237            my $failmsg = Foswiki::Func::expandCommonVariables( '%FAILMSG{default=""}%'); 
     238            $res = "<font color=\"red\">TESTS FAILED</font><p />$failmsg<p />$res"; 
    238239        } 
    239240        else { 
  • trunk/core/data/TestCases/TestCaseAutoSearchOrder.txt

    r5382 r12744  
    66Designed by: Lynnwood Brown 
    77 
     8<!-- 
     9   * Set FAILMSG = <b>Verify the file system dates of the <code>.txt,v</code> files for each of the 3 SearchTestTopicX topics.   If the <code>.txt</code> file is newer in the file system than the corresponding <code>.txt,v</code> file, the test will fail.   <code>touch</code> each <code>.txt,v</code> file to resolve the failure.</b> 
     10--> 
    811Topics created for test (Text Item; Number Item; Created; Modified): 
    912   * SearchTestTopic1 (Value_1; 3; 14 Dec 2005 - 21:56; 14 Dec 2005 - 21:56) 
Note: See TracChangeset for help on using the changeset viewer.