NetUnitLogo.png

Problems

  1. You just made a change to the firewall. How can you be sure that everything will still work in the morning?
  2. Your application is based on several components, each listening on different ports. How can you tell if everything is working?
  3. A non technical customer is having trouble connecting from another contintent. How can you determine if the network connectivity is ok?

Solution

NetUnit - Network Unit Testing.

Extreme programming has changed the way we write software and Unit testing in particular has helped improve the quality of software. With Unit testing we can make a change without worrying about the overall affect on the application, if the tests pass then everything should still work.

NetUnit works in exactly the same way and provides the same reassurance when making network changes. If the tests pass then nothing has broken - cool huh.

How does it work?

NetUnit works a lot like Apache Ant, in fact I orginally planned to write an Ant task to perform the tests but opted for a clean start instead. Only time will tell if this was the right choice. :)

NetUnitOverview.png

So where do you start?

Before you can run some network tests you need to describe them, you do this by creating the Test Suite XML descriptor that looks like this:

<TestSuite name="Website Tests">
  <description>
    simple example Test Suite
  </description>
  <TestGroup name="Google-Website" description="Can we access the Google website">
    <PingTest hostname="www.google.com" />
    <PortTest hostname="www.google.com" port="80">      
    </PortTest>
  </TestGroup>
</TestSuite>

The Test Suite XML file describes the tests you wish to perform and how you wish to perform them. You can read more about the format of this file in the NetUnit Manual.

System Requirements

Usage

java -jar NetUnit.jar [OPTIONS]

Downloads

[Experimental]
NetUnit.zip

Source Code

Browse Source

Roadmap

Suggest a feature / Report a Bug

Want to see a new test added? or have you found a bug? just head over to the Issue Tracker and let me know. :)

http://www.netbeans.org