0% found this document useful (0 votes)
24 views41 pages

Chapter 7

This chapter discusses testing of web applications. It covers fundamentals of web testing, terminology, quality characteristics, test objectives and levels, specifics of testing in web engineering, and approaches and methods for testing.

Uploaded by

nuruddinalhilmi6
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)
24 views41 pages

Chapter 7

This chapter discusses testing of web applications. It covers fundamentals of web testing, terminology, quality characteristics, test objectives and levels, specifics of testing in web engineering, and approaches and methods for testing.

Uploaded by

nuruddinalhilmi6
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/ 41

ITT545:WEB ENGINEERING

CHAPTER 7: Testing Web Application

PREPARED BY: NOR AIMUNI MD RASHID/ UiTM CAWANGAN MELAKA KAMPUS JASIN
Chapter Outline
 Fundamentals of Web Testing
 Terminology of Web Site Testing
 Quality Characteristics
 Test Objectives and Levels
 Test Specifics in Web Engineering
 Test Approaches and Schemes
 Test Methods and Techniques
 Test Driven Development (TDD)
Chapter Objectives & Outcomes

 By the end of this chapter, student should be able to:


 Distinguish the use of different types of testing in web engineering process.
 Explain the characteristics of quality in developing a good web application.
 Describe testing methods, approaches and techniques.
7.1 FUNDAMENTALS OF WEB TESTING
Web testing is the process of executing the Web code
with the intent of finding faults.
an umbrella activity- Web site testing should be carried
out throughout the Web software development life
cycle (WSDLC):
Web requirements analysis phase, to Web design, Web
coding, Web testing till Web maintenance phase.
A Web tester can start from unit testing of the modules,
and then, go till system and acceptance level tests.
black-box testing - the non-functional parts of the
Web site like testing for GUIs, forms, links, etc.,
white-box testing - testing of the actual Web site or
Web application code.
Gray-box testing - may involve 80% of the black-box
testing and 20% of the white-box testing or 20% of the
black-box testing and 80% of the white-box testing
(80– 20 rule).
WEB TESTING CHALLENGES
 Increase in the number of Web users;
 Exponential rise in the number of Web pages;
 Complexity of navigational models even if case tools are used;
 Exponential number of paths to test in navigational model;
 Difference between the traditional software testing and the Web testing;
 Need to consider both static and dynamic Web applications;
 Compatibility issue among different Web browsers and different server
software;
 Technology explosion;
 Software complexity explosion;
 Path explosion;
 Number of Internet user’s explosion.
7.2 TERMINOLOGY OF WEB TESTING
 Web site testing: It is the process of executing the Web site or a
Web application with the intent of finding faults.
 Orphan pages: These are the Web pages, which are the part of
a Web site, but they cannot be accessed through hyperlinks, as
they are not hooked up.
 Web site: It is defined as a collection of interlinked Web pages.
 Web portal: It is a specially designed Web page, which
represents specific kind of information from diverse sources in a
unified way.
 Hyperlinks: They are the navigation mechanisms, which link the
user to some other content or object.
 Page: It is the smallest unit of a Web site.
 Web application: It is a software system based on specifications,
which provides Web-specific resources like contents and services
and is accompanied by a strong database.
 Error: It is the difference between a computed, observed or measured
value or condition and the true, specified or theoretically correct
value or condition. [IEE Std. 610.12-1990].
 Test case: It describes a set of inputs, execution conditions and
expected results, which are used to test a specific aspect of the
object under test [IEE Std. 610.12-1990].
 Test suite: A collection of many test cases forms a test suite.
 Refactoring: It is the process of redesigning a program while keeping
the semantics to reduce redundancies and increase the design
quality.
 Pair programming: It allows the mixing of ideas between developers
and testers and within a team. It helps in detecting errors early.
 Test-first development: In this, the tests are written first, and then, for
each of that specific test, the source code is written.
 Feature-driven development: It works on code reviews rather than pair
programming.
 Broken links: The links within a hypertext navigation structure, which point to
a non-existing node (pages, images, etc.) or anchor, are called broken
links.
 Browser testing: To discover errors in Web applications, which are caused
due to incompatibilities between different Web browsers is known as
browser testing.
 Test case tools: These are the automated tools that are used to test any
Web site or any Web application like Selenium.
 Thread-based testing: It integrates a set of contents or functional
components or Web pages, which are required to respond to one use
case or navigation pathway. Each thread is integrated and tested
individually.
 Cluster testing: It integrates a set of collaborating pages that are
determined by examining the use cases and navigation pathways. Test
cases are derived to uncover errors in the collaborations.
 Security testing: To locate the vulnerable points in a Web application,
security testing is performed.
 Vulnerable points: The points in the source code from where a hacker/
cracker may attack a Web site.
7.3 QUALITY CHARACTERISTICS
Quality involves delivering the specified
functionality under the specified conditions,
while reliability involves delivering the specified
functionality at a specified level of performance
over the duration of the product life, even with
slight deviations in the specified conditions.
4 QUALITY DIMENSIONS
 Specification quality: It refers to how well the specifications are defined for the
product or service being provided. All other activities succeed specifications.
So, if specifications are weak, design will be weak, which results in software
resting on a shaky condition
 Design quality: It refers to how well the product or service to be delivered is
designed. If the design is weak, then the software can fail at any time. Design
involves conceptual design and engineering design.
 Engineering design uses the selected approach and works out the details
to realize the solution. Conceptual design is the creative part of the
process and engineering is the details part.
 Engineering design refers to design of databases, specifications of
programs, screen designs, report designs. conceptual design refers to the
software architecture, navigation, number of layers.
4 QUALITY DIMENSIONS
 Development/ software construction quality: Software testing
takes more time than testing in traditional sense. Web site testing
is not exhaustive. Good-quality code is obtained by following
coding guidelines of the programming languages being used.
The aim is to write a reliable and defect-free code. Trained
software developers are a must. The code must be written from
the Software design document (SDD)
 Conformance quality: It determines the quality control of an
organization. To measure the efficiency of quality assurance
activities, some quality metrics must be there. One of the metrics
includes the defect removal efficiency of each quality control
activity, product quality and the defect density. Compare your
company’s quality with industry specified levels for quality.
7.4 TEST OBJECTIVES AND LEVELS
TESTING OBJECTIVES

To find the critical areas in the source code


from where Web failure starts.
Web site testing needs to be exhaustive and
extensive -should be to cover all paths in a
navigation graph.
should cover the maximum number of errors,
with minimum costs and minimum amount of
time.
TEST LEVELS
 Unit test level: the basic unit of any Web site or a Web application
is a Web page, or simply, a page. At this level of testing of Web
sites, we can test these smallest units, i.e., Web pages. It is done by
the Web developers during coding phase.
 Integration test level: Once these units have been tested, the
tester can integrate them and perform integration testing to
check whether these units (pages and classes) work properly or
not after integration. This type of testing is done by Web tester or a
Web developer or both.
TEST LEVELS
 System test level: Now, the tester can integrate these different
modules and test the entire system at one go. System testing
means testing of the entire system. It is done by a specialized test
team.
 Acceptance test level: The system or its prototype may be
provided to the customer so that he/ she can test the system using
real data and real conditions.
 Beta test: Beta tests are done by the Web users. They are informal
tests, i.e., without any test plan and test cases. Users are made to
work on the earlier versions of the software to test, and then, give
the feedback.
STATIC TESTING VS DYNAMIC TESTING

STATIC TESTING: it does not involve the execution of


code. It involves only the verification of the documents
that are produced as deliverables of these phases.

DYNAMIC TESTING: Test run on the web source code


ROLE OF A TESTER

unit tests are written by the Web developers. Testing is


the responsibility of a tester.
System analysts may do verification of Web analysis
document and Web design document (WDD).
Web coder can test the Web pages at unit levels.
During maintenance phase, Web regression testing
may be used.
7.5 TEST SPECIFICS IN WEB ENGINEERING
SPECIFIC WEB APPLICATION CHALLENGES
The need is to test the orphan pages, missing links
and irrelevant links.
Care has to be taken on the presentation level of
these Web applications.
Another challenge in designing and testing of Web
applications is that they work on different types of
technologies and languages at both the client-side
and the server-side. Different types of Web browsers
and Web servers also create a challenge that makes
the testing of Web applications difficult.
Specific Web Application Challenges
 variable lengths of the messages and that too in different
languages (Layout problems).
 Web developers use third party components like plug-ins. But
plug-ins may be insecure. They must also be tested before
putting them in the source code.
 Web user’s requirements are also very volatile, i.e., they keep
on changing dynamically. Adapting to newer changes is
difficult, as the existing functionality needs to be tested again
and again. So, regression testing is to be done.
7.6 TEST APPROACHES AND SCHEMES
TEST APPROACHES

The conventional approach focuses on


project planning and its management,
whereas the agile approach focuses on
collaboration.
CONVENTIONAL APPROACH
The conventional approach focuses on the final
deliverables (artifacts) like the quality plan, test plans,
test methods, test metrics, test conditions, and test
reports.
 The focus is also on the test personnel roles like test
manager, test consultant, test specialist and case
tool specialist.
It also focuses on the steps to get these deliverables.
CONVENTIONAL APPROACH
 The conventional approach involves activities like:
Planning: It involves the planning of testing strategy, test
plans, metrics and measures and the test conditions on
which the project will rely.
Preparing: The tester will select the case tools of Web site
testing and will specify the test cases and test suites.
Performing: The required test infrastructure is prepared, test
cases are run, and then, test documents are generated
and analyzed.
Reporting: Final test case summary in the form of test suites
and test reports is prepared.
AGILE APPROACH
 focuses on the quality of the Web applications under development,
and also, on the Web team that is involved in quality engineering.
 the entire team is responsible for thorough testing of Web sites, and
hence, maintaining its quality level.
 It does not stress on writing of test plans, but on direct communication
within the Web team.
 the Web developers themselves perform unit Web testing.
 This reduces testing time
 reduces the delay between the error introduction and its detection.
 A Web tester may prepare functional tests, which are at higher priority
than unit tests. This will even make test scripts tolerant. A tester may
assist the customer too while writing functional tests.
7.7 TEST METHODS AND TECHNIQUES
LINK TESTING
Hyperlinks, or simply, links are created using the
anchor tag of the HTML programming language.
Links help the Web user in traversing through the Web
site easily, but the point is to test the broken links.
Another aspect is the need to test the orphan pages,
i.e., the pages on the Web which are not at all linked
to other pages.
Errors may also be seen depending on the depth and
breadth of the navigation structure.
BROWSER TESTING

 Should covers:
Check for the back button that is usually found in every Web
site. Does it lead to the correct Web page?
Can a dynamically generated Web page be reused again?
Can the Web application be used to open in different
browsers?
USABILITY TESTING
 means how easy it is for the Web user to navigate through the
Web site, to adapt to it and learn its use.
 Formal usability test
A formal usability test is done in a laboratory to gather both
quantitative and qualitative data.
 Heuristic usability test
 It involves a GUI specialist, who applies a set of guidelines to
monitor the solution’s usability and to provide comments for the
change in the design. It should cover issues like error
prevention, feedback and consistency issues, etc.
Usability Testing
STRESS TESTING
 means executing the software under non-ideal conditions like lesser memory,
lesser disk space, slow CPUs, slow modems, etc.
 tests whether or not the system works properly during heavy stress like heavy
fluctuating loads. It should display a proper error message.
 Different issues that must be tested during stress testing are as follows:
 1. How will the server respond when its capacity is increased? Will it shut
down?
 2. Does the server form queues (FIFO type) of resource requests?
 3. Are all transactions lost if the capacity increases?
 4. Is there any effect on data integrity if the capacity increases?
 5. In case of system failure, how long does it take for the system to become
online again?
 6. Will Web application functions like huge computations, data streaming,
etc. be stopped if the server capacity is increased
LOAD TESTING
 an opposite of stress testing.
 In stress testing, the tester starves the software, while during load
testing, the tester feeds it all that it can handle.
 A Web tester can operate the software with the largest possible
data files.
 Check as many peripherals like printers, communication ports as
you want and test. Even Internet server can also be tested using
this method by subjecting it to thousands of simultaneous
connections.
 The objective of load testing is to find out how these Web
applications and their servers will respond to different loading
conditions.
CONTINUOUS TESTING
the process of testing a Web application for a longer
period of time to locate errors, which are deeply
ramified in the Web site code.
For example, memory leaks, not released database
connections, etc.
This happens when the resources allocated are not
released properly after the task is complete. It is this
type of continuous testing only, which can ensure that
the operation is executed repeatedly over longer
periods of time.
FUNCTIONAL TESTING
 Evaluation of programs based on functional requirements to
ensure the program works as it was specified to do.
 Functional Testing primarily focuses on ensuring that the solution
components work as designed, and that the design sufficiently
meets the business requirements.
 Functional Testing will often involve some manual steps and
stubbing of components as not all processes will be tightly linked
together.
 Functional Testing is often the most complex area of Testing as it
involves staggering the test cycle inline with development as it
occurs. Typically, it is also where there highest degree of changes
occur during the testing process.
 A functional test case validates the solution as defined by the
requirements specification or detailed technical specification of
the component.
FUNCTIONAL TESTING
7.8: TEST-DRIVEN DEVELOPMENT
TEST-DRIVEN DEVELOPMENT = TFA + REFACTORING
 Test-first approach (TFA) means that we write a test case first, and then,
write the code as per (to satisfy) that test case. It also involves some
amount of refactoring.
 Refactoring is defined as the process of making small changes in the
source code to improve it.
 This approach promises a better testing as the code is written as per the
test case requirements.
 It uses unit testing to test the modules so developed for every test case.
 Advantages of TDD is summed up a follows:
 1. Quickly add a test case.
 2. Run all tests and see the new one fails.
 3. Make a little change.
 4. Run all tests and see them all succeed.
 5. Refactor to remove duplication.

You might also like