A Practical Guide to Testing Object-Oriented Software

  • Need to define standards for specifying distributed systems? See Specifying Distributed Objects.

  • Interested in a new definition of "path" especially for distributed systems? See Path Testing in Distributed Systems.

  • Need to develop tests that explore the temporal characteristics of a program? See Temporal Logic.

  • Want to explore testing an Internet application? See The Ultimate Distributed System The Internet.

Few systems these days are designed to execute on a single processor in a single process. In an attempt to gain flexibility and extensibility, many systems are designed in pieces that are sufficiently independent that can reside in a separate process from the others. The term distributed means systems with a client/server architecture in which the client and server pieces are designed to be in separate processes. Today's systems are much more varied than the client/server systems of the eighties in which the server was always a database server and the clients simply queried or modified the data. Appplications often begin with one component of the application being downloaded to run on a customer's computer. Information is streamed back to an application server, which in turn works with a database component to fulfill a transaction.

In this chapter we will add to our repertoire of testing techniques to include tests that are targeted at new types of defects specifically related to concurrent, distributed software. Basically we will consider the following two types of faults.

  • Concurrent threads of execution must coordinate their accesses to shared data values. Failure to synchronize these accesses can lead to incorrect data values being present in memory even though each thread is correctly computing its result.

  • A specific node in a distributed system can fail to perform correctly even if every other processor is working properly. A network link between nodes can also fail while the remainder of the system continues to function. This results in a system failure.

The Brickles example, as we have been using it thus far, is not distributed and not useful in this context. We will use examples from the Java version of Brickles that is multithreaded and that uses an applet running in a Web browser as its interface.

Категории