Bug is Defect and Defect is Bug – Right or Wrong?

The purpose of software testing is to reduce issues to a minimal level and to carve out optimal quality for a product. When it comes to bugs and defects, there are different schools of thought, but quality is always the main focus. There is no concrete definition of bugs or defects written in stone or certified by a governing body, but ideally both fall into these category of issues:

  • Bugs are issues found during the testing lifecycle. Issues in code can cause bugs.
  • Defects are issues found in the production environment, and may be a deviation from the requirement. They can also be found by a developer while unit-testing.

While defects and bugs are both issues in an application, the difference between the two depends on the stage they are caught at. If they are discovered during the testing life cycle then they are classified as bugs. If they are discovered and corrected by the developers themselves, or if they are discovered after the production of the software, then they are considered defects. Technology and process together are like super powers for a software product, possessing magical formulas to reduce bugs and/or defects and produce high quality products. Both have a direct impact on “cost of quality” in a product. While quality is free and built-in, this shouldn’t be an additional effort to make the product better.

Managing Bugs and Defects:

Bugs and defects are logged with details comprised of: priority, status, versions, sprints, summary, description, steps to replicate, screenshots, and other discussions. These details are helpful to identify and resolve them. Defects/Bugs can be assigned with the priorities described below or as defined by the specific project:

  • Critical: The issue is an immediate blocker for testing, and a corrective version needs to be deployed to stage to continue testing
  • High: The issue needs to be fixed during this sprint for testing on this component of the site to continue the next sprint or blocking any US delivery
  • Medium: The issue should be resolved before go-live/User Acceptance Testing (UAT), but does not prevent further testing
  • Low: Any issue that does not prevent going live or UAT — typically may be a user interface (UI) issue or something

Defects or Bugs can be categorized as:

  • Functional
  • Device specific
  • Browser/OS specific
  • User/Role specific
  • Regression defects
  • UI defects
  • Performance related: The most common use case here is when something works when one person is using it but it may not work when hundreds of people are.

There are many reasons why a bug or a defect can pop up in software. Here are a few of the most common reasons that bugs are found during software testing:

  • Poor coding practices: Sometimes errors are slipped into the code simply due to bad coding. Bad coding practices can include inefficient or missing error/exception handling, and lack of proper validations (data types, field ranges, boundary conditions, memory overflows etc.)
  • Improper implementation of business logic
  • Missing Functionality: Requirement not implemented
  • Extra Functionality: Added something more than needed
  • Boundary conditions not addressed/incorrect
  • Inadequate/ incorrect/ misleading or missing error messages
  • Inadequate test coverage

When it comes to defects, there are a few best practices to keep in mind to prevent defects from being introduced. These include:

  • Requirements review
  • Milestone demos
  • Hands on to client for developed code
  • Code reviews
  • Strict quality assurance
  • Performance checks
  • Improved unit testing and integration testing

Bugs and Defects in Drupal

Drupal is a community driven software development platform, which means it’s supported by thousands of developers. When it comes to Drupal, there are great standard features in place, like easy content authoring, reliable performance, theming, and excellent security. These are supported by modules that extend Drupal's functionality, and encourage integration with external systems using Web Services. Drupal provides user and role management at a granular level, making the overall maintenance of a Drupal site is easier since these features and modules are pre-built and pre-tested, reducing the probability of bugs. This frees up more time to spend writing code, instead of fixing code. If a bug does occur, each module has an issue queue, which makes it easier to find a solution, join a brainstorming session, or contribute effectively. Moreover, there are additional tools and plugins available to specifically debug Drupal code. It allows engineers find issues pre-hand and produce quality software. No matter what software you are working with, you’ll eventually come across bugs or defects. However, with the right processes and testing in place, these will be minor hiccups and not roadblocks.