课程: Complete Guide To Java Testing with JUnit 5 & Mockito

Key concepts in software testing

- Software testing is a crucial process that determines the reliability and quality of a digital product. Behind every seamless user experience and glitch-free application, there's a meticulously crafted testing strategy and many lines of software testing code. But what actually goes into this testing strategy and what do you aim for when testing an application? In this chapter, we'll explore what it means to test a piece of software well, and how you can automate that testing process. The first step is to understand the underlying concepts that define modern software testing methodologies. At its core, the two main pillars of software testing are the twin pillars of verification and validation. Verification is about making sure the software meets the specified requirements and confirming its technical accuracy. Validation, on the other hand, validates that the software satisfies the needs and expectations of its end users. For example, let's say we were making a mobile banking app. Verification might involve confirming all the features and functionalities outlined in the initial project requirements are correctly implemented. If one of the requirements was to allow users to transfer funds between their accounts, verification would entail checking that the transfer functionality is present in the app, and that it accurately reflects the user's account balances before and after the transaction. This process ensures that the software aligns with the specified requirements and functions as intended. Verification answers the question of, "Are we building the product right?" Verification is often done through code reviews and automated tests. Now, while the product might follow the specifications given by product owners, that does not mean that the product meets the expectations of the customers. When thinking of validation, it's more about are we building the right product? In the case of our banking app, validation would involve ensuring the app provides a seamless and intuitive user experience. For example, validation might entail conducting user testing sessions where representative users interact with the app to perform common tasks such as checking balances, making transfers, and paying bills. Feedback gathered from these sessions can help validate whether the app meets user expectations in terms of usability, performance, and security. By understanding and implementing these two principles, testers can ensure that the software not only functions correctly, but also delivers value to its intended customer.

内容