Professional Documents
Culture Documents
Testing: E-Commerce Application Testing
Testing: E-Commerce Application Testing
Chapter 7
TESTING
Computer Department 64
E-Commerce Application Testing
Testing is the process carried out on software to detect the differences between its
behavior and the desired behavior as stipulated by the requirements specifications.
Testing is advantageous in several ways. Firstly, the defects found help in the
process of making the software reliable. Secondly, even if the defects found are not
corrected, testing gives an idea as to how reliable the software is. Thirdly, over time, the
record of defects found reveals the most common kinds of defects, which can be used for
developing appropriate preventive measures such as training, proper design and
reviewing.
The development process repeats this testing sub-process a number of times for
the following phases.
Unit Testing.
Integration Testing
System Testing.
Acceptance Testing.
Unit Testing tests a unit of code (module or program) after coding of that unit is
completed. Integration Testing tests whether the various programs that make up a system,
interface with each other as desired, fit together and whether the interfaces between the
programs are correct. System Testing ensures that the system meets its stated design
specifications. Acceptance Testing is testing by the users to ascertain whether the system
developed is a correct implementation of the Software Requirements Specification.
Testing is carried out in such a hierarchical manner to ensure that each component
is correct and the assembly/combination of components is correct. Merely testing a
Computer Department 65
E-Commerce Application Testing
whole system at the end would most likely throw up errors in components that would be
very costly to trace and fix.
In black box testing a software item is viewed as a black box, without knowledge
of its internal structure or behavior. Possible input conditions, based on the specifications
(and possible sequences of input conditions), are presented as test cases.
The disadvantages are that exhaustive path testing is infeasible and the logic
might not conform to specification. Instrumentation techniques can be used to determine
the structural system coverage in white box testing. For this purpose tools or compilers
that can insert test probes into the programs can be used.
The way to make sure that you have got all the control flow covered is to cover all
the paths in the program during the testing (via white-box testing). This implies that both
branches are exercised for and if’ statement, all branches are exercised for a case
statement, the loop is taken once or multiple times as well as ignored for a while
statement, and all components of complicated logical expressions are exercised. This is
called Path Testing. Branch Testing reports whether entire Boolean expression tested in
control structures evaluated to both true and false.
Computer Department 66
E-Commerce Application Testing
While deciding on the focus of testing activities, study project priorities. For example,
for an on-line system, pay more attention to response time. Spend more time on the
features used frequently.
Decide on the effort required for testing based on the usage of the system. If the
system is to be used by a large number of users, evaluate the impact on users due to a
system failure before deciding on the effort.
Write test cases for invalid and unexpected as well as valid and expected input
conditions.
We have performed both Unit Testing and System Testing on WIMS to detect and
fix errors. A brief description of both is given below.
Unit Testing
Objective
The objective of Unit Testing is to test a unit of code (program or set of programs) using
the Unit Test Specifications, after coding is completed. Since the testing will depend on
the completeness and correctness of test specifications, it is important to subject these to
quality and verification reviews.
Input
Code to be tested.
Testing Process
• Checking for availability of Code Walk-thru reports which have documented the
existence of and conformance to coding standards.
- Verify that all boundary and null data conditions are included.
Techniques
Computer Department 67
E-Commerce Application Testing
Test Walk-through
Two strategies are defined for testing modules by actual execution: the top down
approach and the bottom-up approach.
In the top-down approach, the main routine is tested first, with the subroutines
being substituted by dummy or null routines called stubs. As testing progresses, the stubs
are replaced by real routines that in turn may call further stubs representing lower-level
modules in the module hierarchy. In the figure below, main program A is tested with stubs
for B and C; then B is tested with stubs for D, E and F, and, C is tested with stub for G,
etc.
In the bottom-up approach, testing starts at the lowermost level and then proceeds
to higher-level programs or modules. The testing team directly calls the module to be
tested, which may call other pre-tested modules. In the figure above, D is tested with a
dummy driver for B. The same is done for E and F. Then B is tested with a dummy driver
for A.
The bottom-up approach does not allow you to have complete control over the test data.
Integration Test
Computer Department 68
E-Commerce Application Testing
After completion of our module along with testing, modular coding strategy was
used. After integrating the module with the complete application, time was given to our
team to test their part of module completely and thoroughly.
As the whole application is divided into several modules, there were a lot of
variable names and function names, which were common to all the modules. There
existed a lot of session variables, which we had to incorporate into our module, but as
different modules were being developed simultaneously we had to hard code things in
place of the session variables in our module. So at the time of integration a lot of hard
coded things had to be removed and session variables were replaced.
Computer Department 69
E-Commerce Application Testing
Computer Department 70
E-Commerce Application Testing
of Particular
Category.
14. On Update The Category should be Same as First you
Categories Page updated. expected. need to
Click on Update change data
link of Particular in the fields
Category. of category.
15. On Update Products The Product as per the Same as
Page select the parameter given by expected.
Category from drop- administrator should be
down list and Enter displayed.
full product name
and then click on
Search button.
16. On Update Products The Product Selected Same as
Page Click on should be deleted expected.
Delete link of successfully.
Particular Product.
17. On Update Products Two links Update and Same as
Page Click on Edit Cancel appears. TextBoxes expected.
link of Particular will replace the Labels.
Product.
18. On Update Products The Editing of Product will Same as
Page Click on be Canceled. expected.
Cancel link of
Particular Product.
19. On Update Products The Product should be Same as First you
Page Click on updated. expected. need to
Update link of change data
Particular Product. in the fields
of Product.
20. On Featured The Product Ids of the Same as
Product Master selected Category should be expected.
Page select the displayed in drop-down list.
Category from drop-
down list.
21. On Featured The Product with its Image Same as First you
Product Master and Name should be expected. have to
Page select the displayed. apply case
Product Id from no 20
drop-down list.
22. On Featured The message-displaying Same as First you
Product Master Featured Updated expected. have to
Page select the Successfully should be apply case
position on which displayed and the images of no 20 & 21.
the Product’s Image selected product should be
Computer Department 71
E-Commerce Application Testing
Computer Department 72
E-Commerce Application Testing
be displayed.
5. On Home Page click The Sign In Page of user Same as
on Existing User side should be displayed. expected.
Sign In link.
6. On Sign In Page The Sign Up Page for Same as
click on Sign Up Registration should be expected.
Now! Link. displayed.
7. On Sign In Page The Forgot Password page Same as
click on Forgot should be displayed. expected.
Password Click
Here.
8. Enter Incorrect The message-displaying Same as
username and Incorrect Username and expected.
password. Password should be
displayed.
9. Enter Correct The My Account Page Same as
username and should be displayed. expected.
password.
10. On Sign Up Page The pop-up window should Same as
enter username and be displayed telling whether expected.
then click Check username is available or
Availability button. not?
11. On Forgot Password The question should be Same as
Page enter username displayed. expected.
and click Submit
button.
12. On Forgot Password The message displaying the Same as You have to
Page answer the password sent to your expected. apply case
question and click emails address should be no 11 first.
on Submit button. displayed.
13. On Change The message displaying the Same as
Password Page enter Incorrect current password expected.
Incorrect current should be displayed.
Password, new
password and
confirm password.
14. On Change The message displaying the Same as
Password Page enter Password changed expected.
Correct current successfully should be
Password, new displayed.
password and
confirm password.
15. On Favourite Search All the result of that Same as
Page select the selected saved search expected.
name of Search that should be displayed.
you have saved.
Computer Department 73
E-Commerce Application Testing
Computer Department 74
E-Commerce Application Testing
Computer Department 75