Vous êtes sur la page 1sur 18

Test Plan

CHAPTER V TEST PLAN

6.1 PURPOSE To prescribe the scope, approach, resources, and schedule of the testing activities. To identify the items being tested the features to be tested, the testing tasks to be performed.
6.2 TEST ITEM

Route Detection: When a source node wants to send packets to a destination to which it does not have a route, it initiates a Route Discovery by broadcasting a route request message. The node receiving a route request checks whether it has a route to the destination in its cache and also check if it is misbehaving node or not. If it has, it sends a reply to the source including a source route. If the node does not have a cached route to the destination, it adds its address to the source route and rebroadcasts the route request. Every node in the network maintains a cache which contains information about all the other nodes in the network. During initialization of the system, the previous information in the cache is flushed and route detection is carried out. The route detection is carried out using the net view command. The net view command displays a list of computers in a specified workgroup or the shared resources available on a specified computer. On execution of the net view command, all the computers in the workgroup are displayed and are considered as the nodes in the network. Accordingly, a path is found from each node to every other node in the network and the cache is updated having the destination node and the path to it. Enable operational communication:

36

Test Plan The Message transfer relates with that the sender node wants to send a message to the destination node after the path is selected also find out that node is not a misbehavior node and status of the destination node through is true. The receiver node receives the message completely and then it send the acknowledgement to the sender node also near by nodes through the router nodes where it is received the message. When a node wants to transfer a message to another node in the network, it first looks up its cache to check for the destination node and the path that leads to it. The timeout for reception of the 2ACK packet is initialized to 150ms. The paramenters Cpkts and Cmis are initialized to zero. The message is then transferred to the next hop on the path and the factor Cpkts is incremented accordingly. The data structure maintained by the node contains a list of node IDs. If the node receives an acknowledgment for a given ID it removes the node from that list. If 2ACK packet does not reach before timeout then C mis parameter is incremented. Route Analysis: Route Maintenance, the node forwarding a packet is responsible for confirming that the packet has been successfully received by the next hop. If no acknowledgement is received after the maximum number of retransmissions, the forwarding node sends an error message to the source (also source easily understand that node is misbehaving), indicating the broken link. When a node detects a link failure, it should notify all reachable nodes that have cached that link to update their caches if it is not a misbehaving node. After the timeout period the value of Cpkts and Cmis are evaluated and ratio Rmis is calculated and compared with threshold value 0.85. If the value exceeds threshold value then the IDs corresponding to the link are concluded as misbehaving and the cache of all the nodes are updated with the information.

37

Test Plan 6.3 FEATURED TO BE TESTED

1. The net view command is executed and all the nodes in 1. Initialize cache of each node. 2. Each node then adds in its cache a destination node and a path that leads to the node. the network are discovered.

1. After the transfer of message a timer is started which 2. Time out period Tobs calculated the timeout period. 2. This parameter sets a time duration within which the 2ACK packet should be received

1. This parameter keeps track of the number of packets 3. Parameter Cpkts that are transferred from on node to another. 2. Each node in the path maintains this parameter and on forwarding a data packet increments the same.

1. This parameter keeps track of the number of packets that have not received acknowledgment. 4. Parameter Cmis 2. Each node maintains a list of node IDs in the path. If any node does not forward the packet, this parameter is incremented.

1. This parameter is calculated by the ratio of Cmis and Cpkts.

38

Test Plan 2. If this value exceeds the threshold value of 0.85, then 5. Parameter Rmis the link is termed to be misbehaving.

1. After analyzing the route the cache should contain the 6. Maintain Cache updated status of the links. 2. In case of misbehavior, each node updates its cache and updates the status of the link.

6.4 ITEM PASS / FAIL CRITERIA

Item

Pass Criteria

Fail Criteria

Build the cache at each node Net view command execution Route Detection on the basis of the nodes in fails therefore cache cannot be the network by executing the updated. net view command. Message is transferred from source to destination node. Message Transfer Status of the link is not after message The reception of message is evaluated either acknowledged or after transfer. time out link is considered misbehaving. The cache is updated with Unable to update the cache the link status whether the with link statistics. link is misbehaving or not. 6.5 ENVIRMENTAL NEED

Route Analysis

39

Test Plan Hardware o LAN o Personal Computer Software o Operating system : Windows XP

6.6 TEST CASES SPECIFICATION

Test Case Identifier Test Items

Route Detection. 1. get_node() 2. generate_path()

Input Specification

1. computer_name:string

Output Specification

1. Query is executed and result is retrieved

Test

Procedure

Specification Id Purpose

TPS1(for Detection of Route ) This procedure looks up all the nodes present in the network and generates a path to every other node.

Test Procedure

Setup/Startup

When the node is initialized the net view command is executed and nodes in the network are discovered. PROCEDURE Detect Route

40

Test Plan /* this procedure looks up all the nodes present in the network and generates a path to every other node.*/ If command execution succeed BEGIN Flush cache Execute net view For every node in the network do Enter node in the database Find its index Add all the nodes from the current index to node index in the path field END for END Detect Route Else Error message: No computers in network

Measure

1. Query is executed and result is retrieved. If net view command does not execute error is displayed on the page. When the cache contains destination and path to destination. DetectRoute() If anomalous events error is displayed on the page. The information for the nodes in the network is retrieved None

Shut down/Restart Stop Wrap Up Contingencies Procedure Results Variances

41

Test Plan TEST CASE IDENTIFIER #1.1

Test Case Identifier

Get node() 1.execute command 2. get computer name

Test Items

Input Specification Output Specification

1. source node: string 1. Query is executed and result is retrieved

Test

Procedure

Specification Id Purpose Test Procedure Setup/Startup

TPS1(for Get Node )

This procedure gets information of all the nodes present in the network.

The net view command is executed and nodes in the network are discovered. PROCEDURE get node /* this procedure looks up all the nodes present in the network and generates a path to every other node.*/ If command execution succeed BEGIN Flush cache Execute net view For every node in the network do

42

Test Plan Get computer name Enter node in the database Find its index END for END get node Else Error message: No computers in network

Measure

1. Query is executed and result is retrieved.

Shut down/Restart

If net view command does not execute error is displayed on the page.

Stop Wrap Up Contingencies Procedure Results Variances

When the computer name is obtained. Get node() If anomalous events error is displayed on the page. The information for the nodes in the network is retrieved None

TEST CASES IDENTIFIER#1.2 Test Case Identifier Test Items Generate path() 1. access cache 2. get destination node 3. generate path
43

Test Plan

Input Specification Output Specification Test Procedure

1. source node: string 1. Query is executed and result is retrieved

Specification Id Purpose Test Procedure Setup/Startup

TPS1(for Generate path )

This procedure generates path to every other node in the network.

The index of each node in the network is obtained. PROCEDURE generate path /* this procedure generates a path to every other node.*/ If database connection successful BEGIN For every node in the network do Obtain index for node Find the difference between the index Add all the nodes till current index in the path Update cache END for END generate path Else Error message: Database connectivity failed

44

Test Plan

Measure

1. Query is executed and result is retrieved.

Shut down/Restart

If net view command does not execute error is displayed on the page.

Stop Wrap Up Contingencies Procedure Results Variances

When the path is obtained. Generate node() If anomalous events error is displayed on the page. The path is generated. None

TEST CASE IDENTIFIER #2

Test Case Identifier

Message transfer() 1. initialize parameters()

Test Items

2. send packets()

Input Specification Output Specification

1. destination node: string 2. message: string Message is delivered to the next hop.

Test

Procedure

Specification Id

TPS2(for Message Transfer )

45

Test Plan This procedure is used to send the message from source to destination. The destination node is selected and message is written. PROCEDURE message transfer /* this procedure sends the message to destination node.*/ If path is available BEGIN Access cache Get path to destination node For every node in the path do Initialize parameters Set timer Transfer message END for END message transfer Else Error message: path not available

Purpose Test Procedure Setup/Startup

Measure Shut down/Restart Stop Wrap Up Contingencies Procedure Results Variances

1. Query is executed and result is retrieved If next hop neighbor is not available error is displayed on the page. When the message is forwarded. Message transfer() If anomalous events error is displayed on the page. The message is forwarded. None

TEST CASE IDENTIFIER #2.1

46

Test Plan Test Case Identifier Test Items Initialize parameters 1.Check parameters 1.Source node: string Input Specification Output Specification 2.Destination node: string 3. Message: string Parameters are set

Test

Procedure

Specification Id Purpose Test Procedure Setup/Startup

TPS2.1(for initialize parameters) Set the parameters PROCEDURE If communication link established BEGIN Access cache Get path to destination node For every node in the path do Initialize parameters Set timer END for END initialize parameters Else Error message: Connectivity not found

Measure Shut down/Restart

1. Query is executed and result is retrieved If next hop neighbor is not available error is displayed on the page.

47

Test Plan Stop Wrap Up Contingencies Procedure Results Variances When the message is forwarded. Send packets() If anomalous events error is displayed on the page. For each node parameters are set None

TEST CASE IDENTIFIER #2.2

Test Case Identifier Test Items Input Specification Output Specification

Transfer packets() 1. packet 1. Path: string Packet is forwarded

Test

Procedure

Specification Id Purpose Test Procedure Setup/Startup

TPS2.2(for send packets) To forward the packet PROCEDURE If packet is reach to destination BEGIN Access cache Get next node For every node in the path do Check parameters Forward message END for END initialize parameters Else
48

Test Plan Error message: Packet lost

Measure Shut down/Restart Stop Wrap Up Contingencies Procedure Results Variances

Forward message is displayed If next hop neighbor is not available error is displayed on the page When the message is forwarded Initialize parameters If anomalous events error is displayed on the page For each node parameters are set None

TEST CASE IDENTIFIER #3

Test Case Identifier

Route analysis() 1. Generate link status () 2. update cache 1. path: string 2. message: string Appropriate message is displayed

Test Items

Input Specification Output Specification

Test

Procedure

Specification Id Purpose Test Procedure Setup/Startup

TPS3(for Route analysis ) Check for the link status and update cache PROCEDURE If connectivity established

49

Test Plan BEGIN Access cache Get path to destination node For every node in the path do Initialize parameters Set timer Wait for acknowledgement If ack received Increase Cpkts Else Increase Cmiss Calculate ratio Display appropriate message Update cache END for END route analysis Else Error message: No path found and connectivity lost.

Measure Shut down/Restart Stop Wrap Up Contingencies Procedure Results Variances

Message is displayed 1. Query is executed and result is retrieved. If next hop neighbor does not forward error is displayed on the page When the message is displayed Message transfer() If anomalous events error is displayed on the page. None

TEST CASE IDENTIFIER #3.1

50

Test Plan Test Case Identifier Test Items Input Specification Output Specification for generate link statistics Link status 1. path 2. message Link status is displayed

Test

Procedure

Specification Id Purpose Test Procedure Setup/Startup

TPS3.1(for generate link statistics) Detect misbehaving node PROCEDURE If status of link updated BEGIN Access cache Get path to destination node For every node in the path do Initialize parameters Set timer Wait for acknowledgement If ack received Increase Cpkts Proceed Else Increase Cmiss Calculate ratio Display message END for END route analysis Else
51

Test Plan Error message: status of link not known

Measure Shut down/Restart Stop Wrap Up Contingencies Procedure Results Variances

1. Query is executed and result is retrieved If next hop neighbor does not forward message error is displayed on the page When the message is displayed Update cache() If anomalous events error is displayed on the page. Link statistics is generated None

TEST CASE IDENTIFIER #3.2

Test Case Identifier Test Items Input Specification Output Specification

Update cache() 1. cache Path: string Cache is updated

Test

Procedure

Specification Id Purpose Test Procedure Setup/Startup

TPS3.2(for update cache) To update cache PROCEDURE If execution of query successful BEGIN Access cache Get path to destination node For every node in the path do Check for misbehavior If detected Update cache
52

Test Plan Else Forward message END for END route analysis Else Error message: query not executed

Measure Shut down/Restart Stop Wrap Up Contingencies Procedure Results Variances

1. Query is executed and result is retrieved If next hop neighbor does not forward message error is displayed on the page. When cache is updated Generate link_statistics() If anomalous events error is displayed on the page. Cache is updated None

53

Vous aimerez peut-être aussi