1. Introduction to Software Testing
Testing is an integral part of any successful software project. The types of software testing depend on various factors, including project requirements, budget, timeline, expertise, and suitability. The different Types of software testing are the key role where the tester determines the right testing for the apps. Functional testing and non-functional testing are the two kinds of testing performed by the QA or Software Tester (Get Started With The Different Types Of Software Testing).
Functional and non-functional testing:
Functional testing is a type of software testing that verifies that the application performs its functions according to the specified requirements. It focuses on what the system does.
Key Aspects:
1. Testing Features: Functional testing ensures that individual features or functions of the software operate as intended.
2. Requirements-Based: Test cases are derived from the functional specifications or requirements of the software.
3. Examples:
-
- Testing the login functionality of a web application.
- Verifying that a calculator application performs arithmetic operations correctly.
Non-functional testing is a type of software testing that assesses aspects of the software that are not related to specific behaviors or functions. It focuses on how well the system operates in terms of various attributes.
Key Aspects:
1. Quality Attributes: Non-functional testing evaluates qualities such as performance, security, usability, reliability, and more.
2. User Experience: It aims to ensure that the software not only works correctly but also meets user expectations in terms of performance and usability.
3. Types of Non-Functional Testing:
-
- Performance Testing: Assessing speed, responsiveness, and scalability.
- Security Testing: Identifying vulnerabilities and ensuring data protection.
- Usability Testing: Evaluating the user-friendliness and overall user experience.
- Reliability Testing: Verifying system stability and consistency.
- Scalability Testing: Assessing the software's ability to scale with changing demands.
4. Examples:
-
- Testing how well a web application performs under heavy user loads.
- Evaluating the security features of an online banking system.
- Assessing the usability of a mobile application interface.
Key Differences:
· Focus:
-
- Functional Testing: Focuses on what the system does, verifying specific functionalities.
- Non-Functional Testing: Focuses on how well the system operates in terms of various attributes.
· Testing Goals:
-
- Functional Testing: Ensures that the software behaves according to specified functional requirements.
- Non-Functional Testing: Evaluates attributes like performance, security, usability, etc., ensuring the software meets quality expectations.
· Test Cases:
-
- Functional Testing: Test cases are derived from functional specifications.
- Non-Functional Testing: Test cases address quality attributes and performance characteristics.
· Examples:
-
- Functional Testing: Verifying that a shopping cart adds and removes items correctly.
- Non-Functional Testing: Assessing how quickly a website loads under different user loads.
In practice, both types of testing are crucial for delivering a well-rounded and high-quality software product. They complement each other in ensuring that the software not only functions correctly but also meets performance, security, and usability standards.
Change Related Testing:
Regression testing, sanity testing, smoke testing, and acceptance testing are different types of software testing performed at various stages of the development life cycle. Each serves a specific purpose and is conducted under specific conditions. Here's a brief overview of each:
Regression Testing:
- Purpose: To ensure that new changes or modifications in the software do not negatively impact existing functionalities.
- Scope: It involves testing the entire application or a significant part of it to uncover any unexpected side effects.
- Execution: Usually performed after code changes, bug fixes, or new features are added to the software.
- Common Features: Comprehensive testing and automated testing tools are often used, and it is an iterative process.
Sanity Testing:
- Purpose: To quickly verify that a specific functionality or a set of functionalities work as expected after changes.
- Scope: Limited to a specific part of the application or a specific set of functionalities.
- Execution: Typically performed before more comprehensive testing, such as regression testing or full system testing.
- Common Features: Narrow focus, quick execution, and it helps in deciding whether to proceed with more detailed testing.
Smoke Testing:
- Purpose: To check whether the software build is stable enough for further testing.
- Scope: It covers the essential functionalities and major components of the application.
- Execution: Conducted at the beginning of the testing process, often after a new build is received.
- Common Features: Quick execution, basic functionality validation, and it helps in identifying critical issues early in the testing cycle.
Acceptance Testing:
- Purpose: To ensure that the software meets the specified requirements and is accepted by the end-users or stakeholders.
- Scope: Typically involves testing the entire system from the user's perspective, including both functional and non-functional requirements.
- Execution: Performed after the system has passed other testing phases (such as regression testing, sanity testing, and smoke testing).
- Common Features: Involves user acceptance, often done by end-users or client representatives, and focuses on overall system behaviour.
Differences:
Scope:
- Regression Testing: Involves testing the entire application or a significant part of it.
- Sanity Testing: Focuses on a specific part or functionality of the application.
- Smoke Testing: Covers essential functionalities to check if the build is stable.
- Acceptance Testing: Encompasses the entire system, testing it as a whole.
Purpose and Timing:
- Regression Testing: Ensures that new changes do not affect existing functionalities and is performed after code modifications.
- Sanity Testing: Quickly verifies specific functionalities and is often done before more comprehensive testing.
- Smoke Testing: Checks the stability of a build and is performed at the beginning of the testing process.
- Acceptance Testing: Ensures the software meets specified requirements and is performed after other testing phases.
Execution Speed:
- Regression Testing: This can be time-consuming, especially for large applications.
- Sanity Testing: Quick execution, focusing on specific areas.
- Smoke Testing: Quick execution to check the basic stability of a build.
- Acceptance Testing: Generally takes more time as it involves comprehensive testing from the user's perspective.
In summary, these testing types serve different purposes in the software development life cycle and are conducted under different conditions. They collectively contribute to ensuring the quality and reliability of the software product.
Static and dynamic testing
Static testing and dynamic testing are two fundamental approaches to software testing, each serving a distinct purpose in the software development life cycle.
Static Testing:
- Definition:
-
-
- Static testing is a type of testing that is performed without executing the code. It involves reviewing and analyzing the software artifacts, such as requirements, design documents, source code, and test plans.
-
- Purpose:
-
-
- The main goal of static testing is to find defects in the early stages of development before the code is executed. It helps in identifying issues related to requirements, design, and coding standards.
-
- Activities:
-
-
- Common static testing activities include:
- Reviews: Manual examination of documents or code by individuals or teams to identify issues.
- Inspections: Formal evaluations where a group of stakeholders examines a work product to detect defects.
- Walkthroughs: Informal sessions where the author of a document or code walks through it with peers for feedback.
-
- Benefits:
-
- Early defect detection and correction.
- Improved code quality.
- Cost-effective as issues are identified and resolved before execution.
-
Dynamic Testing:
- Definition:
- Dynamic testing involves the execution of the software code to validate its behavior, functionality, and performance. It is performed by running the application and assessing its actual output against expected results.
- Purpose:
- The primary goal of dynamic testing is to ensure that the software behaves as intended, meets specified requirements, and performs correctly under various conditions.
- Activities:
- Dynamic testing activities include:
- Unit Testing: Testing individual units or components of the software in isolation.
- Integration Testing: Testing the interactions between integrated components or systems.
- System Testing: Evaluating the complete and integrated system as a whole.
- Acceptance Testing: Verifying that the software meets user expectations and requirements.
Benefits:
- Identifies defects that may not be apparent during static testing.
- Validates the software against actual user scenarios.
- Ensures the software functions correctly in its operational environment.
- Dynamic testing activities include:
Key Differences:
Timing:
-
- Static Testing: Conducted before code execution during the early stages of development.
- Dynamic Testing: Involves the execution of code and is performed during or after the coding phase.
Type of Activities:
-
- Static Testing: Involves activities like reviews, inspections, and walkthroughs.
- Dynamic Testing: Involves activities like unit testing, integration testing, system testing, and acceptance testing.
Focus:
-
- Static Testing: Focuses on finding issues in the software artifacts (e.g., requirements, design, and code).
- Dynamic Testing: Focuses on evaluating the behavior and performance of the running software.
Execution:
- Static Testing: Does not involve code execution.
- Dynamic Testing: Requires the execution of the software code.
Both static and dynamic testing are crucial for ensuring the overall quality and reliability of software. Combining these approaches provides a more comprehensive assessment throughout the software development life cycle.
Black box testing, grey box testing, and white box testing are three different testing approaches used to evaluate software from different perspectives. These testing methods vary based on the knowledge of the tester about the internal workings of the system being tested.
White, grey and black box testing
- Black Box Testing:
- Definition:
- Black box testing is a testing approach where the tester does not have any knowledge of the internal structure, design, or implementation of the software. The focus is solely on the inputs provided to the system and the corresponding outputs.
- Characteristics:
- Testers are concerned with the software's functionality, not its internal code.
- Test cases are designed based on the system's specifications or requirements.
- The internal logic or code is not visible to the tester.
- Advantages:
- Encourages a user-centric perspective.
- Testers don't need to be familiar with the codebase.
- Simulates real-world scenarios.
- Disadvantages:
- May not reveal certain types of defects related to code structure or internal logic.
- Test coverage might be limited.
2. White Box Testing:
- Definition:
- White box testing, also known as clear box or glass box testing, is a testing approach where the tester has complete knowledge of the internal workings, code structure, and implementation of the software being tested.
- Characteristics:
-
- Test cases are designed based on an understanding of the internal code.
- The tester has access to the source code, and tests are designed to cover all possible paths through the code.
- Internal logic and control flow are scrutinized.
- Advantages:
-
- Allows for thorough testing of code paths and logic.
- Effective in uncovering hidden errors or defects.
- Greater coverage of the codebase.
- Disadvantages:
- Requires knowledge of the programming language and codebase.
- Testing may be biased by the tester's understanding of the code.
3. Grey Box Testing:
- Definition:
- Grey box testing is a combination of both black box and white box testing. Testers have partial knowledge of the internal workings of the system, usually at the system or functional level.
- Characteristics:
- Testers have limited access to internal code details, focusing on higher-level functionalities.
- Test cases are designed based on both system specifications and some knowledge of the internal code.
- Advantages:
- Balances the advantages of both black box and white box testing.
- Testers can design test cases with a broader understanding of the system.
- Disadvantages:
- Limited visibility into the internal code, which may affect the depth of testing.
- The effectiveness depends on the extent of knowledge the tester has about the internal workings.
Key Differences:
- Knowledge Level:
- Black Box Testing: No knowledge of internal code.
- White Box Testing: Full knowledge of internal code.
- Grey Box Testing: Partial knowledge of internal code.
- Focus:
- Black Box Testing: Functionalities and inputs/outputs.
- White Box Testing: Internal code paths, logic, and structure.
- Grey Box Testing: Combination of functionalities and partial understanding of internal code.
- Testing Level:
- Black Box Testing: High-level testing.
- White Box Testing: Low-level testing.
- Grey Box Testing: Mid-level testing.
Each testing approach has its advantages and is suitable for different testing scenarios. Choosing the appropriate testing method depends on the testing objectives, available information, and the testing team's expertise (Different approaches to testing: what is their essence and which one to choose for your projects).
By running a number of tests at every stage of the software development process, you will save a lot of time and resources by spotting faults, defects, and bugs in the system early on, which if missed, can cause expensive complications and delays down the development line.
As every software or application is different in nature, the number and the different types of software testing you need to run will vary greatly (What Are the Different Software Testing Types?).
Useful links:
“SOFTWARE TESTING. BASE COURSE” By Svyatoslav Kulikov
A Practitioner's Guide to Software Test Design
“TESTING DOT COM, OR MANUAL ON HARSH TREATMENT OF BUGS IN INTERNET START-UPS” By Roman Savin
“BLACK-BOX TESTING: TECHNIQUES FOR FUNCTIONAL TESTING OF SOFTWARE AND SYSTEMS” BY BORIS BEIZER
ISTQB Certified Tester Foundation Level: A Self-Study Guide Syllabus v4.0
ISTQB Foundation Level exam (CTFL) in 2023
Foundations of Software Testing: ISTQB Certification by Dorothy Graham