0% found this document useful (0 votes)
4 views

Software Testing Pyq

The document outlines a software testing examination for T.Y.B.Sc. (Computer Science) students, covering topics such as software testing definitions, methodologies, types of testing, and specific techniques like black box and white box testing. It includes questions on concepts like validation, regression testing, and performance testing, as well as practical applications like test case design and the V-model. The exam consists of multiple-choice and descriptive questions aimed at assessing students' understanding of software testing principles and practices.

Uploaded by

mnile9557
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
4 views

Software Testing Pyq

The document outlines a software testing examination for T.Y.B.Sc. (Computer Science) students, covering topics such as software testing definitions, methodologies, types of testing, and specific techniques like black box and white box testing. It includes questions on concepts like validation, regression testing, and performance testing, as well as practical applications like test case design and the V-model. The exam consists of multiple-choice and descriptive questions aimed at assessing students' understanding of software testing principles and practices.

Uploaded by

mnile9557
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 41
T.Y.B.Sc. (Computer Science) CS -362 : SOFTWARE TESTING (New CBCS 2019 Pattern) (Semester - VI) Time : 2 Hours] [Max. Marks : 35 Instructions to the candidates: 1) All questions are compulsory. 2) Figures to the right indicate full marks. 3) Asswme suitable data if necessary. Q1) Attempt any eight of the following. [1x8=8] a) Define software testing. —_> Software testing is the process of evaluating and verifying that a software application or system performs as expected and is free from defects. It involves executing the software to find bugs or errors and ensures the quality of the software product. b) What is mean by validation? —_ Validation is the process of checking whether the software meets the specified requirements and fulfills its intended purpose. It ensures the product is built right and satisfies user needs. c) What is stub? =>> A stub is a simulated component or module used in software testing when the actual component is not yet developed or is unavailable. It mimics the behavior of a real module to enable testing of other parts of the system. d) Write goal of white box testing? _> The goal of white-box testing is to test the internal structures or workings of an application. The tester has access to the code and aims to ensure that the code functions as expected, covering all possible paths, branches, and conditions. e) Define regression testing? —_> Regression testing is the process of testing a software system after changes (like enhancements or bug fixes) have been made to ensure that the new changes have not adversely affected the existing functionality. f) List any 2 agile principles. _ Customer Collaboration over Contract Negotiation: Prioritizing communication with the customer to deliver valuable software over formal contracts. Responding to Change over Following a Plan: Emphasizing flexibility and the ability to adapt to changing requirements throughout the development process. g) List dimensions of quality. —_— Functionality: The ability of the software to meet functional requirements. Reliability: The software's ability to perform under expected conditions without failure. Usability: How easy and user-friendly the software is for end users. Efficiency: The software's ability to perform tasks quickly and using minimal resources. h) Define web application, testing. —> Web application testing is the process of testing web-based applications to ensure that they function correctly across different browsers, devices, and environments. It includes testing for functionality, usability, performance, and security. i) List levels of testing. —> Unit Testing: Testing individual components or functions of the software. Integration Testing: Testing the interaction between integrated modules. System Testing: Testing the complete system as a whole. Acceptance Testing: Verifying the system meets business requirements and is ready for deployment. j) What is test plan? — A test plan is a document that outlines the strategy, objectives, resources, schedule, and scope of testing activities for a software product. It defines what will be tested, how it will be tested, and who will do the testing. Os Q2) Attempt any four of the following. [2x4=8] a) Write 2 differences between bugs, Faults & Failures. _ 1. Bug: A bug refers to a defect in the software code that causes it to behave unexpectedly or incorrectly. It is an issue identified in the software system's source code. Fault: A fault is the underlying cause of a bug. It is the mistake or defect in the software that can lead to a malfunction. It is the error in the design or code that might cause the system to fail. Failure: A failure occurs when the software does not perform as expected or does not meet the specified requirements due to bugs or faults. It is the observable effect that results when a bug or fault causes the system to malfunction. 2. Bug: A bug might not always lead to failure if it doesn't affect the system during operation. Fault: A fault becomes a bug if it is detected during testing or development. Failure: A failure results when the system exhibits incorrect behavior during execution. b) Write short note on black box testing. => Black Box Testing is a testing technique where the tester evaluates the functionality of the software without knowing its internal workings or code. The tester focuses on inputs and expected outputs. This type of testing ensures that the system performs according to the specified requirements, without considering how it internally processes data. It includes techniques like boundary value analysis, equivalence partitioning, and functional testing. c) Explain equivalance partitioning. — Equivalence Partitioning is a software testing technique that divides the input data of a software application into distinct subsets or partitions. The idea is that if a particular set of inputs behaves similarly, only one Os test case from that partition is needed to validate the behavior. This reduces the number of test cases while maintaining sufficient test coverage. For example, for an input field that accepts ages from 18 to 60, partitions would include values less than 18, between 18 and 60, and greater than 60. d) Explain performance testing. — Performance Testing is a type of testing that evaluates the performance, scalability, and responsiveness of a software application under a specific workload. The goal is to identify performance bottlenecks, measure system behavior under stress, and ensure the system meets performance requirements. Types of performance testing include load testing, stress testing, and scalability testing. It helps ensure that the system can handle the expected user load and perform efficiently. e) Write features of agile testing. —_ Iterative and Incremental: Testing is done continuously throughout the development process, with frequent iterations and small, incremental releases. Collaboration: Agile testing emphasizes close collaboration between developers, testers, and business stakeholders to ensure quality. Flexibility: Agile testing is adaptable to changes in requirements, allowing teams to respond to changes in project scope or priorities. Continuous Feedback: Testers provide feedback regularly to improve the quality of the product throughout the development cycle. Q3) Attempt any two of the following. [2x4=8] a) With the help of diagram explain V-model. — The V-Model (Verification and Validation Model) is a software development model that emphasizes testing at each development phase. It is an extension of the Waterfall Model, but instead of moving downward linearly, it bends upwards after the coding phase, forming a V- shape. V-Model Diagram V-Model Gectieuens Analysis [een Testing System Testing Renate bese) Tecenca) besa) wie Astin Coding Phases of V-Model The left side represents the development phase (Verification), while the right side represents the testing phase (Validation). 4. Verification (Development Phases) Requirement Analysis — Gather business requirements. System Design — Define overall system architecture. Architectural Design -—. Break system into smaller modules. Module Design = Define module-level design. Coding Phase = Write and implement the code. 2. Validation (Testing Phases) Unit Testing — Test individual modules. Integration Testing -. Test interactions between modules. System Testing = Verify the whole system. Acceptance Testing —. Validate against business requirements. Each testing phase is linked to a corresponding development phase, ensuring early error detection. b) What is test case? Explain with example. _> A test case is a set of conditions or variables used to determine whether a software application is working correctly. It includes inputs, execution steps, expected results, and actual results. Test cases are crucial for software testing to ensure the quality and functionality of an application. Components of a Test Case Test Case ID - A unique identifier for the test case. Test Scenario — A high-level description of what is being tested. Test Description - Details about the functionality to be tested. Preconditions — Any setup or prerequisites required before executing the test. Test Steps - The actions to be performed. Test Data — The input values used in the test. Expected Result - The expected outcome of the test. Actual Result — The actual outcome after execution. Status - Pass/Fail based on the expected vs. actual result. Example of a Test Case Test Case ID: TC_001 Test Scenario: Verify login functionality with valid credentials. Test Description: The user should be able to log in successfully with valid credentials. Preconditions: The user must be registered and have valid login credentials. Test Steps: Open the login page of the application. Enter a valid username. Enter a valid password. Click the "Login" button. Test Data: Username: testuser Password: password123 Expected Result: The user should be redirected to the homepage after successful login. Actual Result: The user is redirected to the homepage. Status: Pass If the login fails even with valid credentials, the Status would be Fail 3, and a bug report would be created. c) Explain Navigation testing in detail. —_ Navigation Testing is a type of software testing that ensures users can navigate through an application smoothly and intuitively. It focuses on verifying the correctness of menus, links, buttons, and other navigational elements to ensure a seamless user experience. Key Aspects of Navigation Testing: Link Validation: Ensuring all hyperlinks and buttons lead to the correct destinations without errors. Menu Functionality: Checking if dropdowns, sidebars, and navigation bars work properly. Page Flow & Transitions: Confirming that users can move between pages logically without dead ends. Back & Forward Navigation: Testing browser back/forward buttons and in- app navigation paths. Breadcrumbs & Redirects: Ensuring correct redirection and breadcrumb trail functionality. Mobile Responsiveness: Verifying navigation across different screen sizes and devices. Importance of Navigation Testing: Improves user experience by making navigation intuitive. Prevents broken links and incorrect page loads. Enhances accessibility and usability for different users. Ensures compliance with UI/UX design standards. Q4) Attempt any two of the following. [2x4=8] a) What is performance testing? Write steps in performance testing. = What is Performance Testing? Performance testing is a type of software testing that evaluates how an application performs under different load conditions. It ensures the system meets speed, scalability, stability, and responsiveness requirements. Steps in Performance Testing: Requirement Anaiysis — Identify performance goals and system requirements. Test Environment Setup — Configure hardware, software, and network settings. Test Case Design — Develop performance test scenarios and define workload models. Test Execution — Run tests such as load, stress, and scalability tests. Monitoring & Data Collection - Measure response time, throughput, and system behavior. Analysis & Reporting — Evaluate results, identify bottlenecks, and suggest improvements. b) Differentiate between alpha & beta testing. => Feature Alpha Beta Testing Testing Definition | Performed | Conducted ina by real users controlled | ina real environment | environment by intemal | before the testers final launch. before release. Testers Internal End users or developers | external &QAteam. | testers. Objective | Identity Gather user bugs and fix | feedback to critical enhance issues usability & before beta | functionality release. Environment | Performed | Performed inalabor ina developmen | real-world t setting, environment c) What is integration testing? Explain top-down integration. _ What is Integration Testing? Integration testing is a software testing approach that checks the interaction between different modules of a system to ensure they work together correctly. It helps in identifying defects in data flow, © seamed nth one semner communication, and interface between integrated units. Top-Down Integration: Definition: In this approach, higher-level modules are tested first, followed by lower-level modules, using stubs to simulate missing components. Process: Develop and test the top-level module. Gradually integrate and test lower-level modules. Use stubs to simulate the behavior of modules that are not yet developed. Replace stubs with actual modules as they become available. Continue until the full system is tested. Advantages: Early detection of high-level design issues, easier debugging, and smooth integration of components. Q5) Attempt any one of the following. [1x3=3] a) Write a short note on Automated tests. _ Automated Tests Automated tests refer to the process of using software tools to execute pre-scripted test cases on an application automatically. These tests help verify the functionality, performance, and reliability of software without manual intervention. Automated testing increases efficiency, ensures consistency, and reduces human errors. Common types of automated tests include unit tests, integration tests, functional tests, regression tests, and performance tests. b) Whatis internationalization testing? Explain with types. _> Internationalization Testing Internationalization (i18n) testing ensures that a software application can adapt to different languages, regions, and cultural conventions without requiring code modifications. It helps verify whether the application correctly supports multiple languages, character sets, date/time formats, and currency formats. Types of Internationalization Testing: UI Testing - Ensures text expansion, font support, and layout are suitable for different languages. Localization Testing - Checks language translations, cultural appropriateness, and region-specific settings. Functional Testing — Verifies that language changes do not break core functionalities. Encoding Testing - Ensures proper handling of different character encodings (e.g., UTF-8, UTF-16). Date/Time and Currency Testing - Confirms the correct format for dates, times, and currencies based on locale settings. This testing is essential for global software applications to provide a seamless user experience across various regions. T.Y. B.Sc. (Computer Science} CS - 362 : SOFTWARE TESTING (2019 Pattern) (Semester - VI) (CBCS) Time : 2 Hours] [Max. Marks : 35 Instructions to the candidates: 1) Al questions are compulsory. 2) Figures to the right indicate full marks. 3) Assume suitable data if necessary. Q1) Attempt any 8 of the following : [8x1=8] a) What is fault? _> A fault is a defect or flaw in a software component or system that causes it to behave incorrectly or produce an incorrect result. b) Define verification. —_ Verification is the process of checking if a software product meets specified requirements and is built according to design specifications, ensuring it is being developed correctly. c)Define stub. _ A stub is a placeholder used in software testing to simulate the behavior of a component or module that is not yet developed or unavailable during testing. d) Write methods of white box testing. _> Methods of white-box testing include: Statement Coverage Branch Coverage Path Coverage Condition Coverage e) Define regression testing. — Regression testing is the process of testing a software system after changes or updates to ensure that existing functionality has not been broken by new code or features. f) What is Agile Methodology? _ Agile methodology is an iterative and incremental approach to software development that emphasizes flexibility, collaboration, and customer feedback throughout the development process. g) List dimensions of quality —_ The dimensions of quality include: Functionality Reliability Usability Efficiency Maintainability Portability h) Define strategy for web applications. _ A strategy for web applications involves testing for functionality, performance, security, usability, and compatibility to ensure the application works seamlessly across various devices and browsers. i) Define acceptance testing. —_— Acceptance testing is a type of testing conducted to determine if a software application meets the business requirements and if it is ready for release to the client or end-user. j) Black box testing is called glass box testing Justify T/F. _ False. Black box testing focuses on testing the functionality of the software without knowing its internal structure, while glass box (or white- box) testing involves testing the internal workings of the software. Therefore, they are different types of testing. Q2) Attempt any four of the following : [4x2=8] a) Write short note on testing roles. —_ Testing Roles: Testing roles are responsible for ensuring the quality and functionality of software. Common roles in testing include: Test Analyst: Designs and executes test cases, ensuring the product meets specifications. Test Lead: Manages the testing team and defines testing strategies. Test Engineer: Executes tests and reports issues. Automation Tester: Focuses on automating repetitive test cases. Quality Assurance (QA) Manager: Oversees the quality of the testing process and team. Each role contributes to identifying and fixing defects to ensure software reliability and quality. b) Explain white box and black box testing. _> White Box Testing: Involves testing the internal workings of an application. Testers have access to the code and focus on areas like logic, code paths, and conditions. It's also called structural or clear-box testing. Black Box Testing: Focuses on testing the functionality of the application without knowing the internal code or structure. Testers verify if the software behaves as expected based on requirements, regardless of the internal implementation. c) Compare testing and debugging any two points. _ Purpose: Testing is the process of identifying defects in the software, whereas debugging is the process of fixing those defects. Scope: Testing is performed before or during the development process to identify issues, while debugging occurs after defects are found, to correct the issues in the code. d) Explain performance of testing. _ Performance of Testing: The performance of testing refers to evaluating the system's ability to perform under various conditions. It focuses on attributes like speed, stability, scalability, and responsiveness. Testing performance involves methods like load testing, stress testing, and endurance testing to ensure that the application performs efficiently under expected and peak usage scenarios. e) Write a short note on features of Agile testing. _? Features of Agile Testing: Agile testing emphasizes collaboration, flexibility, and iterative development. Key features include: Continuous Feedback: Frequent testing is integrated into the development cycle to provide continuous feedback. Collaboration: Testers, developers, and stakeholders work closely throughout the process. Adaptability: Agile testing adapts to changes in requirements and functionality, with tests evolving with each iteration. Incremental Testing: Testing occurs in small, incremental phases corresponding to each feature developed in sprints. Q3) Attempt any two of the following : [2x4=8] a) Explain test case with example. _ A test case is a set of conditions or variables used to determine whether a software application is working correctly. It includes inputs, execution steps, expected results, and actual results. Test cases are crucial for software testing to ensure the quality and functionality of an application. Components of a Test Case Test Case ID - A unique identifier for the test case. Test Scenario — A high-level description of what is being tested. Test Description — Details about the functionality to be tested. Preconditions — Any setup or prerequisites required before executing the test. Test Steps — The actions to be performed. Test Data — The input values used in the test. Expected Result - The expected outcome of the test. Actual Result - The actual outcome after execution. Status — Pass/Fail based on the expected vs. actual result. Example of a Test Case Test Case ID: TC_001 Test Scenario: Verify login functionality with valid credentials. Test Description: The user should be able to log in successfully with valid credentials. Preconditions: The user must be registered and have valid login credentials. Test Steps: Open the login page of the application. Enter a valid username. Enter a valid password. Click the "Login" button. Test Data: Username: testuser Password: password123 Expected Result: The user should be redirected to the homepage after successful login. Actual Result: The user is redirected to the homepage. Status: Pass If the login fails even with valid credentials, the Status would be Fail 3€, and a bug report would be created. b) Write a short note on V-model with diagram. _ The V-Model (Verification and Validation Model) is a software development model that emphasizes testing at each development phase. Itis an extension of the Waterfall Model, but instead of moving downward linearly, it bends upwards after the coding phase, forming a V- shape. V-Model Diagram Require 7SED Reon Pesca Saou Testing Architectural PES Integration SCS) veers Design Unit ists) Phases of V-Model The left side represents the development phase (Verification), while the right side represents the testing phase (Validation). 1. Verification (Development Phases) Requirement Analysis — Gather business requirements. System Design — Define overall system architecture. Architectural Design -» Break system into smaller modules. Module Design = Define module-level design. Coding Phase -. Write and implement the code. 2. Validation (Testing Phases) Unit Testing —. Test individual modules. Integration Testing — Test interactions between modules. System Testing — Verify the whole system. Acceptance Testing -—. Validate against business requirements. Each testing phase is linked to a corresponding development phase, ensuring early error detection. c) Explain navigation testing in detail. —_ Navigation Testing is a type of software testing that ensures users can navigate through an application smoothly and intuitively. It focuses on verifying the correctness of menus, links, buttons, and other navigational elements to ensure a seamless user experience. Key Aspects of Navigation Testing: Link Validation: Ensuring all hyperlinks and buttons lead to the correct destinations without errors. Menu Functionality: Checking if dropdowns, sidebars, and navigation bars work properly. Page Flow & Transitions: Confirming that users can move between pages logically without dead ends. Back & Forward Navigation: Testing browser back/forward buttons and in- app navigation paths. Breadcrumbs & Redirects: Ensuring correct redirection and breadcrumb trail functionality. Mobile Responsiveness: Verifying navigation across different screen sizes and devices. Importance of Navigation Testing: Improves user experience by making navigation intuitive. Prevents broken kinks and incorrect page loads. Enhances accessibility and usability for different users. Ensures compliance with UI/UX design standards. Q4) Attempt any two of the following : [2x4=8] a) Write a short note on alpha & beta testing. — Alpha Testing is the initial phase of testing conducted by developers or the internal testing team within the organization. It focuses on detecting bugs or issues before releasing the software to a wider audience. The primary goal is to verify the software's functionality, usability, and stability in a controlled environment. Alpha testing typically occurs in the development environment and is done before beta testing. Beta Testing is the second phase of testing conducted by a group of external users who were not involved in the development process. This helps to gather feedback on the software's performance, identify issues that were not detected during alpha testing, and understand how the software works in a real-world environment. Beta testing is typically done in a live environment with actual users. b) Explain integration testing. What is bottom up integration. —_ Integration Testing focuses on verifying the interaction and integration of different components or systems within a software application. After individual units have been tested in isolation (unit testing), integration testing ensures that these components work together correctly and efficiently. It identifies issues related to the interfaces and data flow between integrated components. Bottom-Up Integration is an integration testing approach where the lowest-level modules (or components) are tested first. These components are integrated together to form a subsystem. Once the lower levels are tested, higher-level modules are gradually integrated and tested. This method often requires stubs or mock modules for components that are higher in the hierarchy and not yet integrated. The benefit of this approach is early detection of issues in the foundational parts of the system. c) What is web application? How ét works explain with diagram. —_ Web Application A web application is a software program that runs on a web server and is accessed through a web browser. Unlike traditional desktop applications, web applications do not need to be installed on a user's device. They use the internet to function and can be accessed from anywhere. How It Works: User Requests Access: The user enters the web application URL in a browser. Server Processes Request: The request is sent to the web server, which processes it and interacts with the database if needed. Database Fetches Data: If required, the database retrieves or stores data. Server Responds: The server sends the processed information back to the browser in the form of a web page. User Interaction: The user interacts with the application, and the process repeats as needed. Diagram: Q5) Attempt any one of the following : [1x3=3] a) Explain different layers of automated tests. — Unit Tests: These are the most basic form of automated tests, focused on individual functions or methods within the codebase. They test small, isolated pieces of functionality to ensure correctness. Unit tests typically run fast and help developers catch bugs early. Integration Tests: These tests check how different components or systems interact with each other. Unlike unit tests, which focus on a single unit of code, integration tests validate the communication and data flow between modules, databases, or external services. System Tests: These are high-level tests that ensure the entire system works together as expected. System tests simulate real-world scenarios to validate that the complete application behaves correctly, including UI and backend interactions. Acceptance Tests: These tests verify that the application meets the business requirements and the user needs. They often reflect end-user behavior and can be written from the perspective of a user story. Acceptance tests are typically automated using tools like Cucumber or Selenium. Regression Tests: Regression testing ensures that new changes in the application haven't broken existing features. These tests are often automated to quickly validate that new updates or fixes haven't inadvertently caused issues in previously working parts of the application. b) Write a short note on internationailization testing. —_ Internationalization (i18n) testing ensures that an application can be adapted for different languages, regions, and cultures without significant code changes. This type of testing focuses on verifying that the software supports various locales and can handle different character sets, date formats, currencies, and other region-specific elements. Key areas tested in internationalization testing include: Language Compatibility: Ensuring that the application can display text in different languages without issues. Character Encoding: Verifying that special characters, such as non-Latin alphabets, are properly supported. UI Adjustments: Testing if the user interface can handle text expansion or contraction in different languages (e.g., the difference in text length between English and German). Cultural Sensitivity: Ensuring that content (like images, colors, and formats) is appropziate for different cultural norms. This testing helps ensure that the software is ready for localization (110n) in various markets. eco TY. B.Sc. (Semester - VI) COMPUTER SCIENCE CS-362 : Software Testing (2019 Pattern) (CBCS) Time : 2 Hours] [Max. Marks : 35 Instructions to the candidates: 4) Al questions are compulsory. 2) Figures to the right indicate full marks. 3) Assume suitable data if necessary. Qt) Attempt any eight of the following : [8x1=8] a) Define the term errors. _ Errors: Errors refer to mistakes or faults made by developers or users that cause a system to behave unexpectedly or fail to perform as intended. These can occur in the design, implementation, or operation phases of software development. b) What is stub? —_— Stub: A stub is a small piece of code used in the early stages of software development. It simulates the behavior of a module or component that has not yet been implemented or completed, allowing testing to proceed on other parts of the system. ¢) Write a goal of white Box testing. _ Goal of White Box Testing: The goal of white box testing is to ensure the internal workings of a software application are functioning correctly by testing the code, logic, and structure of the program. d) What is test plan? —>. Test Plan: A test plan is a document that outlines the strategy, scope, objectives, resources, schedule, and methods to be used in software testing. It provides a roadmap for testing and ensures all necessary testing activities are covered. e) Write two methods of Black Box Testing. _— Two Methods of Black Box Testing: Equivalence Partitioning: Divides input data into valid and invalid partitions to reduce the number of test cases. Boundary Value Analysis: Focuses on testing the boundaries of input values, where errors are most likely to occur. f) Write dimensions of quality. —_— Dimensions of Quality: The dimensions of quality in software development include: Functionality: The ability of the software to perform the required tasks. Usability: The ease with which users can interact with the software. Reliability: The stability and dependability of the software. Performance: The software's ability to perform efficiently under various conditions. Security: The ability to protect the software from threats and vulnerabilities. Maintainability: The ease with which the software can be modified or updated. g) What do you mean by performance Testing? — Performance Testing: Performance testing evaluates how well a system performs under various conditions, including speed, responsiveness, and stability. It helps identify bottlenecks or issues that affect system performance. h) Write a goal of unit testing. _> Goal of Unit Testing: The goal of unit testing is to validate that individual units or components of the software work as expected, by testing each part in isolation to ensure correctness. i) Which is a core agile principle? — Core Agile Principle: A core agile principle is the delivery of working software frequently, with a preference for shorter timescales, to ensure that value is continuously provided to the customer. j) Define the term Regression Testing. — Regression Testing: Regression testing is the process of re-testing software after changes or updates have been made to ensure that new code does not adversely affect existing functionality. Q2) Attempt any four of the following : [4x2=8] a) Write an advantages of white box testing. — Thorough Coverage: White box testing provides high test coverage as it involves testing the internal structures, code, and logic of the application. Identifies Hidden Errors: It helps in identifying hidden errors in the code, such as memory leaks, unoptimized code, and logical errors. Optimization: It allows developers to improve and optimize the code, making the system more efficient. Code Quality Assurance: Helps ensure that the code adheres to quality standards and helps in finding security vulnerabilities. b) Explain the working of web application. — A web application operates on a client-server model. The client (typically a web browser) sends requests to the server, which hosts the application. The server processes the request, interacts with databases or other backend services, and sends the response back to the client. The client then displays the data received from the server. Web applications rely on technologies like HTML, CSS, JavaScript for frontend and server-side programming languages (e.g., Python, Java, PHP) for backend processes. C) Explain various forms of acceptance testing. _> User Acceptance Testing (UAT): Conducted by the end-users to validate if the software meets their requirements and is ready for deployment. Alpha Testing: Performed by the internal development team before releasing the software to external users for beta testing. Beta Testing: External users test the product in real-world conditions to uncover any bugs that might not have been identified in alpha testing. Contract Acceptance Testing: Focuses on ensuring that the software meets predefined contract specifications and criteria. d) Write features of agile testing. — Iterative Process: Agile testing is conducted in short, iterative cycles known as sprints, allowing frequent feedback and adjustments. Collaboration: Emphasizes communication and collaboration between developers, testers, and stakeholders throughout the project. Adaptability: Agile testing is flexible, allowing for changes to the software during development based on evolving requirements. Continuous Integration: Testing is integrated continuously into the development process to catch defects early. Customer-Centric: Agile testing focuses on delivering value to the customer by ensuring that the software meets the user's needs. e) Explain various types of system testing. _ Functional Testing: Ensures that the system performs as expected according to the specified requirements. Non-Functional Testing: Tests aspects such as performance, security, scalability, and usability. Regression Testing: Ensures that recent code changes have not negatively impacted existing functionality. Integration Testing: Verifies that different system modules or components work together as expected. Sanity Testing: A quick check to determine whether the basic functionality of the system is working after changes or bug fixes. Q3) Attempt any two of the following : [2x4=8] a) Explain the difference between Testing and Debugging. _> Testing is the process of evaluating a software application to detect any defects, errors, or deviations from expected behavior. It is performed to ensure that the software meets the specified requirements and works as intended. Testing typically involves various techniques such as unit testing, integration testing, and system testing, among others. The goal is to identify issues and verify that the software functions correctly. Debugging, on the other hand, is the process of identifying, isolating, and fixing the specific defects or issues found during the testing phase. Once a problem is detected, debugging helps developers trace its cause and correct the issue. Debugging often involves using debugging tools, code Os inspection, and analyzing logs to resolve bugs. b)What is Cyclomatic complexity and Graph matrix?Explain with example. — Cyclomatic Complexity is a software metric used to measure the complexity of a program. It indicates the number of independent paths through the source code, which can help in identifying how difficult it may be to test or maintain the code. It is calculated using the formula: V(G) =E-N+2P Where: V(G) = Cyclomatic complexity E = Number of edges in the control flow graph N = Number of nodes in the control flow graph P = Number of connected components (usually 1 for a single program) Example: Consider the following simple code: if condition1: do_something() else: do_something_else() In this example: Nodes (N): 3 (start, if, else) Edges (E): 3 (start - if, if - do_something(), else — do_something_else()) P: 1 (one connected component) Cyclomatic Complexity: V(G)=3-3+2(1)=2 This indicates there are 2 independent paths to test. Graph Matrix: A Graph Matrix is a representation of the control flow graph (CFG) used in program analysis. It can represent the relationships between nodes (i.e., blocks of code or decisions) using matrices where rows and columns correspond to nodes, and matrix values represent the presence or absence of connections (edges) between those nodes. Example: A simple graph matrix for a program with 3 nodes (A, B, C) could be represented as: ABC A010 BOoOo1 cooo This shows that there is a connection from A to B and from B to C, but no other direct connections. c) Explain the process of stress testing with example. _ Stress Testing is a type of performance testing conducted to determine how a system behaves under extreme or abnormal conditions. The goal is to evaluate the system's stability and robustness when subjected to stress factors such as heavy loads, high traffic, or limited resources. Stress testing helps to identify potential system failures, memory leaks, or performance bottlenecks that may not be visible under normal conditions. Example: Suppose a web application is designed to handle 1000 simultaneous users. Stress testing would involve simulating a much higher number of users (e.g., 5000 or 10000 users) to see how the application performs under such extreme load conditions. The application might crash, slow down, or experience unexpected behavior, which could then be addressed by the development team. Stress testing is essential to ensure that the system can recover gracefully from failures and continues to perform under high-stress scenarios. Q4) Attempt any two of the following : [2x4=8] a) Define navigation testing. How to test navigation syntax and semantics? _ Navigation Testing refers to testing the process of navigating between different pages, screens, or components in a software application. It ensures that users can move smoothly from one part of the application to another, and that the application behaves as expected during transitions. Navigation Syntax Testing: This tests if the syntax used for navigating (like URLs, buttons, or menus) is correct. For instance, verifying that clicking a link correctly redirects to the intended page or screen. It involves checking if the correct URLs are formed and if navigation commands (like "back" or "forward") function properly. Navigation Semantics Testing: This focuses on the meaning and intent Os behind navigation elements. It checks if the navigation follows the expected flow and logic. For example, ensuring that a "Next" button takes the user to the correct screen and that the "Home" button always returns to the homepage. b) Define the term test case. Explain with example test case. _— A Test Case is a set of conditions or variables used to determine if a software application is working as intended. A test case includes inputs, execution steps, and expected results. Example Test Case: Test Case ID: TC_01_Login Test Description: Verify user can log in with valid credentials. Preconditions: User is registered. Test Steps: Open the login page. Enter valid username and password. Click the "Login" button. Expected Result: User is redirected to the dashboard page. Actual Result: (To be filled during testing) Status: (Pass/Fail) c) Compare verification and validation. — Aspect Verification Definition Verifies if the product is being built according to requirements. Focus Focuses on the process of development. What is Checks whether checked the system Is bullt correctly (e.g., design specifications). Validation Ensures the product meets the user's needs and expectations. Focuses on the final product. Checks whether the system Is the right one (meets user needs). Methods Reviews, User inspections, acceptance walkthroughs, testing (UAT), and static beta testing. testing. When During the After the performed development development phase. phase, before release. Q5) Attempt any one of the following : [1x3=3] a) Explain the various phases of internationalization testing. —_— Preparation Phase: In this phase, the testing team ensures that the application is ready for internationalization. This involves reviewing the software architecture, code, and configurations to ensure that it supports multiple languages, currencies, time zones, and other locale-specific requirements. Translation Phase: This phase checks if the software handles different languages properly. The focus is on verifying if text strings are translated accurately and if the software can accommodate different character sets (such as Unicode for non-English languages). Locale and Cuitural Customization Phase: In this phase, the application is tested to ensure that it adapts correctly to different cultural norms, like date formats, number formats, colors, and cultural conventions. The user interface should support the local needs of the target market. Testing of Functional and Non-Functional Aspects: Testing ensures that the software functions as expected in all locales and that the system remains performant. This includes checking for issues like string truncation, font rendering, or performance issues in different environments. Regression Testing: Once internationalization changes are applied, regression testing is performed to ensure that the existing features still work as expected in all languages and regions. b) Difference between Alpha and Beta Testing. —_— Aspect Testing Environment Stage of Development Purpose Tester Type Scope Alpha Testing Conducted in acontrolled environment by developers or internal testers. Early phase, typically before the software is released to external users. To find bugs and fix them before external release. Performed by developers or in-house testers, Limited scope, focusing on functionality. Beta Testing Conducted in the real-world environment by actual users. Later phase, after internal testing is complete. To gather feedback on usability and detect issues ina real user environment, Performed by external users or selected customer groups. Wider scope, covering real- world usage and experience. © seamed nth one semner T.Y. B.Sc. (Computer Science} CS-362 : SOFTWARE TESTING (Revised 2019) (Semester - VI) Time : 2 Hours] [Max. Marks : 35 Instructions to the candidates: 1) All questions are compulsory. 2) Figures to the right indicate full marks. 3) Assume suitable data, if necessary. Q1) Attempt the following. [8x1=8] a) Define debugging. _> Debugging: Debugging is the process of identifying, analyzing, and fixing defects or errors in software code to ensure the program runs as expected. b) Black Box testing is known as glass box testing. Justify T/F. —_— Black Box testing is known as glass box testing. Justify T/F: False. Black Box testing focuses on testing the functionality of the software without looking into its internal workings, whereas Glass Box testing (also called White Box testing) involves testing the internal structures and workings of an application. c) Write advantages of Load Testing. —> @ Identifies system performance under high traffic conditions. @ Helps in determining how much load a system can handle before performance degrades. d) Writedifference between Agile and Traditional testing. _—_> @ Agile testing: Testing is done iteratively throughout the development cycle, and changes are incorporated as the project evolves. @ Traditional testing: Testing is often done after the software has been developed, with a more rigid, linear process. e) Write objective of Spike testing. _— Objective of Spike Testing: Spike testing is performed to assess the system's behavior under extreme load conditions, typically testing how the system performs when the load suddenly increases. f) List any 2 objectives of Software Testing. —_ 2 Objectives of Software Testing: @ Toensure that the software meets the specified requirements. @ To identify defects and ensure they are fixed before release. g) Define Cyclomatic complexity. _> Cyclomatic Complexity: Cyclomatic complexity is a software metric used to measure the complexity of a program's control flow. It is calculated based on the number of decision points in the program. h) Define Test plan. _ Test Plan: A test plan is a document that outlines the strategy, scope, objectives, and activities for testing a software application, including resources, timelines, and deliverables. Q2) Attempt any four of the following: [4x2=8] a) Explain Top down integration. —> Top Down Integration: Top-down integration is a type of incremental integration testing in which testing starts with the top-level module and progresses downward through the lower-level modules. Initially, stubs (simplified modules) are used to simulate the behavior of lower-level modules that have not yet been integrated. As each lower-level module is developed, it replaces the stub and is tested. b) Write difference between White and Black box testing. — White-box Black-box Aspect Testing Testing Focus Internal logic Functionality of and structure the system. ofthe system without regard to internal structure Test Based on Based on Design code, internal requirements paths, and functionality conditions, of the system and logic Testers’ Requires No knowledge of Knowledge knowledgeof code or internal the code and workings is internal needed structure Test Types Unit testing, Functional integration testing, system testing, code testing, coverage acceptance testing c) List the features of Agile Testing. > Customer Collaboration: Continuous feedback from the customer to improve the product. Iterative Process: Testing is done in short cycles or iterations. Flexible and Adaptive: Agile testing adapts to changes in requirements. Continuous Testing: Testing is integrated throughout the development cycle. Cross-functional Teams: Testers, developers, and other stakeholders work together closely. Early and Frequent Testing: Testing begins early and continues frequently to identify issues early. © seamed nth one semner d) Write short note on dimension of quatity. _ Dimensions of Quality: The dimensions of quality refer to various attributes that define the quality of a software product. They include: @ Functionality: The ability of the software to meet the specified requirements. @ Reliability: The ability to perform consistently under expected conditions. @ Usability: The ease of use and learning of the software. @ Efficiency: The software's performance in terms of resource utilization. @ = Maintainability: The ease with which the software can be updated or modified. e@ Portability: The ability of the software to operate on different platforms or environments. e) Write advantages of regression testing. — Advantages of Regression Testing: @ Detects New Defects: Identifies new bugs introduced by recent changes to the software. @ Ensures Functionality: Ensures that the existing functionalities still work correctly after code changes. @ Supports Continuous Integration: Helps maintain software stability during frequent changes. @ Reduces Risk: Minimizes the risk of breaking existing features while introducing new ones. @ Improves Software Quality: Helps maintain a high level of quality in the software product. Q3) Attempt any two of the following: [2x4=8] a) Explain V-model in detail. _—> The V-Model (Verification and Validation Model) is a software development model that emphasizes testing at each development phase. Itis an extension of the Waterfall Model, but instead of moving downward linearly, it bends upwards after the coding phase, forming a V- shape. V-Model Diagram V-Model Geeta ce Seas Testing Seon Seo besa isin) Architectural Integration pear) isin Coding Phases of V-Model The left side represents the development phase (Verification), while the right side represents the testing phase (Validation). 1. Verification (Development Phases) Requirement Analysis . Gather business requirements. System Design = Define overall system architecture. Architectural Design -—. Break system into smaller modules. Module Design — Define module-level design. Coding Phase — Write and implement the code. 2. Validation (Testing Phases) Unit Testing = Test individual modules. Integration Testing — Test interactions between modules. System Testing — Verify the whole system. Acceptance Testing — Validate against business requirements. Each testing phase is linked to a corresponding development phase, ensuring early error detection. b) Describe basic path testing with example. _ Basic Path Testing: Basic path testing is a white-box testing technique that involves identifying and testing all the possible paths through a program's control flow. The goal is to ensure that all paths, from the entry to the exit of the program, are executed at least once. This helps in uncovering any errors related to the control flow and logic of the program. Steps: Identify the basic paths: Determine the paths through the program based on its control flow graph (CFG). Select test cases: Choose test cases that cover each identified path. Execute the tests: Run the tests and check if the paths behave as expected. Example: Consider a simple function: def check_age(age): if age < 18: return "Underage" elif age == 18: return "Just turned 18" else: return "Adult" Control Flow: Start — age< 18 — "Underage" (Path 1) Start — age == 18 — "Just turned 18" (Path 2) Start . age >18 = "Adult" (Path 3) Test cases: Test Case 1: check_age(16) — Path 1: "Underage" Test Case 2: check_age(18) — Path 2: "Just turned 18" Test Case 3: check_age(25) — Path 3: "Adult" By testing these paths, we ensure that each logical branch is exercised at least once, making the testing comprehensive. c) What is system testing? How it test the system? Also list it’s different types. _> System Testing is a type of software testing that focuses on verifying the complete and integrated system. It ensures that the entire software product functions as expected according to the requirements specified. It checks the interactions between various components and validates that the system meets the overall business requirements. How It Tests the System: Test Execution: The system is tested as a whole by executing all the integrated modules and components. Environment Validation: The system is validated in an environment similar to production to ensure correct deployment. Requirement Verification: The system is validated against the functional and non-functional requirements. Error Detection: The system is checked for any discrepancies, defects, or failures. Types of System Testing: Functional Testing: Validates the functional requirements of the system. Performance Testing: Checks how the system performs under various conditions, including stress and load. Security Testing: Ensures the system is secure from vulnerabilities and unauthorized access. Compatibility Testing: Ensures the system works across different environments, platforms, and devices. Usability Testing: Validates the user-friendliness and ease of use of the system. Recovery Testing: Checks the system's ability to recover from crashes or hardware failures. Q4) Attempt any two of the following: [2x4=8] a) What is Web application? How it works? Explain diagrammatically. _ Web Application A web application is a software program that runs on a web server and is accessed through a web browser. Unlike traditional desktop applications, web applications do not need to be installed on a user's device. They use the internet to function and can be accessed from anywhere. How It Works: User Requests Access: The user enters the web application URL in a browser. Server Processes Request: The request is sent to the web server, which processes it and interacts with the database if needed. Database Fetches Data: If required, the database retrieves or stores data. Server Responds: The server sends the processed information back to the browser in the form of a web page. User Interaction: The user interacts with the application, and the process repeats as needed. Diagram: b) What is unit testing? How it works? Explain with example. —_— Unit Testing is a software testing technique where individual units or components of a software application are tested in isolation to ensure they function correctly. A "unit" refers to the smallest testable part of an application, such as a function, method, or class. The goal is to verify that each unit performs as expected independently before integrating it with other parts of the system. How It Works: Identify Units: The first step is identifying the individual units of the code, such as functions or methods. Write Test Cases: Write test cases to check the behavior of each unit. Test Execution: Execute the test cases using a testing framework (like JUnit for Java, PyTest for Python). Assert Results: The test compares the actual output with the expected output. If they match, the test passes; otherwise, it fails. Fix Failures: If the test fails, the developer fixes the bug and re-runs the test. Example: Suppose you have a function that adds two numbers: def add(a, b): return a+b A unit test for this function could look like this: import unittest class TestAddition(unittest.TestCase): def test_add(self): self.assertEqual(add(2, 3), 5) # Test should pass, as 2+3 = 5 if _name_ =="_main_": unittest.main() In this example: The function add() is tested by calling it with inputs 2 and 3. The expected output is 5. If the function returns 5, the test passes. c) What is test case? Explain with example. —_—> A Test Case is a set of conditions or variables under which a tester will determine whether a system or part of a system works as expected. Each test case consists of the following elements: Test Case ID: A unique identifier. Description: A brief explanation of what the test case is validating. Input: The values or conditions under which the test is executed. Expected Output: The anticipated result. Actual Output: The result obtained when the test is run (compared with the expected output). Status: Whether the test passed or failed. Example: For a function that adds two numbers, you could have the following test case: Test Case ID: TC001 Description: Test the addition of two positive integers. Input: add(2, 3) Expected Output: 5 Actual Output: 5 Status: Passed This test case ensures that the function add() works correctly for basic addition. You could have other test cases to check for edge cases like adding negative numbers or zero. Q5) Attempt any one of the following: [1x3=3] a) Write a difference between Alpha and Beta testing. _ Alpha Testing: Itis performed by the internal development team or QA team before releasing the product to external users. Itis typically conducted in a controlled environment within the organization. The primary goal is to identify bugs and issues early in the development cycle. Beta Testing: Itis performed by a select group of external users who are not part of the organization (real-world users). Beta testing occurs after alpha testing and before the final release to the public. The goal is to get feedback on the product's functionality, usability, and user experience in real-world conditions. b) Write short note on Agile testing Quadrants. —?. Agile Testing Quadrants provide a framework for organizing different types of testing activities in Agile development. The four quadrants are: Quadrant 1 (Q1): Unit Testing, Component Testing Focuses on testing individual features or units of the software. It ensures that the basic functionalities of the system work as expected. Quadrant 2 (Q2): Functional Testing, UAT (User Acceptance Testing) These tests focus on validating the system's functionality and user interactions. It often involves the product owner or end users to ensure the product meets their expectations. Quadrant 3 (Q3): Exploratory Testing, Usability Testing This quadrant emphasizes testing the system from a user perspective. It is more subjective and focuses on finding issues related to user experience and usability. Quadrant 4 (Q4): Performance Testing, Security Testing It includes non-functional testing such as performance, security, and stress testing. It ensures the system works under load and is secure from vulnerabilities. This framework helps Agile teams balance various types of testing, ensuring both functional and non-functional requirements are met efficiently. OF scanned with onEWeaner

You might also like