Testing « Network « Java Articles

Java Articles
1. Class Definition
2. Data
3. Development
4. GUI
5. J2EE
6. J2ME
7. JavaBeans
8. Language
9. Microsoft Collabration
10. Network
11. Swing
12. System Resource
13. XML
Microsoft Office Word 2007 Tutorial
Java
Java Tutorial
Java Source Code / Java Documentation
Java Open Source
Jar File Download
Java Products
Java by API
C# / C Sharp
C# / CSharp Tutorial
ASP.Net
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
PHP
Python
SQL Server / T-SQL
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Java Articles » Network » Testing 
1. Test networked code the easy way
Author:Nelson Minar
URL:http://www.javaworld.com/javaworld/jw-07-2002/jw-0719-networkunittest.html?
Summary: Networked code proves difficult to test thoroughly because test suites work best as standalone processes unreliant on other servers. In this article, Nelson Minar describes two techniques for unit testing network code. First, he proposes that you design your code such that as much logic as possible works independently from the network. Second, he suggests using Java's protocol handler classes to simulate network connections without actually using the network. By employing these principles, you'll produce easily tested network software. This article includes sample code for a Java protocol handler, as well as the PrintRSS demo program and a test suite for PrintRSS that demonstrates testing concepts. (1,750 words; July 19, 2002)


www__.j_av___a___2s__.__co__m__ | Contact Us
Copyright 2003 - 08 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.