[Link].
(CS)
CS-3610 :So ware Tes ng And Tools
(2019 Credit Pa ern) (Semester VI)
[max. marks: 35]
Q1. A empt any eight of the following. [8X1=8]
a) Define test case.
A test case is a set of instruc ons or steps that are designed to test a specific feature or
func onality of a so ware applica on. It outlines the inputs, ac ons, and expected outputs
of a par cular scenario to ensure that the so ware is working as intended.
b) Define sta c tes ng.
Sta c tes ng is a so ware tes ng technique that involves examining the so ware or related
documenta on without execu ng the code. It can be done manually or with the help of
automated tools.
c) What is test incident report?
A test incident report is a document that logs any issue that occurs during so ware tes ng.
d) What is test plan?
A test plan is a document that outlines the objec ves, scope, approach, resources, and
schedule of a so ware tes ng effort.
e) What is design defect?
A design defect is a type of so ware defect that occurs when the so ware design does not
meet the requirements or specifica ons, resul ng in a product that does not func on as
intended.
f)McCabe’s cycloma c complexity defines an lower bound for the number of linearly path
through a program. State true or false.
True.
g) Enlist the any two open source automa on tes ng tools.
Selenium and Appium are two popular open-source automa on tes ng tools.
h) What is defect?
A defect is a flaw or error in a so ware applica on that causes it to behave in an unintended
or unexpected way.
i) What is entry criteria?
Entry criteria are the set of condi ons that must be met before tes ng can begin.
j) Write two limita on of manual tes ng.
Manual tes ng can be me-consuming and prone to human error. It may also be difficult to
reproduce certain test scenarios consistently.
Q2. A empt any four of the following. [4X2=8]
a) Define errors with it’s types.
Errors are mistakes made by humans while developing so ware. There are three types of
errors:
1. Syntax errors: These are errors in the syntax of the code that prevent it from being
compiled or executed.
2. Logical errors: These are errors in the logic of the code that cause it to produce incorrect
or unexpected results.
3. Run- me errors: These are errors that occur while the code is running and cause it to
crash or behave unexpectedly.
b) Enlist the different types of loop tes ng.
There are several types of loop tes ng:
1. Simple loops: These are loops that execute a fixed number of mes.
2. Nested loops: These are loops that contain other loops within them.
3. Infinite loops: These are loops that execute indefinitely.
4. Loops with mul ple exits: These are loops that have more than one way to exit.
5. Loops with a single exit: These are loops that have only one way to exit.
c) Write objec ve of wri ng test cases.
The objec ve of wri ng test cases is to ensure that so ware meets its requirements and
func ons as intended. Test cases help to iden fy defects and ensure that they are fixed
before the so ware is released to users. They also help to improve the quality of the
so ware and reduce the risk of defects being discovered by users.
d) What is tes ng defect? List its different types.
A tes ng defect is a flaw or problem in the so ware that prevents it from func oning as
intended. There are several types of tes ng defects:
1. Func onal defects: These are defects that prevent the so ware from func oning as
intended.
2. Performance defects: These are defects that cause the so ware to perform poorly or
slowly.
3. Usability defects: These are defects that make the so ware difficult to use or understand.
4. Compa bility defects: These are defects that prevent the so ware from working with
other so ware or hardware.
5. Security defects: These are defects that make the so ware vulnerable to security threats
or a acks.
6. Documenta on defects: These are defects in the documenta on that makes it difficult to
understand or use the so ware.
7. Configura on defects: These are defects that occur when the so ware is not configured
correctly.
e) Write the name of test automa on frameworks.
Name of the test automa on frameworks with descrip on:
1. Selenium: Selenium is a popular open-source tes ng framework for web applica ons. It
supports mul ple programming languages and browsers.
2. Appium: Appium is an open-source tes ng framework for mobile applica ons. It supports
mul ple pla orms and programming languages.
3. TestComplete: TestComplete is a commercial tes ng framework that supports mul ple
pla orms and programming languages. It includes a record and playback feature for test
crea on.
4. Robot Framework: Robot Framework is an open-source tes ng framework that supports
mul ple pla orms and programming languages. It uses a keyword-driven approach for test
crea on.
5. Cucumber: Cucumber is an open-source tes ng framework that supports mul ple
pla orms and programming languages. It uses a behavior-driven approach for test crea on.
6. JUnit: JUnit is a popular tes ng framework for Java applica ons. It provides a set of
annota ons and asser ons for test crea on.
7. TestNG: TestNG is a tes ng framework for Java applica ons. It provides a more flexible and
powerful alterna ve to JUnit.
8. PyTest: PyTest is a tes ng framework for Python applica ons. It provides a simple and
easy-to-use test crea on process.
9. NUnit: NUnit is a tes ng framework for .NET applica ons. It provides a set of a ributes
and asser ons for test crea on.
10. Protractor: Protractor is a tes ng framework for AngularJS applica ons. It uses Selenium
WebDriver for test automa on.
Q3. A empt any two of the following. [2X4=8]
a) Define bug and explain bug tracking tools.
A bug is a flaw or defect in so ware that causes it to behave in an unintended or unexpected
way. Bugs can be caused by a variety of factors, including errors in coding, design flaws, or
problems with system configura on. When bugs are discovered, they need to be reported
and fixed by the so ware development team.
Bug tracking tools are so ware applica ons that help so ware development teams manage,
track, and resolve bugs in their code. These tools are designed to make it easier for
developers to iden fy, priori ze, and resolve bugs. They allow developers to create bug
reports, assign bugs to team members, and track the status of bugs over me.
Bug tracking tools typically include features such as:
1. Bug repor ng: Developers can create bug reports that include informa on about the bug,
such as its severity, loca on in the code, and steps to reproduce.
2. Bug assignment: Developers can assign bugs to team members who are responsible for
fixing them.
3. Bug tracking: Developers can track the status of bugs over me, from the me they are
reported to the me they are resolved.
4. Bug priori za on: Developers can priori ze bugs based on their severity and impact on
the so ware.
5. Communica on: Developers can communicate with each other about bugs, ask ques ons,
and discuss possible solu ons.
6. Repor ng: Developers can generate reports that show the status of bugs, how long they
have been open, and other metrics.
Some popular bug tracking tools include:
1. Jira: A popular bug tracking tool that is used by many so ware development teams. It
includes features such as bug repor ng, bug tracking, and communica on.
2. Bugzilla: An open-source bug tracking tool that is used by many so ware development
teams. It includes features such as bug repor ng, bug tracking, and communica on.
3. Trello: A project management tool that can be used to track bugs and other issues. It
includes features such as bug repor ng, bug tracking, and communica on.
4. Asana: A project management tool that can be used to track bugs and other issues. It
includes features such as bug repor ng, bug tracking, and communica on.
5. GitHub Issues: A bug tracking tool that is integrated with GitHub. It includes features such
as bug repor ng, bug tracking, and communica on.
b) Explain branch coverage tes ng with its advantages and disadvantages.
Branch coverage tes ng is a type of so ware tes ng that aims to measure the percentage of
code branches that are executed when running a test suite. A code branch is a point in the
code where the program can take one of two or more paths, based on a condi on or
decision point.
Advantages of branch coverage tes ng include:
1. It helps to ensure that all possible paths through the code are executed at least once,
which can help to iden fy errors or defects that may not be caught by other types of tes ng.
2. It can help to improve the overall quality of the so ware by iden fying areas of the code
that are not being tested adequately.
3. It can help to iden fy areas of the code that are not being executed at all, which can help
to iden fy dead code that can be removed to improve performance and reduce complexity.
Disadvantages of branch coverage tes ng include:
1. It can be me-consuming and resource-intensive to create and execute tests that achieve
high branch coverage.
2. It may not be possible to achieve 100% branch coverage, as there may be some branches
that are not feasible or prac cal to test.
3. Achieving high branch coverage does not guarantee that the so ware is free of defects or
errors, as there may be other factors that affect the behavior of the so ware.
c) Explain IEEE std. test summery report with it’s various parameters.
The IEEE std. test summary report is a document that summarizes the results of so ware
tes ng ac vi es. It provides a comprehensive overview of the tes ng process, including the
objec ves of tes ng, the tes ng approach used, and the results of the tes ng. The IEEE std.
test summary report typically includes the following parameters:
1. Introduc on: This sec on provides an overview of the tes ng process and the objec ves
of the tes ng.
2. Test Items: This sec on lists the items that were tested, including the so ware modules,
hardware components, and other system elements.
3. Features Tested: This sec on lists the features of the so ware that were tested, including
the func onal and non-func onal requirements.
4. Test Cases: This sec on provides a detailed descrip on of the test cases that were
executed during the tes ng process.
5. Test Results: This sec on summarizes the results of the tes ng, including the number of
test cases executed, the number of test cases passed, the number of test cases failed, and
the number of test cases that were not executed.
6. Conclusion: This sec on provides a summary of the tes ng process and the results of the
tes ng, including any issues or defects that were iden fied during the tes ng process.
7. Recommenda ons: This sec on provides recommenda ons for future tes ng ac vi es,
including any changes or improvements that could be made to the tes ng process.
Q4. A empt any two of the following. [2X4=8]
a) Write a test case for facebook login func onality of the webpage applica on.
Test Case: Facebook Login Func onality
Purpose: To verify that the Facebook login func onality of the webpage applica on is
working as expected.
Pre-condi ons:
- The webpage applica on is installed and running.
- The user has a Facebook account and has granted the webpage applica on permission to
access their Facebook account.
Test Steps:
1. Launch the webpage applica on.
2. Click on the "Login with Facebook" bu on.
3. The user should be redirected to the Facebook login page.
4. Enter the user's Facebook email address and password.
5. Click the "Login" bu on.
6. The user should be redirected back to the webpage applica on.
7. Verify that the user is logged in and their Facebook profile picture is displayed on the
webpage applica on.
8. Verify that the user can access their Facebook account informa on on the webpage
applica on.
Expected Results:
- The user should be able to log in successfully using their Facebook account.
- The user's Facebook profile picture should be displayed on the webpage applica on.
- The user should be able to access their Facebook account informa on on the webpage
applica on.
Actual Results:
- If the user is able to log in successfully using their Facebook account, their profile picture is
displayed on the webpage applica on, and they can access their Facebook account
informa on, the test case passes.
- If the user is unable to log in successfully using their Facebook account, their profile picture
is not displayed on the webpage applica on, or they cannot access their Facebook account
informa on, the test case fails.
Post-condi ons:
- The user is logged in and can access their Facebook account informa on on the webpage
applica on.
b) Consider the following code.
Input(int x,int y)
{
Int z=((x+y)200)*100;
If(z>50)
Prin (“PASS”);
Else
Prin (“FAIL”);
}
Test case 1: x=20,y=30 , Test case 2: x=100,y=75
Consider above test cases scenarios and find the percentage of statement coverage.
The given code has two test cases as follows:
Test Case 1: x=20, y=30
z = ((20 + 30) * 200) * 100 = 1000000
Since z > 50, the output will be "PASS".
Test Case 2: x=100, y=75
z = ((100 + 75) * 200) * 100 = 5500000
Since z > 50, the output will be "PASS".
To calculate the percentage of statement coverage, we need to determine which statements
were executed during the tes ng process.
In this case, both the "if" and "else" statements were executed during both test cases. Therefore,
we have 100% statement coverage.
In summary, the percentage of statement coverage is 100%.
c) Write benefits of automated tests.
Automated tests have several benefits, including:
1. Faster feedback: Automated tests can be run much faster than manual tests, which means that
developers can get feedback on their code changes more quickly.
2. Increased test coverage: Automated tests can cover many more scenarios than manual tests,
which increases the overall test coverage.
3. Consistency: Automated tests are consistent in their execu on, which means that they will
always produce the same results when run under the same condi ons.
4. Reusability: Automated tests can be reused across different versions of the so ware, which
saves me and effort.
5. Scalability: Automated tests can be easily scaled up to test large and complex systems.
6. Early bug detec on: Automated tests can detect bugs early in the development process, which
reduces the cost of fixing them.
7. Cost-effec ve: Automated tests can save me and money in the long run by reducing the need
for manual tes ng.
8. Improved quality: Automated tests can help improve the overall quality of the so ware by
iden fying defects and issues before they reach produc on.
9. Con nuous integra on: Automated tests can be integrated into the con nuous integra on
process, which ensures that code changes are tested automa cally before they are deployed.
Q4. A empt any one of the following. [1X3=3]
a) Explain defect lifecycle.
The defect lifecycle is the process that a so ware bug or defect goes through, from iden fica on
to resolu on. It consists of the following stages:
1. Defect Iden fica on: This is the first stage of the defect lifecycle, where the defect is iden fied
by a tester or a user. The defect can be iden fied during tes ng, or it can be reported by a user
a er the so ware has been released.
2. Defect Logging: A er the defect has been iden fied, it needs to be logged into a tracking
system. The defect is assigned a unique ID, and details such as the severity, priority, and steps to
reproduce the defect are recorded.
3. Defect Triage: In this stage, the defect is reviewed by a team of developers, testers, and other
stakeholders to determine its severity and priority. Based on this, the defect is either fixed
immediately or added to the backlog for future releases.
4. Defect Fixing: In this stage, the developer assigned to the defect works on fixing it. Once the
defect is fixed, the developer marks it as "resolved" and assigns it to the tester for verifica on.
5. Defect Verifica on: In this stage, the tester verifies that the defect has been fixed and closes
the defect. If the defect is not fixed, it is reopened and sent back to the developer for further
fixing.
6. Defect Closure: Once the defect has been verified and closed, it is marked as "closed" in the
tracking system. The defect is then removed from the backlog and considered resolved.
b) Write selenium installa on steps.
Here are the steps to install Selenium:
1. Install Java Development Kit (JDK): Selenium requires a Java Run me Environment (JRE) to run.
You can download and install the latest version of JDK from the official Oracle website.
2. Install an Integrated Development Environment (IDE): An IDE is a so ware applica on that
provides a comprehensive environment for coding, tes ng, and debugging. You can use any IDE
of your choice, such as Eclipse or IntelliJ IDEA.
3. Download Selenium WebDriver: Selenium WebDriver is a tool for automa ng web browsers.
You can download the latest version of Selenium WebDriver from the official Selenium website.
4. Configure the IDE: Once you have installed the IDE, you need to configure it to work with
Selenium. You can do this by adding the Selenium WebDriver JAR file to the project's build path.
5. Set up the Selenium WebDriver environment: You need to set up the Selenium WebDriver
environment by downloading the appropriate driver for the browser you want to automate. For
example, if you want to automate Google Chrome, you need to download the ChromeDriver.
6. Write your first Selenium test: Once you have set up the Selenium WebDriver environment,
you can write your first Selenium test. You can do this by crea ng a new Java class in your IDE
and impor ng the necessary Selenium WebDriver classes.
___________________________________**********__________________________________