Unit 01 Basics of Software Testing and Testing Methods PDF
Document Details
Uploaded by Deleted User
Tags
Related
- Week 8 Software Testing - Fundamentals of Software Engineering PDF
- Software Testing Lecture 3 PDF
- ISTQB-CTFL-AT_3 PDF Agile Testing Methods, Techniques, and Tools
- Libyan International University Lecture 2 On Formal Models and Methods PDF
- Lecture 3 - Agile Software Development (CSE241/CMM341) PDF
- Chapter 8 Software Testing PDF
Summary
This document provides an introduction to software testing, covering definitions, objectives, and different types of testing such as: static testing, dynamic testing, black box testing, white box testing.
Full Transcript
UNIT 01. BASICS OF SOFTWARE TESTING AND TESTING METHODS What is Software Testing? Definition: Software Testing is the process of evaluating a software application to ensure it meets specified requirements and functions as expected. Purpose: It helps detect errors, gaps, or m...
UNIT 01. BASICS OF SOFTWARE TESTING AND TESTING METHODS What is Software Testing? Definition: Software Testing is the process of evaluating a software application to ensure it meets specified requirements and functions as expected. Purpose: It helps detect errors, gaps, or missing requirements in comparison to actual requirements. Goal: The main goal of testing is to identify and fix bugs or defects, ensuring high quality, reliability, and performance of the software. Objectives of Software Testing 1. Finding Errors: o Testing is process of executing a program with an intention of finding an error. 2. Ensuring Software Reliability o Verify that the software performs as expected under different conditions, ensuring reliability. 3. Enhancing Software Quality o Improve the overall quality by making the software more stable and reducing failures. 4. Validating User Requirements o Confirm that the software meets all specified user and functional requirements. 5. Reducing Risk o Minimize potential risks associated with software deployment and usage. 6. Ensuring Customer Satisfaction o Deliver a quality product that meets or exceeds user expectations, increasing customer satisfaction. Diploma Helper. Feel free to DM us at. 8698079745 UNIT 01. BASICS OF SOFTWARE TESTING AND TESTING METHODS Failure, Error, Fault, Defect, and Bug Terminology 1. Failure o Definition: Failure is the inability of a software application to perform a required function or deliver expected results under specified conditions. o Example: The application crashes when the user submits a form, even though it should display a confirmation message. 2. Error o Definition: An error is a mistake or incorrect action made by a developer(human), which may cause unintended results in the software. o Example: A typo in the code (such as using “+” instead of “-”) is an error that could lead to incorrect calculations in the software. 3. Fault o Definition: A fault is a flaw or imperfection in the code due to an error, which has the potential to cause a failure when the code runs. o Example: A missing validation check in code that can allow invalid data entry, potentially leading to a failure in operation. 4. Defect o Definition: A defect is a deviation from the expected behaviour in the software due to an error in coding or design. o Example: A login form that does not accept valid credentials due to a coding error is considered to have a defect. 5. Bug o Definition: A bug is an informal term for a defect, fault, or flaw in software that prevents it from functioning as intended. o Example: When the “Add to Cart” button in an online store does not add items to the cart, it’s commonly referred to as a “bug.” Diploma Helper. Feel free to DM us at. 8698079745 UNIT 01. BASICS OF SOFTWARE TESTING AND TESTING METHODS Skills for software tester ? 1. Attention to Detail o Careful observation to catch even small errors or bugs. o Ensures thorough testing, so nothing important is missed. 2. Analytical Thinking o Breaking down complex software to understand each part and how they work together. o Helps in creating effective test cases and identifying hidden issues. 3. Basic Programming Knowledge o Knowing languages like Java or Python can be helpful, especially for automated testing. o Allows testers to write simple scripts and understand the software better. 4. Familiarity with Testing Tools o Knowing tools like Selenium, JIRA, or TestRail to handle automation, bug tracking, and test management. o These tools save time and help testers stay organized. 5. Understanding of SDLC and STLC o Knowing the Software Development Life Cycle (SDLC) and Software Testing Life Cycle (STLC). o Ensures testing aligns with each development stage, improving test accuracy. 6. Good Communication Skills o Clear communication to explain test results, issues, and improvements with developers and other team members. o Ensures everyone is on the same page and speeds up problem resolution. 7. Problem-Solving Skills o Ability to identify, analyse, and solve issues as they arise. o Helps testers adapt quickly and keep the testing process smooth. 8. Time Management o Planning and organizing to meet deadlines and prioritize tasks. o Ensures tests are done on time and resources are used efficiently. Diploma Helper. Feel free to DM us at. 8698079745 UNIT 01. BASICS OF SOFTWARE TESTING AND TESTING METHODS What is Test Case? Definition: A test case is a set of actions executed to verify a specific feature or functionality of the software application. Components of a Test Case: o Test Case ID: A unique identifier for each test case. o Test Description: A brief summary of what the test will verify. o Preconditions: Conditions that must be met before executing the test. o Test Steps: A detailed sequence of steps to perform during the test. o Expected Result: The anticipated outcome if the software is working correctly. o Actual Result: The actual outcome after executing the test. o Status: Indicates whether the test passed or failed. Purpose: Test cases help ensure that all aspects of the application are tested for correctness and function as intended. State the entry and exit criteria’s for software testing? 1. Entry Criteria o Entry criteria are the conditions that must be met before testing can begin. o These ensure that the testing process starts with all necessary preparations in place. 1. Requirements are Defined and Approved o Software requirements and objectives are clear, complete, and approved by stakeholders. 2. Test Plan and Test Cases Prepared o Test plans and test cases are documented, reviewed, and ready to be executed. 3. Environment Set Up o Testing environment (hardware, software, network) is fully configured and ready for testing. 4. Access to Test Data o Required test data is prepared and accessible to ensure accurate testing. 5. Previous Phases Completed o Development or prior testing phases (such as unit testing) are completed, and any critical bugs are resolved. Diploma Helper. Feel free to DM us at. 8698079745 UNIT 01. BASICS OF SOFTWARE TESTING AND TESTING METHODS 2. Exit Criteria o Exit criteria are the conditions that must be fulfilled before testing can be concluded. o These confirm that testing is complete and the software meets quality standards. 1. All Test Cases Executed o All planned test cases, including positive and negative scenarios, have been executed. 2. Defects Resolved o All critical and major defects have been identified, documented, and fixed; minor defects are noted for further review. 3. Test Summary Report Prepared o A summary report, including test results, coverage, and defect reports, is prepared and reviewed by stakeholders. 4. Meets Quality Standards o The software meets acceptable performance, security, and usability standards as per the requirements. 5. Approval from Stakeholders o Final approval received from key stakeholders confirming that the software is ready for release or the next phase. Diploma Helper. Feel free to DM us at. 8698079745 UNIT 01. BASICS OF SOFTWARE TESTING AND TESTING METHODS Verification and Validation 1. Verification o Definition: Verification is the process of checking if the software product meets specified requirements and is being built correctly. o Goal: Ensure that each phase of the development process is followed correctly and meets design specifications. o Activities: Reviews Inspections Walkthroughs o Example: Reviewing design documents to ensure they match the requirements. 2. Validation o Definition: Validation is the process of testing if the final software product meets user needs and intended functionality. o Goal: Ensure the software works as expected in a real-world scenario. o Activities: Testing (unit, integration, system, acceptance) o Example: Performing user acceptance testing to check if the software fulfils the intended purpose. Diploma Helper. Feel free to DM us at. 8698079745 UNIT 01. BASICS OF SOFTWARE TESTING AND TESTING METHODS V-Model in Software Testing 1. Definition and Explanation o The V-Model is a software development and testing approach where each stage of development directly links to a testing stage. o It follows a "V" shape with development on the left side and testing on the right, making it easy to check each phase before moving on. o This ensures the software meets specifications (Verification) and works as expected (Validation). 2. Diagram of V-Model Fig.(a) V- Model o Left Side (Development): Requirement Analysis, System Design, High-Level Design, Detailed Design, Implementation. o Right Side (Testing): Acceptance Testing, System Testing, Integration Testing, Unit Testing. Diploma Helper. Feel free to DM us at. 8698079745 UNIT 01. BASICS OF SOFTWARE TESTING AND TESTING METHODS 3. Diagram Explanation o Development Phases (Left Side): Requirement Analysis: Collect and analyze what the user needs. System Design: Plan the system’s structure. High-Level Design: Break down the system into smaller modules. Detailed Design: Specify each part of the modules in detail. Implementation: Write the code for the software. o Testing Phases (Right Side): Unit Testing: Test each small part (module) separately. Integration Testing: Test how modules work together. System Testing: Test the whole system to ensure all parts work. Acceptance Testing: Check if the system meets user needs. 4. Real-Life Example o Think of building a house: You first plan (requirements), design each part (rooms, wiring), and then start building. After building, each part is inspected to ensure it’s done correctly, like checking the foundation or final inspection before use. 5. Advantages o Early Problem Detection: Errors are found early, saving time and money. o Structured and Clear: Each stage has a clear testing phase, making it organized. o User Requirements Focus: Helps ensure the final product matches what the user wants. o Improves Quality: Each phase’s output is tested, leading to a reliable product. 6. Disadvantages o Not Flexible: Changes are difficult to make once development starts. o High Planning Effort: Requires detailed planning at the beginning. o Less Suitable for Large Projects: Harder to manage for complex, evolving projects. o Expensive for Changes: Any change late in the process can be costly. Diploma Helper. Feel free to DM us at. 8698079745 UNIT 01. BASICS OF SOFTWARE TESTING AND TESTING METHODS Quality Assurance (QA) 1. Definition and Explanation o Quality Assurance (QA) is a process-focused approach aiming to prevent defects in the software development process. o QA involves setting standards, creating guidelines, and defining procedures to ensure the product is built correctly. o QA ensures that each step in the development process maintains quality, leading to a high-quality final product. 2. Real-Life Example o In a car factory, QA would involve establishing manufacturing processes that adhere to safety standards to prevent defects. 3. Key Activities o Process monitoring, auditing, and defining standards for each stage of software development. o Reviews, training, and process improvement to maintain quality throughout the development cycle. 4. Goal o To ensure high quality by implementing and refining processes that minimize the chance of defects. Quality Control (QC) 1. Definition and Explanation o Quality Control (QC) is a product-focused approach aimed at identifying and fixing defects in the final product. o QC involves testing and inspecting the product to ensure it meets quality standards and user requirements. o QC is used after development to verify the product’s quality. 2. Real-Life Example o In a car factory, QC involves inspecting each finished car to find any defects before it is delivered to customers. 3. Key Activities o Executing test cases, identifying bugs, and verifying that they are fixed. o Performing manual and automated testing to ensure software quality. 4. Goal o To detect and fix defects in the software to improve its functionality and reliability. Diploma Helper. Feel free to DM us at. 8698079745 UNIT 01. BASICS OF SOFTWARE TESTING AND TESTING METHODS Static Testing 1. Definition and Explanation o Static Testing is a method of testing where the code, requirements, and design documents are reviewed without executing the code. o It is focused on identifying errors in early development stages by analyzing documents, specifications, and code structure. o Common methods include reviews, walkthroughs, and inspections. 2. Real-Life Example o In a software project, the team reviews the code for syntax errors and checks the design documents to ensure they match project requirements before coding begins. 3. Advantages of Static Testing o Early Defect Detection: Identifies errors early, reducing later-stage fixes. o Cost-Effective: Catching defects before execution saves testing costs. o Improves Quality: Ensures clarity and accuracy in requirements and design. o Reduces Testing Time: Less execution time needed if errors are pre-fixed. 4. Disadvantages of Static Testing o No Execution-Based Testing: Doesn’t test runtime behaviors. o Limited to Documented Errors: Misses issues that occur only during execution. o Requires Experienced Reviewers: Needs skilled personnel to identify issues. o May Miss Dynamic Issues: Cannot find performance or interaction-based defects. Diploma Helper. Feel free to DM us at. 8698079745 UNIT 01. BASICS OF SOFTWARE TESTING AND TESTING METHODS Dynamic Testing 1. Definition and Explanation o Dynamic Testing involves executing the code and running tests to check for functional and runtime issues. o It is used to validate the software’s behavior during execution, ensuring it works as expected. o Common types include Unit Testing, Integration Testing, System Testing, and Acceptance Testing. 2. Real-Life Example o Running a web application on different browsers to verify that it functions correctly and displays as expected. 3. Advantages of Dynamic Testing o Verifies Software Behavior: Tests actual program execution. o Identifies Runtime Errors: Detects performance, logic, and interaction issues. o Improves Product Quality: Ensures that software works as intended for users. o Supports Real Environment Testing: Helps simulate real-world user interactions. 4. Disadvantages of Dynamic Testing o Time-Consuming: Requires more time for setup and execution. o Higher Costs: Needs resources like hardware, software, and testers. o Cannot Start Early: Only begins once code is executable. o Depends on Test Coverage: Limited by the quality and completeness of test cases. Diploma Helper. Feel free to DM us at. 8698079745 UNIT 01. BASICS OF SOFTWARE TESTING AND TESTING METHODS White Box Testing 1. Definition and Explanation o White Box Testing (or glass box testing) is a method where the internal structure, design, and coding of the software are known and tested. o It focuses on improving the code’s efficiency, quality, and security by evaluating how functions, statements, and loops are executed. o This approach is useful for identifying logical errors, potential vulnerabilities, and hidden issues within the code. 2. Diagram of White Box Testing Fig.(b) White Box Testing 3. Real-Life Example o In a banking application, white box testing could involve testing each calculation in loan processing code to ensure accuracy. 4. Advantages of White Box Testing o Detailed Code Analysis: Helps uncover hidden bugs in the code. o Increased Code Quality: Ensures efficient and reliable code. o Early Error Detection: Finds issues before software reaches end-users. o Improves Code Security: Identifies and mitigates potential vulnerabilities. 5. Disadvantages of White Box Testing o Time-Consuming: Requires detailed knowledge and time for in-depth analysis. o Complex for Large Applications: Harder to execute on large codebases. o Requires Skilled Testers: Needs testers with programming knowledge. o Can Miss External Issues: Focuses only on internal logic, missing user perspective. Diploma Helper. Feel free to DM us at. 8698079745 UNIT 01. BASICS OF SOFTWARE TESTING AND TESTING METHODS Methods of White box testing 1. Inspection 1. Purpose: Inspections are structured reviews focused on finding issues in the code, design, or documentation. 2. Process: Involves going through the code line-by-line to detect bugs or deviations from standards. 3. Team Involvement: Usually includes a team of developers, testers, and sometimes project leads. 4. Outcome: Identifies defects early, helping to reduce time and cost of later fixes. Example: A team checks the source code for an e-commerce checkout page to ensure it follows coding standards and has no errors before testing starts. Real-World Example: Think of a group of editors reviewing a new book manuscript for errors, inconsistencies, and clarity before publication. 2. Walkthroughs 1. Purpose: Walkthroughs are informal meetings where developers present the code or design to peers for feedback. 2. Process: The developer explains the logic and functionality, while others ask questions or point out issues. 3. Team Involvement: Includes the developer and a few colleagues, typically in a casual setting. 4. Outcome: Helps the developer catch issues and get suggestions for improvement early on. Example: A developer working on a login feature walks the team through the code to get suggestions on improving efficiency and detecting potential bugs. Real-World Example: Similar to a team meeting where an author reads sections of a book draft to get constructive feedback on content and style from fellow writers. 3. Technical Review 1. Purpose: Technical reviews evaluate the technical aspects of a project, such as performance, design, and compliance with standards. 2. Process: A team of experts reviews specific technical areas, such as security or database queries. 3. Focus: Ensures the project meets all technical requirements and identifies improvements. 4. Outcome: Catches potential flaws early and ensures alignment with industry standards. Example: A technical review is conducted on a new financial application to verify that all security protocols are met and sensitive data is properly encrypted. Real-World Example: Like having a senior architect review blueprints to ensure a building’s design meets safety, structural, and functional standards before construction begins. Diploma Helper. Feel free to DM us at. 8698079745 UNIT 01. BASICS OF SOFTWARE TESTING AND TESTING METHODS 4. Functional Testing 1. Purpose: Tests the code to verify that each function works according to its requirements. 2. Focus: Looks at each function’s output to ensure it produces correct results given specific inputs. 3. Techniques: Common methods include testing boundary values and input variations. 4. Outcome: Ensures that individual functions behave as expected. Example: Testing a calculator app’s addition and subtraction functions by inputting various numbers and verifying the correct outputs. Real-World Example: Testing the “Add to Cart” button on an e-commerce site to confirm it correctly adds the selected item to the user’s cart. 5. Code Coverage Testing 1. Purpose: Measures how much of the code is executed during testing. 2. Process: Identifies untested parts of the code, aiming to increase coverage. 3. Focus: Focuses on executing as many paths and conditions in the code as possible. 4. Outcome: Helps ensure every part of the code is tested to avoid untested bugs. Example: Running tests to cover all paths (like if-else conditions) in a program that calculates loan eligibility. Real-World Example: Similar to checking all rooms in a building during an inspection to ensure no spot is missed and every part of the building meets quality standards. 6. Code Complexity Testing 1. Purpose: Assesses the complexity of code to identify areas that are too complicated and may need simplification. 2. Focus: Measures factors like loops, branches, and conditions to find parts that could be error-prone. 3. Process: Uses metrics to assign a complexity score to the code. 4. Outcome: Helps developers simplify complex code, reducing potential bugs and making maintenance easier. Example: Analysing a sorting algorithm to check for too many nested loops or conditions, making it easier to read and less prone to errors. Real-World Example: Like a quality check in manufacturing, where complex machinery parts are examined more thoroughly to prevent breakdowns and ensure longevity. Diploma Helper. Feel free to DM us at. 8698079745 UNIT 01. BASICS OF SOFTWARE TESTING AND TESTING METHODS Black Box Testing 1. Definition and Explanation o Black Box Testing is a software testing technique where the tester evaluates the system solely based on the input and expected output, without any knowledge of the internal code or logic. o The focus is on ensuring that the software works according to its specifications and requirements. o It is primarily used for functional testing and is requirement-based. 2. Diagram of Black Box Testing Fig.(b) Black Box Testing 3. Real-Life Example In an e-commerce website, Black Box Testing would check whether the checkout process works properly when a customer inputs their shipping address, payment details, and product selections. 4. Advantages 1. Non-Technical Testing: Testers do not need to know the internal code or logic. 2. User-Centric: Focuses on how the software performs from the end-user's perspective. 3. Easy to Automate: Can be automated for regression testing to increase testing efficiency. 4. Requirement-Based Testing: Ensures the software meets the requirements and specifications outlined in the project documents. 5. Disadvantages 1. Limited Coverage: It may not test every internal code path or uncover certain bugs. 2. Hard to Detect Logical Errors: Logical or performance-related errors in the code are often missed. 3. Relies on Good Documentation: Test cases are based on requirements, which must be clear and accurate. 4. Doesn't Identify Code Quality Issues: Focuses only on functional correctness, not on code efficiency or security. Diploma Helper. Feel free to DM us at. 8698079745 UNIT 01. BASICS OF SOFTWARE TESTING AND TESTING METHODS 1. Requirement-Based Testing 1. Purpose: Ensures that the software functions meet the requirements specified by the client or stakeholders. 2. Focus: Validates each feature against its requirement to check if it performs as expected. 3. Process: Testers create test cases directly from the requirements document. 4. Outcome: Helps in verifying that the application fulfills all user needs and expected functionalities. Example: For an online shopping site, requirement-based testing ensures that the "Add to Cart" button actually adds selected items to the cart as specified in the requirements. 2. Boundary Value Analysis (BVA) 1. Purpose: Focuses on testing the boundaries or edge values of input ranges, as these are more prone to errors. 2. Focus: Tests minimum, maximum, and just-inside/outside boundary values of a range. 3. Process: Testers create test cases based on the extreme values of inputs to catch errors around the boundaries. 4. Outcome: Helps in identifying defects that occur at input limits. Example: For a login form that allows a password length between 6-12 characters, BVA would test passwords with lengths of 5, 6, 12, and 13 characters to ensure proper handling of edge cases. 3. Equivalence Partitioning (EP) 1. Purpose: Divides inputs into equivalent sets or "partitions" where the system should behave the same for all values in each set. 2. Focus: Tests one representative value from each partition rather than testing every input, saving time. 3. Process: Testers create test cases for each partition to check if the software behaves correctly for that category. 4. Outcome: Efficiently covers possible input scenarios with fewer test cases, improving test coverage and reducing redundancy. Example: For an age field that only accepts numbers between 18-60, EP would use three partitions: below 18 (invalid), between 18 and 60 (valid), and above 60 (invalid). Testing one value from each group, like 17, 30, and 61, is sufficient. Diploma Helper. Feel free to DM us at. 8698079745 UNIT 01. BASICS OF SOFTWARE TESTING AND TESTING METHODS Diploma Helper. Feel free to DM us at. 8698079745 UNIT 01. BASICS OF SOFTWARE TESTING AND TESTING METHODS Winter 2019 1. Define static and dynamic testing. (2marks) 2. Enlist objectives of software testing. (2marks) 3. Define Bug, Error, Fault and Failure. (2marks) 4. Describe Boundary value analysis with suitable example. (4marks) 5. Describe the use of decision table in black box testing with the help of suitable example (4marks) Summer 2022 1. Define verification and validation with respect to software testing. (2marks) 2. Define following terms i) Error. ii) Fault iii) Bug iv) Failure (2marks) 3. Enlist any four skills for software tester. (2marks) 4. Describe Code Complexity testing (4marks) 5. Differentiate between Quality Assurance and Quality Control. (4marks) Winter 2022 1. Define following terms i) Error. ii) Fault iii) Defect iv) Bug (2marks) 2. Compare verification and validation (any two points). (2marks) 3. Give the objectives of software testing (2marks) 4. State the Entry and Exit criterias for the software testing. (4marks) 5. Differentiate between white box testing and black box testing (any four points). (4marks) Diploma Helper. Feel free to DM us at. 8698079745 UNIT 01. BASICS OF SOFTWARE TESTING AND TESTING METHODS Summer 2023 1. Write two differences between quality assurance and quality control. (2marks) 2. Define following terms i) Defect ii) Bug. (2marks) 3. Describe any four skills of software tester. (4marks) 4. List types of white box testing. Describe any two types of white box testing with neat diagram. (4marks) Winter 2023 1. Compare verification and validation (any 2 point). (2marks) 2. Define failure, error, fault, bug. (2marks) 3. List the objectives of software testing. (any four). (2marks) 4. State the Entry and Exit criteria’s for the software testing. (4marks) 5. What is boundary value analysis? Explain with suitable example. (4marks) 6. Describe V-model with labelled diagram. (6marks) Summer 2024 1. Enlist objectives of software testing. (2marks) 2. List any four skills of software tester. (2marks) 3. Define the terms error and defect in relation with software testing. (2marks) 4. Write any four differences between quality assurance and quality control. (4marks) 5. Distinguish between white box testing and black box testing. (any four points) (4marks) Diploma Helper. Feel free to DM us at. 8698079745