Skip to main content

Command Palette

Search for a command to run...

Introduction to Software Testing

Published
4 min read
Introduction to Software Testing
M

I'm an agile learner, mobile developer, tech lover and a mentor.

I am currently interested in AI and Robotics

I did a software testing course last semester in school, and it was quite eye-opening. To be honest, I thought testing was just about finding bugs. But from what I learnt deeper, it was much more than that; it's about making sure the software you build (or use!) works the way it should and, even better, the way you expect it to.

In this article, I'll share my knowledge about the basics of software testing, what it's all about, why it matters, and the different ways you approach it in software engineering.

What is Software Testing?

Software testing is a critical element of software development life cycles, called software quality control or software quality assurance. It is the process of ensuring that software applications are of high quality, meet their intended purpose, and function flawlessly.

Why Do You Test Software?

When you test software, you're primarily aiming for two big goals:

  1. Validation: This is about asking, "Are you building the right product?"

    • You're checking if the software meets the user's needs and expectations. Does it solve the problem it was designed for? Is it useful to you, the end user? You're making sure the software is suitable for its intended purpose.
  2. Verification: This is about asking, "Are you building the product right?"

    • You're checking if the software is built according to its technical specifications and requirements. Does the code work as it was designed? Is it free of errors and performance issues? You're ensuring the internal workings are sound and meet the defined standards.

These two goals might sound similar, but they're different. Validation focuses on the user's perspective and needs, while verification focuses on the technical build and requirements. By doing both, you ensure you deliver a high-quality product.

Types of Testing

  • Manual Testing: This is when you (or another person) manually go through the software, clicking buttons, entering data, and performing actions just like a real user would. You are directly interacting with the software to find bugs or issues.

  • Automated Testing: This involves writing code (using special tools and frameworks) that automatically performs tests on your software. Instead of you clicking every button, a script does it repeatedly and reports the results.

  • Continuous Testing: This is not a specific type of test but rather an approach to testing. It means integrating testing into every stage of the software development process, from the very beginning to the very end. Instead of testing only at the end, you're constantly testing small pieces as you build them.

Differences and Similarities Between Testing Approaches

While manual and automated testing seem opposite, they often work together.

Differences:

  • Manual: It relies on human observation, intuition, and exploratory thinking. It is best for usability, visual checks, and complex user flows. It can be slow and prone to human error for repetitive tasks.

  • Automated: It relies on scripts and predefined rules. It is excellent for speed, repetition, and consistency. It struggles with subjective elements like user experience or unexpected visual changes.

Similarities:

  • Both aim to find defects: whether it's a human or a machine running the test, the core goal is to uncover issues in the software.

  • Both confirm functionality: they verify that features work as intended.

  • Both rely on test cases: you need to define what to test, even if a machine is doing the actual execution.

Levels of Software Testing

  • Unit Testing: This is the very first level of testing. Here, you focus on testing the smallest, individual pieces of your code, called "units". A unit is usually a single function, method, or component that does one specific thing. The programmer who writes the code is often the one who writes these tests.

  • Integration Testing: Once you're confident that your unit tests work, you move to integration testing. This is where you combine several units or modules and test them as a group. You're checking if these combined parts interact correctly and pass data smoothly between each other.

  • System Testing: After individual parts and integrated modules have been tested, you perform system testing. This is where you test the entire software application as one complete system. You're checking if the fully assembled software meets all the overall requirements and works end-to-end, just like a user would experience it. This often includes testing performance, security, and how easy it is to use.

  • Acceptance Testing: This is the final level of testing, often done by the actual users or clients or by a specialised testing team that represents the users. The goal here is to confirm if the software meets the user's requirements and business needs. If you're building an app for a client, they'll check if it does exactly what they asked for.

Software testing is very important for building reliable software. From understanding the core goals of validation and verification to exploring different testing approaches and levels, I've learnt that testing isn't just about breaking things; it's about ensuring quality and delivering software that truly meets your expectations.

You now have a basic understanding of software testing. It's a field with many layers, but by grasping these fundamentals, you're well on your way to appreciating why testing is indispensable in bringing great software to life. Keep exploring, and you'll soon see how you can apply these ideas in your projects!