The Artima Developer Community
Sponsored Link

Java Buzz Forum
Java News Brief (JNB): The Framework for Integrated Tests (Fit)

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Weiqi Gao

Posts: 1808
Nickname: weiqigao
Registered: Jun, 2003

Weiqi Gao is a Java programmer.
Java News Brief (JNB): The Framework for Integrated Tests (Fit) Posted: Dec 14, 2005 10:54 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Weiqi Gao.
Original Post: Java News Brief (JNB): The Framework for Integrated Tests (Fit)
Feed Title: Weiqi Gao's Weblog
Feed URL: http://www.weiqigao.com/blog/rss.xml
Feed Description: Sharing My Experience...
Latest Java Buzz Posts
Latest Java Buzz Posts by Weiqi Gao
Latest Posts From Weiqi Gao's Weblog

Advertisement

If you have heard about Fit for some time, but never had the time to investigate it, then this month's JNB article is for you.

The idea is very simple.

Your write your test scripts in HTML:

<table border="1" cellpadding="2" cellspacing="2">
  <tbody>
    <tr>
      <td style="vertical-align: top;" colspan="2" rowspan="1">ValidateCustomerName</td>
    </tr>
    <tr>
      <td rowspan="1" colspan="1">
        <span style="font-style: italic;">customer name</span>
      </td>
      <td rowspan="1" colspan="1">
        <span style="font-style: italic;">valid()</span>
      </td>
    </tr>
    <tr>
      <td rowspan="1" colspan="1">
      </td>
      <td rowspan="1" colspan="1">error</td>
    </tr>
    <tr>
      <td rowspan="1" colspan="1">Mario</td>
      <td rowspan="1" colspan="1">true</td>
    </tr>
  </tbody>
</table>

which looks like this in a browser:

ValidateCustomerName
customer name valid()
error
Mario true

You run the thing:

[prompt] $ java fit.FileRunner tests.html report.html

And depending on if your code is right or wrong, you get either an all green report card:

ValidateCustomerName
customer name valid()
null error
Mario true

or worse (from a different test):

check customer total balance $135.00 expected
$35.00 actual

You have to write a few Java classes along the way. But those are trivial, right? :)

Read: Java News Brief (JNB): The Framework for Integrated Tests (Fit)

Topic: Geir made coffee shoot out my nose! Previous Topic   Next Topic Topic: Version control, release management, and continuous integration

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use