Subscribe by Email


Showing posts with label Encapsulation. Show all posts
Showing posts with label Encapsulation. Show all posts

Tuesday, July 16, 2013

What are the characteristics of network layer?

- The network layer comes at number three in the OSI model of networking. 
The duty of this layer is to forward and route the packets via the intermediate routers. 
- It comes with functional as well as procedural means for the transfer of data sequences with variable length from a source host to a destination host and across one or more networks. 
- During the transfer it also takes the responsibility for the maintenance of the services functions’ quality. 

There are many other functions of this layer such as:

Ø Connection-less communication: In IP, a datagram can be transmitted from one host to another without any need for the receiving host to send an acknowledgement. Protocols that are connection oriented are used on the higher levels of the OSI model.

Ø  Host addressing: Every host in the network is assigned a unique address that determines its location. A hierarchical system is what that assigns this address. These are the addresses that are known as the IP (internet protocol) addresses.

Ø  Message forwarding: The networks are sometimes divided in to a number of sub – networks which are then connected to other networks for facilitating wide – area communication. Here specialized hosts called routers or gateways are used for forwarding the packets from one host to another.

Characteristics of Network Layer

Encapsulation:
- One of the characteristics of the network layer is encapsulation. 
- Network layer ought to provide encapsulation facilities. 
- It is necessary that the devices must be identified with the addresses. 
- Not only the devices but the network layer PDUs must be assigned such addresses. 
- The layer 4 PDU is supplied to the layer 3 during the process of encapsulation. 
- For creating the layer 3 PDU, a layer 3 label or header is added to it. 
- In reference to the network layer, this PDU thus created is referred to as a packet. 
- On creation of a packet, the address of the receiving host is included in the header. 
- This address is commonly known as the destination address. 
- Apart from this address the address of the source or the sender host is also stored in the header. 
- This address is termed as the source address. 
- Once the encapsulation process is complete, the layer 3 sends this packet to the data link layer for preparing it to be transmitted over the communication media.

Routing: 
- The services provided by the network layer for directing the packets to the destination addresses define this characteristic. 
- It is not necessary that the destination and the source hosts must always be connected to the same network.
- In actual, the packet might have to go through a number of networks before reaching the destination. 
- During this journey the packet has to be guided to reach the proper address. - This is where the routers come in to action. 
- They help in selecting the paths for guiding the packets to the destination. 
This is called routing. 
- During the course of routing of the packet, it may need to traverse a number of devices.
- We call the route taken by the packet to reach one intermediate device as “hop”. 
- The contents of the packet remain intact until the destination host has been reached.


De-capsulation: 
- On the arrival of the packet at the destination address, it is sent for processing at the third layer. 
- The destination address is examined by the host system for verifying whether the packet is meant for itself or not. 
- If the address is found to be correct, the decapsulation process is carried out at the network layer. 
- This layer passes the layer 4 PDU to the transport layer for appropriate servicing. 


Sunday, July 31, 2011

Introduction to Object Oriented Testing Methods

Object oriented testing begins in the small with a series of tests designed to exercise class operations and check whether errors exist as one class collaborates with other classes. Use based testing along with fault based testing is applied to integrated classes. In the end, use cases are used to uncover errors at software validation level.

Encapsulation can create a minor problem when testing because testing reports on concrete and abstract state of an object. Multiple inheritance complicates testing by increasing number of contexts for which testing is required. Black box testing methods are appropriate for object oriented systems as they are for systems developed using conventional software engineering methods.

The strategy for fault based testing is to hypothesize a set of possible faults and then derive the tests to prove each of that hypothesis. The effectiveness of these techniques depends on how testers see a plausible fault.

Inheritance complicates the testing process. even though the base class has been properly tested, there is a need to test all classes derived from it.

Scenario based testing will uncover errors that occur when any actor interacts with the software. It concentrates on what the user does and not what the product does. This type of testing uncovers interaction errors.

Surface structure is an externally observable structure of object oriented program. Testing surface structure is similar to black box testing. Deep structure refers to the internal technical details of object oriented program. It exercises dependencies, behaviors and communication mechanisms. It is similar to white box testing.


Tuesday, July 26, 2011

Object Oriented Software and its Test Strategies...

In testing object oriented software, the objective of testing remains the same. The nature of object oriented software changes both testing strategy and testing tactics.

UNIT TESTING IN OBJECT ORIENTED CONTEXT
In object oriented software, an encapsulated class is the focus of unit testing. Encapsulation means that class and class object packages the attributes and operations that manipulate the data. A class contains many operations so unit testing these operations must also vary.
Class testing for object oriented software is analogous to module testing for conventional software. It is not advisable to test operations in isolation. Unit testing of conventional software focus on algorithmic detail of module and the data that flows across module whereas unit testing for object oriented software focus on operations encapsulated by class.

INTEGRATION TESTING IN OBJECT ORIENTED CONTEXT
An important strategy for integration testing of object oriented software is thread based testing. Threads are set of classes that respond to an input or event. Each thread is integrated and tested individually. Regression testing is done.
Another strategy is the use based tests that focus on classes that do not collaborate heavily with other classes.

The behavior of drivers and stubs also changes during integration testing of object oriented software. Drivers test operations at lowest level and for testing whole group of classes. Stubs are used where collaboration between classes is required but one or more collaborating class is not fully implemented.


Saturday, February 19, 2011

Component Level Design - Designing Class based Components - Coupling

The complexity of the system increases as the amount of collaboration and communication increases. As the complexity increases, difficulty in implementing, testing, and maintaining software also increases.

Coupling is a qualitative measure of the degree to which classes are connected to each other. Coupling increases as the classes become more dependent on each other. The main objective of component level design is to minimize coupling as much as possible.

As the design for each software component is elaborated, the focus shifts to the design of specific data structures and procedural designs to manipulate the data structures. There are different categories of coupling :

- Content Coupling
Content coupling is when one module modifies or relies on the internal workings of another module. This violates the basic design concept i.e. information hiding.
- Common Coupling
In common coupling, two modules share the same global data. It can lead to uncontrolled error propagation and side effects.
- Control Coupling
In Control coupling, one module controls the flow of other module. The problem is that an unrelated change in second module can result in the change of the meaning of control flag.
- External Coupling
Two modules share an external data format. A component communicates or collaborates with infrastructure components. It is necessary but should be limited to small number of components or classes.
- Data Coupling
Data coupling is when modules share data through. The bandwidth of communication grows and the complexity also increases.
- Stamp Coupling
In this type of coupling, modules share a composite data structure. It occurs when class B is declared as an argument of an operation of class A and therefore the system becomes more complex.
- Routine Call Coupling
It occurs when one operation invokes another. This type of coupling is quite necessary but it does increase the interconnectedness of a system.
- Type Use Coupling
It occurs when component A uses a data type in component B. If the type definition changes, every component that uses the definition also changes.
- Inclusion Coupling
In this type of coupling, component A includes or imports a package or content of component B.


Tuesday, February 8, 2011

Object Oriented Testing Methods - Fault Based Testing

Object oriented system testing begins at different levels to uncover errors that may occur as classes collaborate with one another and subsystems communicate across architectural layers.
Actual object oriented testing begins with a series of tests designed to exercise class operations and check whether errors exists when a class collaborates with other classes.
Attributes and operations are encapsulated, testing operations outside of the class is unproductive. Encapsulation, an essential design concept, creates a minor obstacle during testing. Inheritance also leads to additional challenges for the test case designer. Multiple inheritance complicates testing further by increasing the number of contexts for which testing is required.
White box testing methods like basis path, loop testing or data flow techniques can help to ensure that every statement in an operation has been tested. Black box testing methods are also appropriate for object oriented systems as they are for systems developed using conventional software engineering methods.

FAULT BASED TESTING


The strategy for fault based testing is to hypothesize a set of plausible faults and then derive tests to prove each hypothesis. The objective of fault based testing within an object oriented system is to design tests that have a higher possibility of uncovering plausible errors. Test cases are designed to exercise the design or code and to determine whether faults exist. This approach is really no better than any random testing technique if faults in object oriented systems are implausible.

Three types of faults are encountered when integration testing looks for plausible faults in operation calls or message connections. These faults are:
- unexpected result.
- wrong operation/message used.
- incorrect invocation.
Integration testing applies to attributes as well as operations. Integration testing attempts to find errors in the client side and not the server.


Facebook activity