SOFTWARE TESTING
CMC Limited
Objectives
After completion of this chapter you will be able to:
• Explain what is Software Testing
• Understand the Software Testing objectives
• Understand the test plan
• Define white box & Black box testing
• Explain different test levels
• Explain the concepts of test cases suites,
scripts& scenarios
• Define and explain the testing cycle
CMC Limited
• Software Testing is the process used to help to identify the
correctness, completeness, security, and quality of
developed computer software.
• Testing is a process of technical investigation, performed
on behalf of stakeholders, that is intended to reveal quality-
related information about the product.
• Testing can never completely correct all the time.So it will
be continued.
• Software testing should be distinguished from the discipline
of Software Quality Assurance (SQA), which encompasses
all business process areas, not just testing.
Introduction
CMC Limited
• In SQA, software process specialists and
auditors take a broader view on software and its
development.
• They examine and change the software
engineering process itself to reduce the amount
of faults that end up in the code or deliver faster.
Introduction contd..
CMC Limited
Testing objectives
Introduction contd..
• Testing is a process of executing a program with
the intent of finding an error.
• A good test case is one that has a high
probability of finding an as yet undiscovered
error.
• A successful test is one that uncovers an as yet
undiscovered error.
• Testing demonstrates that the software appears
to be working as stated in the specifications.
• It cannot show the absence of defect , it can only
show that software defects are present.
CMC Limited
Roles in software testing
Introduction contd..
• Software testing is a process which is done by
software testers.
• Until the 1950s the term software tester was
used generally, but later it was also seen as a
separate profession.
• It has been established different roles:
• Test lead
• Tester
• Test designer
• Test automator
• Test administrator
CMC Limited
Roles in software testing
Introduction contd..
• Participants of testing team
• Tester
• Developer
• Customer
• Information Service Management He is the
person who collects information from the
customer
• Senior Organization Management
• Quality team
CMC Limited
When Testing should start
Introduction contd..
• In the early stage of testing life cycle it reduces the errors.
• The goal of Software Tester is to find bugs, find them as
early as possible, and make them sure they are fixed.
• The number one cause of Software bugs is the
Specification.
• The next largest source of bugs is the Design, that’s where
the programmers lay the plan for their Software.
• Coding errors is another familiar error in software testing .
• Typically these can be traced to the Software complexity,
poor documentation, schedule pressure or just plain dump
mistakes.
CMC Limited
When to Stop Testing
Introduction contd..
• It is difficult to determine.
• There are common factors in deciding when to stop
testing:
• Deadlines (release deadlines, testing deadlines.)
• Test cases completed with certain percentages
passed
• Test budget depleted
• Coverage of code/functionality/requirements reaches
a specified point
• The rate at which Bugs can be found is too small
• Beta or Alpha Testing period ends
• The risk in the project is under acceptable limit
CMC Limited
Test Plan
• The test strategy identifies multiple test levels,
which are going to be performed for the project.
• Activities at each level must be planned well in
advance and it has to be formally documented.
• Based on the individual plans only, the individual
test levels are carried out.
CMC Limited
Test plan contd..
• A sample Test Plan Outline is shown below:
•Testing tasks
•Environmental needs
•Responsibilities
•Staffing & Training
•Schedule
•Resources
•Risks & Contingencies
•Approvals
•Background
•Introduction
•Assumptions
•Test Items
•Features to be tested
•Features not to be tested
•Approach
•Item pass/fail criteria
•Suspension/Resumption criteria
•Test deliverables
CMC Limited
White box & black-box testing
• White box and black box testing are terms used to
describe the point of view a test engineer takes when
designing test cases.
• Black box being an external view of the test object
• white box being an internal view.
• White box testing uses an internal perspective of the
system to design test cases based on internal structure.
• White box requires programming skills to identify all paths
through the software.
• Black box testing takes an external perspective of the test
object to derive test cases.
• The test designer selects valid and invalid input and
determines the correct output. There is no knowledge of
the test object's internal structure.
CMC Limited
Test levels
• There are four level :
• Unit testing
• Integration testing
• System testing
• Acceptance testing
CMC Limited
• Unit testing is a procedure used to validate that
individual units of source code are working properly.
• Unit is the smallest testable part of an application
• In procedural programming a unit may be an individual
program, function, procedure, web page, menu etc,
while in object-oriented programming, the smallest unit
is always a Class; which may be a base/super class,
abstract class or derived/child class.
Test levels contd..
CMC Limited
The test levels contd..
• Integration testing exposes defects in the
interfaces and interaction between integrated
components (modules).
• Integration testing is the phase of software
testing in which individual software modules are
combined and tested as a group.
• It follows unit testing and precedes system
testing.
CMC Limited
The test levels contd..
• System testing tests an integrated system to
verify/validate that it meets its requirements.
• System testing is testing conducted on a
complete, integrated system to evaluate the
system's compliance with its specified
requirements.
• System testing falls within the scope of black
box testing, and as such, should require no
knowledge of the inner design of the code or
logic.
CMC Limited
• Acceptance testing can be conducted by the client. It
allows the end-user or customer or client to decide
whether or not to accept the product.
• In engineering and its various sub disciplines,
acceptance testing is performed
• Acceptance testing can be divide in two parts :
• Alpha testing
• Beta testing
The test levels contd..
CMC Limited
Test cases, suites, scripts and
scenarios
• In software engineering, the most common
definition of a test case is a set of conditions or
variables under which a tester will determine if a
requirement or use case upon an application is
partially or fully satisfied.
CMC Limited
Structure of test case
• Test cases consist three main parts :
•Results
•Expected results
•Actual result
•Activity
•Testing environment/configuration
•Initialization
•Finalization
•Actions
•Input data description
•Information
•Identifier
•Test case
owner
•Name
•Identifier of
requirement
•Purpose
•Dependencies
CMC Limited
Test cases, suites, scripts and
scenarios contd..
• Test Script
• A test script is a short program written in a
programming language used to test part of the
functionality of a software system.
• Test Suite
• The most common term for a collection of test
cases is a test suite.
• Scenario
• Scenario testing is a software testing activity. It uses
scenario tests, or simply scenarios, which are based
on a hypothetical story to help a person think
through a complex problem or system.
CMC Limited
Testing cycle
• Software testing is maintain through a chain of cycle
The stages of cycle are as follows:
• Requirements Analysis:
• Design phase,
• Test Planning
• Test Development:
• Test Execution
• Test Reporting
• Retesting the Defects

Software Testing

  • 1.
  • 2.
    CMC Limited Objectives After completionof this chapter you will be able to: • Explain what is Software Testing • Understand the Software Testing objectives • Understand the test plan • Define white box & Black box testing • Explain different test levels • Explain the concepts of test cases suites, scripts& scenarios • Define and explain the testing cycle
  • 3.
    CMC Limited • SoftwareTesting is the process used to help to identify the correctness, completeness, security, and quality of developed computer software. • Testing is a process of technical investigation, performed on behalf of stakeholders, that is intended to reveal quality- related information about the product. • Testing can never completely correct all the time.So it will be continued. • Software testing should be distinguished from the discipline of Software Quality Assurance (SQA), which encompasses all business process areas, not just testing. Introduction
  • 4.
    CMC Limited • InSQA, software process specialists and auditors take a broader view on software and its development. • They examine and change the software engineering process itself to reduce the amount of faults that end up in the code or deliver faster. Introduction contd..
  • 5.
    CMC Limited Testing objectives Introductioncontd.. • Testing is a process of executing a program with the intent of finding an error. • A good test case is one that has a high probability of finding an as yet undiscovered error. • A successful test is one that uncovers an as yet undiscovered error. • Testing demonstrates that the software appears to be working as stated in the specifications. • It cannot show the absence of defect , it can only show that software defects are present.
  • 6.
    CMC Limited Roles insoftware testing Introduction contd.. • Software testing is a process which is done by software testers. • Until the 1950s the term software tester was used generally, but later it was also seen as a separate profession. • It has been established different roles: • Test lead • Tester • Test designer • Test automator • Test administrator
  • 7.
    CMC Limited Roles insoftware testing Introduction contd.. • Participants of testing team • Tester • Developer • Customer • Information Service Management He is the person who collects information from the customer • Senior Organization Management • Quality team
  • 8.
    CMC Limited When Testingshould start Introduction contd.. • In the early stage of testing life cycle it reduces the errors. • The goal of Software Tester is to find bugs, find them as early as possible, and make them sure they are fixed. • The number one cause of Software bugs is the Specification. • The next largest source of bugs is the Design, that’s where the programmers lay the plan for their Software. • Coding errors is another familiar error in software testing . • Typically these can be traced to the Software complexity, poor documentation, schedule pressure or just plain dump mistakes.
  • 9.
    CMC Limited When toStop Testing Introduction contd.. • It is difficult to determine. • There are common factors in deciding when to stop testing: • Deadlines (release deadlines, testing deadlines.) • Test cases completed with certain percentages passed • Test budget depleted • Coverage of code/functionality/requirements reaches a specified point • The rate at which Bugs can be found is too small • Beta or Alpha Testing period ends • The risk in the project is under acceptable limit
  • 10.
    CMC Limited Test Plan •The test strategy identifies multiple test levels, which are going to be performed for the project. • Activities at each level must be planned well in advance and it has to be formally documented. • Based on the individual plans only, the individual test levels are carried out.
  • 11.
    CMC Limited Test plancontd.. • A sample Test Plan Outline is shown below: •Testing tasks •Environmental needs •Responsibilities •Staffing & Training •Schedule •Resources •Risks & Contingencies •Approvals •Background •Introduction •Assumptions •Test Items •Features to be tested •Features not to be tested •Approach •Item pass/fail criteria •Suspension/Resumption criteria •Test deliverables
  • 12.
    CMC Limited White box& black-box testing • White box and black box testing are terms used to describe the point of view a test engineer takes when designing test cases. • Black box being an external view of the test object • white box being an internal view. • White box testing uses an internal perspective of the system to design test cases based on internal structure. • White box requires programming skills to identify all paths through the software. • Black box testing takes an external perspective of the test object to derive test cases. • The test designer selects valid and invalid input and determines the correct output. There is no knowledge of the test object's internal structure.
  • 13.
    CMC Limited Test levels •There are four level : • Unit testing • Integration testing • System testing • Acceptance testing
  • 14.
    CMC Limited • Unittesting is a procedure used to validate that individual units of source code are working properly. • Unit is the smallest testable part of an application • In procedural programming a unit may be an individual program, function, procedure, web page, menu etc, while in object-oriented programming, the smallest unit is always a Class; which may be a base/super class, abstract class or derived/child class. Test levels contd..
  • 15.
    CMC Limited The testlevels contd.. • Integration testing exposes defects in the interfaces and interaction between integrated components (modules). • Integration testing is the phase of software testing in which individual software modules are combined and tested as a group. • It follows unit testing and precedes system testing.
  • 16.
    CMC Limited The testlevels contd.. • System testing tests an integrated system to verify/validate that it meets its requirements. • System testing is testing conducted on a complete, integrated system to evaluate the system's compliance with its specified requirements. • System testing falls within the scope of black box testing, and as such, should require no knowledge of the inner design of the code or logic.
  • 17.
    CMC Limited • Acceptancetesting can be conducted by the client. It allows the end-user or customer or client to decide whether or not to accept the product. • In engineering and its various sub disciplines, acceptance testing is performed • Acceptance testing can be divide in two parts : • Alpha testing • Beta testing The test levels contd..
  • 18.
    CMC Limited Test cases,suites, scripts and scenarios • In software engineering, the most common definition of a test case is a set of conditions or variables under which a tester will determine if a requirement or use case upon an application is partially or fully satisfied.
  • 19.
    CMC Limited Structure oftest case • Test cases consist three main parts : •Results •Expected results •Actual result •Activity •Testing environment/configuration •Initialization •Finalization •Actions •Input data description •Information •Identifier •Test case owner •Name •Identifier of requirement •Purpose •Dependencies
  • 20.
    CMC Limited Test cases,suites, scripts and scenarios contd.. • Test Script • A test script is a short program written in a programming language used to test part of the functionality of a software system. • Test Suite • The most common term for a collection of test cases is a test suite. • Scenario • Scenario testing is a software testing activity. It uses scenario tests, or simply scenarios, which are based on a hypothetical story to help a person think through a complex problem or system.
  • 21.
    CMC Limited Testing cycle •Software testing is maintain through a chain of cycle The stages of cycle are as follows: • Requirements Analysis: • Design phase, • Test Planning • Test Development: • Test Execution • Test Reporting • Retesting the Defects

Editor's Notes

  • #10 using <asp:Image>, <asp:Label>, <asp:DropDownList> Server Controls.
  • #12 For this page we mimic the previously created page (slide 7) using <asp:Image>, <asp:Label>, <asp:DropDownList> Server Controls.
  • #18 Alpha testing is simulated or actual operational testing by potential users/customers or an independent test team at the developers' site. Beta testing comes after alpha testing. Versions of the software, known as beta versions, are released to a limited audience outside of the company.
  • #21 Notice that in above fig. there an abstract class called BaseDataList groups DataGrid and DataList. Another abstract class, ListControl, encompasses CheckBoxList, RadioButtonList, DropDownList, and ListBox. A third abstract class called BaseValidator contains all validation controls. Within the whole set of HTML and Web controls there are four different logically related groups of controls: HTML intrinsic controls, rich controls, validation, and bound list controls. HTML controls represent the bridge between ASP and ASP.NET. Normally, plain HTML code is not programmatically accessible while the page source code is being processed on the server. The only exception to this is when a control is explicitly marked as runat=server. When this happens, the HTML element is initialized through the corresponding HTML control, as shown in above Figure . This is a good way to ease the porting of existing code from ASP to ASP.NET.