SDM Unit 5 12m
SDM Unit 5 12m
Error, fault, and failure are terms associated with software development and testing:
Here's a table outlining some differences between bug, defect, error, fault, and failure:
| Term | Meaning |
| ------- | ---------------------------------------------------------------|
While these terms are often used interchangeably, it's essential to understand their
specific meaning to communicate effectively during software development and testing.
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.
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.
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:
Inputs: a = 5, b = 10
Expected Output: 15
Expected Output: -5
Inputs: a = -5, b = 10
Expected Output: 5
Inputs: a = 5, b = 0
Expected Output: 5
Inputs: a = -5, b = 0
Expected Output: -5
Inputs: a = 5, b = 5
Expected Output: 10
10. Test Case 10: Adding a positive integer to a larger negative integer
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
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:
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
- Phone number
- Address
4. Table:
- Contains columns for Name, Student ID, Email, Phone number, and Address
Test Cases:
1. Add Student
2. Remove Student
3. Search Student
4. Invalid Input
- Verify that an error message appears, indicating that all fields are required
6. Sorting
- Verify that the table is sorted in alphabetical order according to the names
7. Menu Bar
- Verify that the following options are displayed: New, Open, Save, Save As, Exit
8. Help Button
- Verify that a help page or dialogue box is displayed with relevant information about the
system.
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.
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.
- 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.
- 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.
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.
- 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.
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:
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.