0% found this document useful (0 votes)
27 views11 pages

SDM Unit 5 12m

Uploaded by

dcstp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views11 pages

SDM Unit 5 12m

Uploaded by

dcstp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

1.Relate the term error, fault and failure.

List out some of the vital differences between bug,


defect, error, fault, and failure in the below table.

Error, fault, and failure are terms associated with software development and testing:

1. Error refers to a mistake made by a programmer while coding.

2. Fault is a defect in the software's behavior caused by an error.

3. Failure is when the software fails to perform its intended function.

Here's a table outlining some differences between bug, defect, error, fault, and failure:

| Term | Meaning |

| ------- | ---------------------------------------------------------------|

| Bug | A problem detected in testing |

| Defect | Any flaw, imperfection or deficiency found in software |

| Error | A mistake made by a programmer while coding |

| Fault | A defect in the software's behavior caused by an error |

| Failure | When the software fails to perform its intended function |

While these terms are often used interchangeably, it's essential to understand their
specific meaning to communicate effectively during software development and testing.

2.Does verification and validation same? Justify your answer.

No, verification and validation are not the same, although they are two closely related
processes in software development.

Verification involves ensuring that the software is built according to the requirements
specified in the design phase. It is a process of checking that the software meets technical
specifications, and that its design and implementation meet the requirements that were
established for the project.

Validation, on the other hand, is the process of evaluating the final software product to
ensure that it meets the business and user requirements. It's a process of checking that
the software meets the end-users' needs and specifications.

In summary, verification is checking that the software meets its requirements, and
validation is checking that the software meets the customers' needs. Verification and
validation are both important aspects of software development, and they must be
conducted at different stages of the software development lifecycle to ensure an effective
and high-quality software product.

3.There is a registration page in an e-commerce website to be tested. The internal working


of all the functions or classes (which are called) in the registration page need to be tested.
Which is the suitable testing for this scenario? Demonstrate with suitable examples.

The most suitable testing approach for this scenario would be Unit testing.

Unit testing is a type of testing where individual units or components of the software are
tested in isolation. In this case, each of the functions or classes called in the registration
page can be tested independently to ensure that they work as intended.

Here are some examples of how unit testing can be applied to testing the registration page
of an e-commerce website:

1. Validate that user inputs are validated: In unit testing, we can create test cases to check
if the user inputs are correctly validated by the component. For example, we can simulate a
case where the user enters an invalid email address or password and ensure that the
component reacts correctly.

2. Check database interactions: We can use unit testing to verify that the registration page
is correctly updating the related database tables. For example, we can create test cases to
check if the user data is being correctly written to the database.

3. Ensure error messages are displayed: Unit testing can also be used to verify that error
messages are displayed as expected on the registration page. We can simulate a scenario
where an error occurs, and validate that the correct error message is displayed.

Overall, unit testing helps to identify and isolate issues that may arise during development,
as well as provide confidence that individual components behave correctly.

4.You are using a calculator application. It is enough to check the output you are getting is
correct or not. Which is the suitable testing for this scenario? Demonstrate with suitable
example

The most suitable testing approach for this scenario would be Functional testing.

Functional testing is a type of testing that verifies the functionality of the application meets
the specified requirements. In this case, it would involve testing whether the calculator
application is providing the correct output when given inputs.

Here's an example of how functional testing can be applied to a calculator application:


1. Verify basic calculations: Functional testing can first verify that the calculator application
can perform basic arithmetic calculations like addition, subtraction, multiplication, and
division correctly. For example, we can test the addition feature of the calculator with
inputs such as 2+2=4.

2. Check complex calculations: More complex calculations can also be tested using
functional testing. For example, we can test the functionality of the calculator when
multiple operations are involved, such as (3*5)+2=17.

3. Validate edge cases: Functional testing should also include tests of edge cases. These
are test scenarios in the extremes of the input domain, such as inputting very large or very
small values. An example of an edge case for a calculator application could be testing the
calculation of an extremely large number.

4. Validate error handling: Functional testing should also validate the application's
response to invalid inputs such as dividing by zero or an invalid character.

Overall, functional testing ensures that the calculator application is meeting the
requirements for its intended functionality and provides correct output for a variety of
inputs under different scenarios.

5.You have written a function to add two numbers.int Add(int a, int b) { return a+b; }The
above function takes two numbers as input and returns their sum. How will do unit test on
this? Write suitable test cases to perform unit testing.

To perform unit testing on the Add function, we need to test it with various inputs and
check if the output is as expected. Here are some suitable test cases for the Add function:

1. Test Case 1: Adding two positive integers

Inputs: a = 5, b = 10

Expected Output: 15

2. Test Case 2: Adding two negative integers

Inputs: a = -5, b = -10

Expected Output: -15

3. Test Case 3: Adding a positive and a negative integer


Inputs: a = 5, b = -10

Expected Output: -5

4. Test Case 4: Adding a negative and a positive integer

Inputs: a = -5, b = 10

Expected Output: 5

5. Test Case 5: Adding zero to a positive integer

Inputs: a = 5, b = 0

Expected Output: 5

6. Test Case 6: Adding zero to a negative integer

Inputs: a = -5, b = 0

Expected Output: -5

7. Test Case 7: Adding two very large integers

Inputs: a = 1000000000, b = 2000000000

Expected Output: 3000000000

8. Test Case 8: Adding two very small integers

Inputs: a = -1000000000, b = -2000000000

Expected Output: -3000000000

9. Test Case 9: Adding an integer to itself

Inputs: a = 5, b = 5

Expected Output: 10

10. Test Case 10: Adding a positive integer to a larger negative integer

Inputs: a = 10, b = -100

Expected Output: -90

By testing the Add function with these test cases, we can ensure that the function is
working as expected and can handle different types of inputs.

6.Login and sign up features are tested in an e-commerce application separately. How do
you test the ability to log in or sign up after a user adds items to their basket and wants to
proceed to the checkout? Describe the various types

of testing you would perform to ensure this process works smoothly.

When testing the ability to log in or sign up after adding items to the basket and
proceeding to checkout in an e-commerce application, the following types of testing
should be performed:

1. End-to-end Testing: This type of testing involves testing the entire flow of the e-
commerce application from start to finish, including the ability to log in or sign up after
adding items to the basket and proceeding to checkout. The testers should simulate real
users and perform tasks such as browsing, adding items to the basket, logging in or
signing up, and checking out to ensure the flow is smooth and seamless.

2. Integration Testing: This type of testing focuses on testing the integration of different
components of the e-commerce application such as the login and sign-up feature with the
checkout feature. Testers should ensure that the user data is properly synchronized
between these features and that the transition from one feature to the other is seamless.

3. Usability Testing: This type of testing evaluates the overall usability of the e-commerce
application. In this case, testers should evaluate how easy it is for users to log in or sign up
after adding items to their basket and proceeding to checkout. They should ensure that
the process is straightforward and intuitive for users.

4. Performance Testing: This type of testing evaluates the speed and responsiveness of
the e-commerce application. Testers should simulate scenarios where multiple users are
trying to log in or sign up at the same time and evaluate how the application handles this
load.

5. Security Testing: This type of testing evaluates the security of the e-commerce
application. Testers should ensure that user data is properly encrypted and that the login
and sign-up features are secure from attacks such as brute force attacks or SQL injection
attacks.

By performing these types of testing, testers can ensure that the ability to log in or sign up
after adding items to the basket and proceeding to checkout works smoothly and securely
in the e-commerce application.

7.Design a GUI and test it with various techniques. Specify a few sample test cases.

GUI Design:

Title: Student Information System

Components:
1. Menu bar with the following options:

- File

- Edit

- View

- Help

2. Buttons:

- Add Student

- Remove Student

- Search Student

3. Text fields:

- Name

- Student ID

- Email

- Phone number

- Address

4. Table:

- Displays the list of students

- Contains columns for Name, Student ID, Email, Phone number, and Address

Test Cases:

1. Add Student

- Enter all valid information in the text fields

- Click on the Add Student button

- Verify that the new student is added to the table

2. Remove Student

- Select a student in the table


- Click on the Remove Student button

- Verify that the selected student is removed from the table

3. Search Student

- Enter a valid Student ID in the search text field

- Click on the Search Student button

- Verify that the searched student is displayed in the table

4. Invalid Input

- Leave all text fields blank

- Click on the Add Student button

- Verify that an error message appears, indicating that all fields are required

5. Edit Student Information

- Select a student in the table

- Change some of their information in the text fields

- Click on the Save button

- Verify that the student's information is updated in the table

6. Sorting

- Click on the Name column header

- Verify that the table is sorted in alphabetical order according to the names

7. Menu Bar

- Click on the File menu

- Verify that the following options are displayed: New, Open, Save, Save As, Exit

8. Help Button

- Click on the Help button

- Verify that a help page or dialogue box is displayed with relevant information about the
system.

8.Illustrate the various user acceptance test methods in product testing.


There are various user acceptance test methods that can be used to test a product. These
methods are used to ensure that the product meets the user’s needs and is ready for
release. The following are the user acceptance test methods in product testing:

1. Alpha testing: This type of user acceptance test is done by the product development
team. The team uses the product and identifies any issues or bugs that need fixing before
it is released to the beta testing phase.

2. Beta testing: Beta testing is done by a selected group of potential customers. The
individuals test the product and give feedback on usability, functionality, and performance.

3. Usability testing: In this method, users interact with the product to check if it is easy to
use and navigate. Feedback is given on design, layout, and accessibility.

4. Exploratory testing: Exploratory testing is done by testers with no script or predefined


steps. Users explore the product to identify any issues or errors and provide feedback on
its strengths and weaknesses.

5. A/B testing: This is a method that is used to compare two different versions of a product.
Users are split into two groups and each group is given a different version of the product to
use. The results are then compared to determine which version performs better.

6. Acceptance testing: This method is done at the end of the development cycle. Users
test the product to ensure that it meets their requirements and that all bugs have been
fixed.

Overall, these user acceptance test methods are crucial in ensuring that the product meets
the user's needs and is free of errors.

9.Consider an application and identify the performance testing methods that can be done.
Provide a report of the performance test.

Application: E-commerce website selling clothing and accessories

Performance testing methods:

- Load testing: Simulating various levels of user traffic to identify how the website handles
different load conditions and response times.

- Stress testing: Increasing the number of simultaneous user requests to see at what point
the website crashes or slows down.

- Endurance testing: Running the application continuously for an extended period to


observe its performance over time.

- Spike testing: Simulating sudden bursts in user traffic to see how the application handles
unexpected spikes in traffic.
- Scalability testing: Testing the application's ability to handle increased user traffic by
adding resources such as servers and CPUs.

Performance test report:

Goal: To evaluate the e-commerce website's performance under various load conditions
and determine its capacity and reliability to handle different user traffic levels.

Approach: Load testing was carried out using a load testing tool to simulate different levels
of user traffic, ranging from 100 to 1000 concurrent users. The test was run for an hour to
evaluate the application's performance over time. The test was also repeated with varying
network bandwidths to understand the application's behavior under low and high-speed
network conditions.

Results: The application performed well under low to medium traffic conditions, with
response times averaging between 400-800 milliseconds. However, at higher traffic levels
of 800+ concurrent users, the response times increased significantly, with some
transactions taking up to 5 seconds to complete. At 1000 concurrent users, the application
crashed, indicating that the application's current infrastructure might not support such a
high traffic volume.

Under low network bandwidth conditions, the application showed significant performance
degradation, with response times increasing by almost 50%. This indicates that the
application's performance is heavily dependent on the underlying network infrastructure.

Recommendations: Based on the results, there are few recommendations to improve the
application's performance:

- Provisioning additional web and application servers to support a larger traffic volume.

- Optimizing the database queries to reduce response times.

- Implementing Content Delivery Network (CDN) to lower network latency for the end-user.

- Reducing the size of images, videos, and other media files to make the website more
responsive.

Conclusion: The performance test highlights the need to optimize the eCommerce
website's infrastructure and application to meet the increasing demand for user traffic.
With the proper optimization measures, the application can handle high traffic with faster
response times and provide a reliable customer experience.

10.Describe the various components of test plan with suitable example

A test plan is a document that outlines the strategy, scope, and objectives of a software
testing effort. The following are some of the key components of a typical test plan, along
with examples:

1. Introduction/Overview: This section provides a brief overview of the project, including its
goals, scope, and target audience. For example:

"XYZ software is designed to automate payroll processing for small and medium sized
businesses. The goal of this testing effort is to ensure that the software is reliable,
accurate, and easy to use by end-users."

2. Test Strategy: This section lays out the testing approach and methodology that will be
used to achieve the testing objectives. For example:

"The testing approach for XYZ software will be risk-based, with an emphasis on testing
critical functionalities such as payroll calculations, tax deductions, and employee records.
Both manual and automated testing methods will be used to achieve comprehensive test
coverage."

3. Test Objectives: This section outlines the specific goals and objectives of the testing
effort. For example:

"The objectives of the testing effort include verifying that the software accurately
calculates payroll for various employee types, accurately calculates tax deductions based
on different tax rates, and securely stores employee records."

4. Testing Scope: This section defines the scope of the testing effort, including what will
be tested and what will not be tested. For example:

"The testing effort will focus on the functional requirements of the software, including user
interface, data validation, and report generation. Non-functional requirements such as
performance, security, and compatibility will also be tested. However, usability testing will
not be included in this phase of testing."

5. Test Deliverables: This section describes the documents and artifacts that will be
generated as part of the testing effort. For example:

"The test deliverables for this testing effort include test plan, test cases, test scripts, test
reports, and defect reports."

6. Test Environment: This section defines the hardware, software, and network
configurations required for testing. For example:

"The testing will be conducted in an environment that includes Windows 10 workstations,


AWS cloud services, and Microsoft SQL Server 2017 databases. The network infrastructure
will be tested for bandwidth, latency, and security vulnerabilities."

7. Test Schedule: This section outlines the timeline for the testing effort, including key
milestones and deliverables. For example:

"The testing effort is scheduled to begin on August 1, 2021 and end on September 30,
2021. Key milestones include completion of test plan by August 7, 2021, and completion of
functional testing by September 15, 2021.

You might also like