Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
4 views

Software testing & tools solution

The document provides definitions and explanations of key software testing concepts, including test cases, static testing, test plans, and defects. It covers various testing techniques, tools, and methodologies, detailing their purposes and processes. Additionally, it includes practical examples such as test cases for login functionalities and discussions on automated testing benefits.

Uploaded by

saud.sayyed.1301
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Software testing & tools solution

The document provides definitions and explanations of key software testing concepts, including test cases, static testing, test plans, and defects. It covers various testing techniques, tools, and methodologies, detailing their purposes and processes. Additionally, it includes practical examples such as test cases for login functionalities and discussions on automated testing benefits.

Uploaded by

saud.sayyed.1301
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 20

Paper 1

Q1) Attempt all of the following for 1 mark each.


a) Define test case.
A test case is a set of specific inputs, preconditions, and
expected outcomes developed to verify that a particular
functionality of the software works as intended. It includes clear
steps to test a specific feature of the application, ensuring the
software behaves as expected under specific conditions.

b) Define static testing.


Static testing is a technique where the software code or project
documents are examined without being executed. This is done
through methods such as reviews, walkthroughs, or inspections
to identify errors early in the software development life cycle. It
focuses on preventing defects rather than identifying them
during execution.

c) What is a test incident report?


A test incident report is a document that records any events,
deviations, or unexpected outcomes that occur during software
testing. These incidents are analyzed to identify the root cause
and determine if they are actual defects, test data issues, or
environmental problems.

d) What is a test plan?


A test plan is a formal document that outlines the testing
strategy, objectives, resources, schedule, and deliverables for a
project. It serves as a guide for the testing team, detailing what
will be tested, how it will be tested, and the criteria for success.

e) What is a design defect?


A design defect refers to flaws in the architecture or design of
software that prevent it from meeting the specified
requirements. These defects can cause issues such as poor
performance, functionality failure, or user dissatisfaction.

f) McCabe’s Cyclomatic complexity defines a lower


bound for the number of linearly independent paths
through a program. State true or false.
True.
McCabe's Cyclomatic complexity is used to measure the
complexity of a program by identifying the number of
independent execution paths, helping in determining the
minimum test cases needed for complete path coverage.

g) Enlist the two open-source automation testing tools.


1. Selenium: Widely used for automating web applications.
2. JMeter: Primarily used for performance testing.

h) What is a defect?
A defect is an imperfection or deviation in a software
application that causes it to behave in a way that is not as
intended or expected. It is also referred to as a bug or fault.

i) What is entry criteria?


Entry criteria refer to the preconditions that must be met before
the testing phase can begin. For example, the availability of a
stable build, test environments, and approved test cases.

j) Write two limitations of manual testing.


1. Time-consuming: Manual testing requires a significant
amount of time for repetitive tasks like regression testing.
2. Prone to human error: Errors such as skipping steps or
misinterpreting results can occur during manual testing.

Q2) Attempt all of the following for 2 marks each.


a) Define errors with its different types.
Errors are unintended mistakes in a software application caused
by developers or users.
Types:
1. Syntax Errors: Errors in the structure or syntax of the
code, such as missing semicolons.
2. Logical Errors: Mistakes in the logic of the code, resulting
in incorrect output.

b) Enlist the different types of loop testing.


1. Simple Loop Testing: Testing loops that iterate a fixed or
simple number of times.
2. Nested Loop Testing: Testing loops within loops to
ensure functionality at all levels.
3. Concatenated Loop Testing: Testing multiple loops
executed sequentially or interactively.

c) Write the objective of writing test cases.


The main objective of writing test cases is to systematically
document test scenarios to validate the software against its
requirements. Test cases help:
1. Ensure that the software performs as expected.
2. Facilitate defect identification and correction.

d) What is a testing defect? List its different types.


A testing defect is a variance between expected and actual
results during software testing.
Types:
1. Functional Defects: Related to functionality, such as
incorrect outputs.
2. Logical Defects: Errors due to incorrect logic or flow in
the code.
e) Write the name of test automation frameworks.
1. Data-Driven Framework: Separates test logic and data.
2. Keyword-Driven Framework: Uses keywords to
represent actions.

Q3) Attempt all of the following for 3.5 marks each.


a) Define bug and explain bug tracking tools.
A bug is an error, flaw, or failure in software that leads to
incorrect or unexpected behavior. Bug tracking tools help
manage and document these issues effectively.
Examples:
1. Jira: Provides robust issue tracking and integrates with
development tools like GitHub.
2. Bugzilla: An open-source tool supporting advanced
searching and notifications.

b) Explain branch coverage testing with its advantages


and disadvantages.
Branch coverage testing ensures all possible branches of
decision points are executed during testing.
 Advantages:
1. Improves test quality by identifying untested
branches.
2. Helps ensure better logic verification.
 Disadvantages:
1. Time-intensive for complex programs.
2. May miss issues unrelated to decision points.

c) Explain IEEE Std. test summary report with its various


parameters.
An IEEE test summary report includes:
1. Test Overview: Brief description of the tests conducted.
2. Metrics: Details about test cases executed, passed, and
failed.
3. Defects: Summary of detected defects and their
resolution status.
4. Recommendations: Suggested improvements for future
testing.

Q4) Attempt all of the following for 3.5 marks each.


a) Write a test case for Facebook login functionality of
the web page application.
Test Case
TC_Facebook_Login
ID
To validate the login functionality with valid
Objective
credentials
Preconditi
User must have a valid Facebook account
ons
Steps 1. Open Facebook login page
2. Enter valid username and password
3. Click the login button |
| Expected Result | User is successfully logged in to their
account |

b) Find the percentage of statement coverage for the


given test cases.
Code:
int z = ((x + y) / 200) * 100;
if (z > 50) printf("PASS");
else printf("FAIL");
Test Cases:
1. x = 20, y = 30: Result is FAIL (z = 25).
2. x = 100, y = 75: Result is PASS (z = 87).
Statement Coverage:
Total statements = 3 (Assignment, if condition, printf).
Covered statements = 3.
Coverage = (3/3) × 100 = 100%.

c) Write benefits of automated testing.


1. Efficiency: Speeds up the testing process by automating
repetitive tasks.
2. Accuracy: Reduces the chances of human errors.
3. Reusability: Test scripts can be reused across different
versions of the software.

Q5) Attempt all of the following for 3 marks each.


a) Explain defect life cycle.
The defect life cycle includes the following stages:
1. New: The defect is logged.
2. Assigned: Assigned to a developer for resolution.
3. Fixed: Developer resolves the issue.
4. Retested: Tester verifies the fix.
5. Verified: Marked as resolved if working correctly.
6. Closed: Defect is closed after confirmation.

b) Write Selenium installation steps.


1. Install Java Development Kit (JDK) and set up the
JAVA_HOME environment variable.
2. Download Selenium WebDriver from the official website.
3. Configure Selenium JAR files in the preferred IDE (e.g.,
Eclipse).
4. Install browser-specific drivers (e.g., ChromeDriver).
Here are detailed solutions for Paper 2 and Paper 3 with
slightly lengthier answers:

Paper 2
Q1) Attempt all of the following for 1 mark each.
a) Define Test Automation.
Test automation is the process of using software tools to
execute pre-defined tests, compare actual outcomes with
expected outcomes, and report results. It reduces manual effort
and increases testing efficiency.

b) What is a test report?


A test report is a document that provides a summary of testing
activities, including details about test cases executed, defects
found, and the overall status of the software quality.

c) What is static testing?


Static testing involves reviewing code, design documents, or
requirements without executing the program. It helps identify
defects early in the software development lifecycle.

d) What is an error?
An error is a human mistake in software development that
leads to incorrect results or system behavior. It can occur
during coding, requirement gathering, or designing.

e) Write any two software defects by nature.


1. Functional Defects: Deviations in the functionality of the
software from the expected behavior.
2. Performance Defects: Issues related to the speed or
efficiency of the software.
f) Define Smoke Testing.
Smoke testing is a preliminary test to check the basic
functionality of a software application. It ensures that the
critical features of the system work as intended.

g) Test suites are used to group similar test cases. State


TRUE or FALSE.
True.

h) What is Cyclomatic complexity?


Cyclomatic complexity is a metric used to measure the
complexity of a program. It represents the number of
independent paths in the program's control flow graph.

i) How many types of testing tools?


There are two main types of testing tools:
1. Manual Testing Tools
2. Automation Testing Tools

j) Define code coverage in white box testing.


Code coverage is a measure of how much of the source code is
executed during testing. It helps identify untested parts of the
program.

Q2) Attempt all of the following for 2 marks each.


a) List the goals of loop coverage testing.
1. Ensure that all loops in the code are tested.
2. Validate the behavior of loops under boundary and edge
conditions.

b) Define test criteria and explain its types.


Test criteria are standards or rules used to decide whether a
test has passed or failed.
Types:
1. Entry Criteria: Conditions that must be met before
testing begins.
2. Exit Criteria: Conditions that must be met before testing
is considered complete.

c) List any two web-based open-source automation


software testing tools.
1. Selenium: A tool for automating web browsers.
2. Katalon Studio: A comprehensive web-based testing
tool.

d) Define priority defect and its different levels.


A priority defect is an issue that affects the functionality or
performance of the software and must be resolved based on its
impact.
Levels:
1. High Priority: Needs immediate attention.
2. Medium Priority: Important but not urgent.
3. Low Priority: Can be fixed in later stages.

e) Write any two features of Bugzilla tool.


1. Provides email notifications for updates on bugs.
2. Allows advanced search capabilities for efficient bug
tracking.

Q3) Attempt all of the following for 3.5 marks each.


a) What are different types of loop testing? Explain in
detail.
Loop testing is a white-box testing technique to validate loops
in a program.
Types:
1. Simple Loops: Single loop testing.
2. Nested Loops: Testing loops within loops to ensure
proper nesting behavior.
3. Concatenated Loops: Multiple loops tested sequentially.
4. Unstructured Loops: Testing non-standard loops that
lack proper control flow.

b) Explain IEEE Std. Test Incident report in detail.


An IEEE Test Incident Report includes:
1. Incident Description: Details of unexpected events
during testing.
2. Severity and Priority: Impact on the application and
urgency for resolution.
3. Environment Details: System and software configuration
during the incident.
4. Steps to Reproduce: Instructions to recreate the issue.
5. Resolution: Actions taken to resolve the incident.

c) Develop source code to check if a number is prime in


C Programming. Code:
#include <stdio.h>

int isPrime(int num) {


if (num <= 1) return 0;
for (int i = 2; i <= num / 2; i++) {
if (num % i == 0) return 0;
}
return 1;
}

int main() {
int num;
printf("Enter a number: ");
scanf("%d", &num);
if (isPrime(num)) printf("%d is a prime number.", num);
else printf("%d is not a prime number.", num);
return 0;
}
Control Flow Graph: Consists of nodes representing decision
points and edges for control flow.
Cyclomatic Complexity: E−N+2=5−4+2=3E - N + 2 = 5 - 4
+ 2 = 3.
Continuing with the remaining sections of Paper 2:

Q4) Attempt all of the following for 3.5 marks each.


a) Create a case study to verify the functionality of the
Amazon login page.
Test Case
TC_Amazon_Login
ID
To validate the login functionality with valid and
Objective
invalid credentials.
Preconditi
The user must have an active Amazon account.
ons
Steps
1. Navigate to the Amazon login page.
2. Enter a valid email address and password.
3. Click the "Sign-In" button.
4. Repeat with invalid credentials (e.g., incorrect password). |
| Expected Results |
5. The user is logged in successfully with valid credentials.
6. An appropriate error message is displayed for invalid
credentials. |

b) Consider the given code and apply decision coverage


testing to create use cases.
Code:
CheckClass(int x) {
if (x > 80)
Print("O");
else
Print("Class A");
}
Test Cases:
1. x = 85: Executes the "if" block (O is printed).
2. x = 75: Executes the "else" block (Class A is printed).
Decision Coverage:
Since both "if" and "else" conditions are executed, decision
coverage is 100%.

c) Explain STLC with its phases.


STLC (Software Testing Life Cycle) refers to a sequence of
activities conducted during software testing.
Phases:
1. Requirement Analysis: Understanding testable
requirements.
2. Test Planning: Defining the scope and objectives of
testing.
3. Test Case Development: Writing test cases and test
data.
4. Test Environment Setup: Preparing the required
hardware and software.
5. Test Execution: Running test cases and logging results.
6. Defect Reporting: Documenting any issues identified
during testing.
7. Test Closure: Finalizing the process and creating a
summary report.

Q5) Attempt all of the following for 3 marks each.


a) Write a short note on the classification of defects.
Defects can be classified based on:
1. Nature: Functional, performance, usability, security, or
compatibility defects.
2. Severity: Critical, major, or minor defects based on their
impact on functionality.
3. Detection Stage: Requirements phase, design phase, or
testing phase defects.

b) Give any three features of WinRunner and Selenium.


WinRunner:
1. Provides record-and-playback functionality.
2. Supports test scripting for automated regression testing.
3. Offers data-driven testing capabilities.
Selenium:
1. Open-source and supports multiple programming
languages like Java, Python, and C#.
2. Cross-browser compatibility for testing.
3. Integrates with tools like Maven, Jenkins, and Docker.
Paper 3
Q1) Attempt all of the following for 1 mark each.
a) Define Smoke Testing.
Smoke testing is a quick test to check whether the basic
functionalities of an application work correctly.
b) Define code coverage with the formula:
Code coverage is a testing metric used to measure how
much of the source code has been executed while
testing. It helps ensure that all parts of the program are
tested.
Formula:
Code Coverage=(Number of Executed StatementsTotal N
umber of Statements/ Total Number of Statements)×100
Example:
If a program has 50 statements in total and 40 of them
are executed during testing:
Code Coverage=(40/50)×100=80
This means 80% of the code has been tested.

Let me know if you’d like more examples or further


clarification!

c) Enlist any two bug tracking tools.


1. Bugzilla
2. Jira

d) Explain test plan.


A test plan is a document outlining the testing objectives,
scope, strategies, resources, and schedules required to ensure
the quality of the software.

e) Enlist any two types of loop testing.


1. Simple Loop Testing
2. Nested Loop Testing

f) Enlist any two objectives of writing test cases.


1. To validate software functionality against requirements.
2. To detect defects at an early stage of development.

g) What are functional defects?


Functional defects are flaws in the software's functionality, such
as incorrect outputs, feature failures, or logic errors.

h) Enlist any two types of defects.


1. Functional Defects
2. Security Defects

i) What is automation testing?


Automation testing is the use of tools and scripts to execute
tests, validate results, and improve testing efficiency.

j) Silk Test is the most popular testing tool specifically


designed for regression and functionality testing. State
TRUE or FALSE.
True.

Q2) Attempt all of the following for 2 marks each.


a) Enlist any two features of Bugzilla.
1. Email Notifications: Sends updates about bug status to
relevant stakeholders.
2. Advanced Search Capabilities: Allows users to filter
and locate specific bugs based on various criteria.
b) Write any two advantages of branch coverage.
1. Improved Test Quality: Ensures that all decision points
are tested for both true and false outcomes.
2. Error Detection: Helps identify logical errors in decision-
making constructs, ensuring robust code.

c) What is a test summary report?


A test summary report is a high-level document that provides
an overview of testing activities, including:
1. Number of test cases executed, passed, and failed.
2. Identified defects and their severity levels.

d) Write any two causes of defects.


1. Incorrect Requirements: Misunderstanding or
miscommunication of requirements.
2. Coding Errors: Mistakes made by developers during
implementation.

e) Write any two limitations of manual testing.


1. Time-Consuming: Repetitive tasks like regression testing
take significant time.
2. Inconsistent Execution: Manual testing can lead to
human errors, affecting test accuracy.

Q3) Attempt all of the following for 3.5 marks each.


a) What are entry and exit criteria?
Entry and exit criteria are conditions that define the start and
end of the testing phase.
1. Entry Criteria: Pre-requisites to begin testing, such as a
stable build, test data availability, and a configured
environment.
2. Exit Criteria: Defines when testing is considered
complete, such as all planned test cases executed, critical
defects fixed, and the test summary report prepared.

b) Explain path coverage testing.


Path coverage testing ensures all possible paths in a program's
control flow graph are executed.
Steps:
1. Identify all independent paths in the control flow graph.
2. Write test cases to cover each path.
Advantages:
 Detects unreachable code.
 Improves code reliability by testing all possible execution
flows.
Disadvantages:
 Time-consuming for complex applications.

c) Explain design defects with its different types.


Design defects occur when the software design fails to meet
functional requirements.
Types:
1. Algorithmic Defects: Incorrect logic or algorithms used
in the design.
2. Interface Defects: Errors in communication between
components or modules.
3. Data Flow Defects: Improper handling of data in the
design.

Q4) Attempt all of the following for 3.5 marks each.


a) Write a test plan for the functionality of the Flipkart
login page.
Test Plan ID TP_Flipkart_Login
To validate the login functionality of the
Objective
Flipkart webpage.
Scope Test valid and invalid login scenarios.
Test Desktop and mobile browsers (Chrome,
Environment Firefox).
Test Cases:
1. Test login with valid credentials.
2. Test login with an invalid password.
3. Test login with an unregistered email.
| Expected Results |
4. Successful login for valid credentials.
5. Error messages displayed for invalid credentials. |

b) Explain WinRunner tool.


WinRunner is an automation testing tool used for functional and
regression testing.
Features:
1. Record and Playback: Allows users to record their
actions and replay them for testing.
2. Data-Driven Testing: Tests applications with multiple
data sets.
3. Scripting Language: Provides TSL (Test Script Language)
for customization.

c) Consider the code and find the percentage of


statement coverage.
Code:
Input (int x, int y) {
Sub = x - y;
if (Sub > 0)
Print("Positive");
else
Print("Negative");
}
Test Cases:
1. x = 10, y = 3 → Sub = 7 → Positive.
2. x = 10, y = 15 → Sub = -5 → Negative.
Statements:
1. Sub = x - y (Assignment).
2. if (Sub > 0) (Condition).
3. Print("Positive").
4. Print("Negative").
Coverage:
All statements are executed for these test cases.
Percentage Coverage = (4/4) × 100 = 100%.

Q5) Attempt all of the following for 3 marks each.


a) Explain severity defect with its types.
Severity defines the impact of a defect on the functionality of
software.
Types:
1. Critical: Causes system crashes or prevents operations
(e.g., payment gateway failure).
2. Major: Significantly impacts functionality but has
workarounds (e.g., broken links).
3. Minor: Cosmetic issues or non-critical bugs (e.g., spelling
errors).

b) What are unit testing and load testing?


1. Unit Testing: Tests individual components or modules of
the software to ensure they function correctly.
Example: Testing a login function in isolation.
2. Load Testing: Measures the software's performance
under expected or heavy user loads.
Example: Testing a website with 10,000 simultaneous
users.

You might also like