Software Testing | Software Engineering

Software Testing | Software Engineering

What is Software Testing?

Software testing in Software engineering is a systematic approach to identifying and eliminating defects in a software application.

Types of Software Testing

Software testing is categorized into two main types:
  • Manual Testing
  • Automation Testing

Manual Testing

  • Manual testing is a method where testers execute test cases manually without using any automation tools.
  • It relies on human observation and intuition to identify defects.

Methods of Testing

  • White box testing
  • Black box testing
  • Gray box testing

White Box Testing in Software Engineering

  • White box testing also known as structural testing, is a software testing method that examines the internal code structure and logic of a software application.
  • for example, White Box Testing Verifies that a sorting algorithm correctly arranges numbers in ascending order by checking its source code.

Black Box Testing in Software Engineering

  • In this method, the tester examines the software's functionality without knowing its internal structure.
  • Test cases are derived from the software's specifications and requirements.
  • for example, Black Box Testing Ensures a search bar on a website returns relevant results without knowing the search algorithm's inner workings.

Grey Box Testing in Software Engineering

  • Grey box testing is like a blend of black box and white box testing.
  • Testers have some knowledge about how the software works on the inside, and they use this information to create test cases.
  • It's a middle-ground approach that helps ensure better testing coverage and effectiveness.
  • for example, Gray Box Testing Validate that a banking application securely processes transactions while having limited knowledge of its internal code.

Automation Testing

  • Automation testing involves the use of testing tools and scripts to automate test case execution.
  • It offers efficiency, repeatability, and quicker feedback.

Levels of Testing

Software testing is carried out at multiple levels, each focusing on different aspects of the software.

Unit Testing

  • Unit testing is like examining the building blocks of software.
  • It's the first step in testing where we check each small part of the software on its own to make sure it works perfectly.
  • Example: Testing an individual function like "add" in a calculator app with inputs (2, 3) to ensure it returns 5.

Integration Testing

  • Integration testing verifies the interactions between different units when combined.
  • Integration testing ensures that the units work harmoniously together.
  • Example: Checking that the shopping cart smoothly interacts with the payment system during online checkout.

System Testing

  • System testing evaluates the entire software system as a whole to check its compliance with specified requirements and its overall functionality.
  • Example: Testing the entire airline reservation system from booking to ticket issuance to ensure it works seamlessly.

Types of Testing in Software Engineering

Verification vs Validation

In software testing, validation and verification are crucial concepts:

Verification

  • Verification is the process of evaluating whether a product meets specified requirements.
  • Verification focuses on assessing the design, development, and implementation phase
  • Example: In software development, verification activities can include code reviews, static analysis, and unit testing.

Validation

  • Validation is the process of evaluating a final product at the end of the development process to determine whether it satisfies the needs of the stakeholders.
  • Example: In software development, validation activities can include user acceptance testing (UAT).

Alpha Testing

  • Alpha testing is conducted in a controlled environment by the internal development team.
  • It aims to identify defects and gather feedback from the team before releasing the software to beta testers or end-users.
  • Example: The software development team at a company tests a new mobile app internally to identify and fix any major issues, such as crashes.

Beta Testing

  • Beta testing is a type of software testing that occurs after alpha testing and before the official release of a software product to the general public.
  • During beta testing, a pre-release version of the software, known as a "beta" version, is made available to a select group of external users.
  • Example: A video game company invites a group of dedicated gamers to play a pre-release version of their game, collecting feedback on gameplay.

Acceptance Testing

  • Acceptance testing is the final stage, where the software is evaluated against the user's acceptance criteria.
  • It determines whether the software is ready for production release.
  • Example: A bank's end-users and stakeholders review and test a new online banking platform to ensure it meets regulatory requirements, before putting it into production use.

Functional Testing

  • Functional testing verifies that each function of the software operates as intended.
  • It ensures that the software meets the specified functional requirements.
  • Example: Testing an email application's "send" button to ensure that when clicked, it correctly sends an email.

Structural Testing

  • Structural testing examines the software's internal code and structure to ensure that it is free from any coding errors.
  • Example: Analyzing the code of a web server to identify potential vulnerabilities such as incorrect access control.

Testing vs Debugging

Testing and debugging are often confused, but they serve different purposes:

Testing

  • Testing is the process of identifying defects and ensuring that the software meets the specified requirements.
  • It focuses on validating the software's functionality and reliability.
  • Example: Testing a newly developed e-commerce website to verify that users can browse products and add items to the cart, without encountering issues.

Debugging

  • Debugging is the process of identifying and fixing defects found during testing.
  • It involves pinpointing and resolving issues in the software's code.
  • Example: Debugging a software program to fix a logic error that causes it to crash when specific input data is provided.

What is Software Maintenance?

Software maintenance refers to the process of managing and updating a software application or system after it has been developed and deployed.

Types of Software Maintenance

There are four types of maintenance:
  • Preventive Maintenance: Preventive maintenance involves proactively identifying and addressing potential issues before they can cause problems.
  • Perceptive Maintenance: Perceptive maintenance focuses on making improvements to the software based on user feedback and changing requirements.
  • Adaptive Maintenance: Adaptive maintenance refers to making changes to the software so that it can easily adjust to new environments.
  • Corrective Maintenance: Corrective maintenance deals with fixing defects and issues found during testing or regular usage.

Software Maintenance Tools

To effectively manage software maintenance, various tools and techniques can be employed:
  • Version Control Systems: Version control systems like Git help manage code changes and collaboration among developers.
  • Bug Tracking Systems: Bug tracking systems like Jira or Bugzilla assist in identifying and resolving issues efficiently.
  • Automated Testing Tools: Automation testing tools, such as Selenium or JUnit, aid in executing test cases rapidly and consistently.
  • Performance Monitoring Tools: Performance monitoring tools like New Relic or Datadog help identify performance bottlenecks and optimize the software's performance.

Conclusion

Software testing is the systematic process of identifying and eliminating defects in a software application to ensure its functionality.
Software testing encompasses manual and automated testing methods, including unit, integration, and system testing, and plays a crucial role in maintaining software quality.