Loading

Cohesion in Software Testing


Introduction:

Software development is a tedious and expensive activity by which an application worth million dollars in created. The trend of software emerged as a result of a need for a system which has a certain measure of security and which is not prone to loss of data or data mishandling.

Various mistakes and misconceptions led to the state of software industry built today. Software testing being the most important activity in the Software Development Life Cycle, there are quite a few concepts in it that form the core of the whole process.

The inception of software development activity begins with the assimilation of all the requirements that the system under development must deliver as the final outcome.

What is Cohesion?

Cohesion is an aspect of software testing wherein the idea is to determine the degree of dependence among the elements of the same module, that is, how the extent of association between the functionalities of a particular module.Greater the cohesion, better is the program.

Cohesion

In the above diagram, overlapping functions represent a high cohesion, hence 'module 1' and 'module 2' will be termed as 'highly cohesive' modules in contrast with 'module 2' which has less cohesive elements.

Types of Cohesion:

The following points enlists the types of cohesion starting with the worst gradually proceeding towards the best type of cohesion.

  • Coincidental cohesion: This type of cohesion is an unplanned activity where parts of a module are broken down into pieces. In order to get a clear picture of the various elements within the module, it is often broken down into sub modules, for further clarity. The only drawback being the confusion led by such division.
  • Logical cohesion: Elements that fall into similar types are put under different categories pertaining to a specific functionality or logic. For eg. Grouping of all mouse and keyboard events.
  • Temporal cohesion: When the elements of a module are grouped or organised to be executed at some point later on.
  • Procedural cohesion:Elements of a module are grouped together in order to execute in a sequence to deliver a single task, is known as procedural cohesion. The elements are grouped because they follow a certain kind of sequence of execution.
  • Informational cohesion: Such a cohesion occurs on the parts of a module that are grouped together as they are supposed to operate on the same data or information.
  • Sequential cohesion: In such a cohesion technique, output from one part of the module is an input to some other portion/element of the same module.
  • Functional cohesion:This is the best cohesion and the ideal one. According to this cohesion type, the elements are grouped together as they contribute towards a single function. This group of element is reusable.

Conclusion:

The most desirable type of cohesion is functional but it is not easy to achieve. Often the cohesion attained during the course of testing is either communicational/sequential.

ThinkSys Advertisement
ThinkSys Advertisement
ThinkSys Advertisement


Advertisement:

ThinkSys Advertisement


LP

App development ad thinksys

Devops