proposed in various studies (M. H. Alalfi, 2009) for
modeling web applications. The authors in (Conallen,
1999)(Ricca and Tonella, 2001) have proposed UML
class diagram and the authors in (M. Han, 2006) have
proposed statechart for modeling web navigation. A
methodology for generation of concrete executable
tests from abstract test cases using a test automation
language, the Structured Test Automation Language
(STAL) was proposed in (N. Li, 2013). The authors in
(N. Li, 2013) have proposed a mapping between iden-
tifiable elements in the model to JUnit executable java
code. The author in (Torsel, 2013 ) have presented an
approach using domain specific languages to model
the navigation aspect of the web application and have
used a UI mapping XML file to generate concrete
test cases for Selenium and Canoo web test tools.
(A.A. Andrews, 2005) used finite state machines for
web application testing. In (A. Marcetto and Ricca,
2008), an approach that utilizes recorded user inter-
action data to construct a state machine model espe-
cially for testing AJAX functionality is presented. In-
put data is provided from the collected requests and
test oracles have to be created manually. The gen-
erated test sequences are translated into the test case
format of the Selenium test automation tool. The au-
thors in (H. S. Hong and Sokolsky, 2001) have used
model checking to generate test cases for control flow
and data flow coverage criteria. (Harel, 1987)
3 SYSTEM ARCHITECTURE
Figure 1 gives an overview of the approach that the
ACT (Abstract to Concrete test) tool uses for gener-
ating concrete Selenium RC JUnit test cases from the
formal State chart web navigation model. The nav-
igation behaviour of our case study web application
is modeled using the formal specification language
’State chart’. The front end which generates test paths
from the State chart model can be a test path generat-
ing algorithm like model checking or graph coverage
algorithm. Abstract test cases are generated from the
test paths with the help of the State chart specification.
Then the abstract test cases generated are converted to
Figure 1: Proposed Test Generation Method used by our
ACT tool.
Selenium RC JUnit concrete test cases using the Map-
pings XML file. Each of these steps are explained in
elaborate details in the remaining sections.
4 MODELLING WEB
NAVIGATION USING STATE
CHARTS
From among the various finite state based formal
specification languages, we have used Statecharts
(Harel, 1987) for modeling the navigation behaviour
of web applications.
Figure 2 shows the State chart specification of our
case study, the Learning Management System (LMS)
used within our institute. In the Statechart specifica-
tion shown in Figure 2, Inactive state denotes that the
web application has not yet started operating. The
composite state Active denotes that the web applica-
tion is in an operating state. Inside Active state, each
web page was modelled as a separate state. When the
user navigates from one webpage to another, there is
a transition between the corresponding states. LMS
Login Page denotes the Login page of Learning Man-
agement System. Here we have used the mathemat-
ical notations of sets and first order predicate logic
constructs in guards and actions of the transitions in
State chart model.
In a web application, the value which is entered
by the user in one interaction of the web application
with the web server is often used back in another in-
teraction of the web application with the web server.
For example, as shown in the State chart model of
Figure 2, admin can register a student in the LMS
System by entering values in the username and pass-
word input fields in the Add Student User Page. A
necessary requirement for a student to login in the
LMS Login Page is that the student must be regis-
tered beforehand and so must have a valid student
username and password. Thus there is a data flow
between Add Student User Page page and LMS Lo-
gin Page. The variables valid_student_usernames and
valid_student_passwords are defined in the transition
from state Add Student User Page to Successfully Stu-
dent Added Page and are used in the transition from
state LMS Login Page to My Courses web page.
The variables valid_student_usernames,
valid_student_passwords, valid_teacher_usernames
and valid_teacher_passwords are shared between
different interactions of the web application with the
web server and across different users using the web
application. When the web application has started
operating, these variables are initialized to the null
End to End Specification based Test Generation of Web Applications
297