Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-velocity Wiki" 
for change notification.

The following page has been changed by ShinobuKawaiYoshida:
http://wiki.apache.org/jakarta-velocity/TestingVelocity

The comment on the change is:
The Golden File.

------------------------------------------------------------------------------
  
  Run Velocity against the template to be checked.  Look at the output and see 
if it is what you desired.  This must be the most primitive testing approach, 
but most people nowadays are too lazy and want this done by the computer.  The 
rest of this page will discuss automated testing approaches.
  
+ '''''Approach 2:'''''  The Golden File.
+ 
+ This is how the Velocity 
[http://jakarta.apache.org/velocity/install.html#Testing%20Your%20Installation 
regression tests] work.  (Or at least how I think it works.  Correct me if I'm 
wrong.)  The first part is like Approach 1.  You run the template and check 
that it is right.  Once you know it's correct, save the correct output (called 
the Golden File) and have JUnit compare the template output and the Golden 
File.  Of course, it will pass.  What's more, it will break whenever you screw 
up the template.  (The Velocity tests will break whenever somebody screws up 
Velocity itself.)
+ 
+ Check out the 
[http://svn.apache.org/repos/asf/jakarta/velocity/trunk/src/java/org/apache/velocity/test/
 test source code] for more on how this is done.
+ 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to