You are on page 1of 4

Diptimayee Rana et al, International Journal of Research in ISSN (Online) 2278- 5841

computer and communication Technology , Vol 6, Issue- 8, August - 2017


ISSN (Print) 2320- 5156

Test Case Generation of Library Management


System Using Model Based Testing

Diptimayee Rana1*, Sarada Baboo2


#1.Student, Department of Computer Science and Applications, Sambalpur University, Sambalpur (768019);
ranadipti26@gmail.com
#2. Reader, Department of Computer Science and Applications, Sambalpur University, Sambalpur
(768019);baboosarada@gmail.com

Abstract—Software testing is a process that is used to library of local university is done online. Much of the
verify and validate the software product for ensuring functioning of a library could be automated using the
whether it satisfies the customer requirements or not. available technology [4]. Library Management System
Basically testing contains three types of approaches provides login facility to the users. This system would
like code based testing, model based testing and be used by members who may be students or
specification based testing. In this paper concentration professors of that university to check the availability
is made on model based approach. In model based of the books and borrow the books, and the librarian to
testing approach the testing tasks such as test case update the data base [5].The main objective of this
generation and test result evaluation of a model is paper is to find out the minimum test cases for Library
done.Model based testing as the automatable Management System (LMS).This case study will be
derivation of concrete test cases from abstract formal carried out by using free and open source tools,
models and their execution, where test suits are MISTA and Selenium, to generate suitable test cases
derived automatically from test model. In this research for the Library Management System model under test
work MISTA and Selenium (tools) are used for model and it also describes the system requirements for test
based testing. MISTA is used to create the UML generator.
diagram for different test flows and to generate
function calls to be executed by Selenium tool in the II. LITERATURE REVIEW
browser. Selenium adds assertion and check point to The Literature Survey represents an overall concept of
test visually. Here Eclipse (Integrated Development GUI based testing among which the model based
Environment (IDE)), is utilized for creating java testing is one of them and various existing test case
application and it additionally contains extensible generation methodology are elaborated. From the
module framework for modifying nature. literature review it is found that there are lots of tools
available for model based testing. In this paper, two
IndexTerms—Model Based testing, UML Diagram, open source tools, MISTA and Selenium, are chosen
Model Based Testing Tools, Test Cases. which are plug-in with Eclipse IDE to find out the
minimum test cases for a given case study of Library
INTRODUCTION Management System.
III. EXPERIMENTAL DESIGNS
In straightforward words testing is execution of a
framework with a specific end goal to find any The main purpose of Library Management System is
blunders, holes or missing prerequisites in as opposed to provide books to the authorized member of library.
to the genuine necessities and want yield [1].There are This Library Management System provides different
diverse sorts of testing systems actualized amid type of facilities to the students as well as faculty
programming improvement. Demonstrate based testing member. The purpose of the application is automation
is one among them. A model of software is a depiction of library, it provide facilities to student or member to
of its behavior, where behavior can be described in search for the required books and allows the
terms of input sequences accepted by the system, the administrator or librarian to Issue & return books to
set of actions, conditions, the flow of data through the student and can create & delete membership of
application’s modules and routines [2].Model based students [6].The Library Management System has five
testing is a testing technique for automated generation basic modules: - User Login, Register User, Issue
and execution of test cases based on formal models of Book, Search book, return Book.
system under test (SUT) [3]. It is a technique applied
for many software products and has proved to help in IV. ALGORITHM FOR TESTING LIBRARY
increasing the quality while reducing overall cost of MANAGEMENT SYSTEM
the software systems.Now a days borrowing book, Step1: Start
returning books or viewing the available books at

©www.ijrcct.org | * Corresponding Author 272


Diptimayee Rana et al, International Journal of Research in ISSN (Online) 2278- 5841
computer and communication Technology , Vol 6, Issue- 8, August - 2017
ISSN (Print) 2320- 5156

Step2: Navigate to Home Page Screen that displays


links to Login, User Registration, Search
Book, issue Book and Return Book page.
Step3: Go to Login Page and provide user name and
password.
Check if the username field accepts
valid username and password field
accepts valid password.
Step4: From Login Page, Navigate to any of User
Registration, Search Book, Issue Book and
Return Book page.
Step5: If Navigating to User Registration Page,
 Check if the User
Registration function
allows registration as per
Name, user name,
password, and other details Fig 1: Java Code for Test case Implementation by using Eclipse
or all of the criteria.
VI. RESULT: TEST AUTOMATION BY USING SELENIUM
If Navigating to Search Book Page,
 Check if the search function Selenium, an open source automation testing tool,
allows searching of books offers an Integrated Development Environment (IDE)
as per title, ISBN, author, plug-in that unifies the tool with desirable Web
genre or all of the criteria. browser-based test features and using Selenium IDE
If Navigating to Issue Book Page, provides easy-to-use record and play back features,
 Check if the issue function giving even those with no programming expertise, the
allows issuing of books as capability to create simple scripts [8].Selenium IDE is
per title, ISBN, author, a prototyping tool for building test scripts and It
genre or all of the criteria. support Firefox plug-in and provides an easy-to-use
If Navigating to Return Book Page, interface for developing automated tests.
 Check if the return function
allows returning of books
as per title, ISBN, author,
issue data, or all of the
criteria.
Step 6: Go to Home page using ‘Home’ link from
any page displayed.
Step 7: Exits
V. TEST CASE IMPLEMENTATION BY USING
ECLIPSE

Eclipse is an Integrated Development Environment


(IDE), which contain the java development tools for
developing java application. Eclipse is written mostly Fig 2:- Home Page of Library Management System
in java programming language. Eclipse contains a base
workspace and extensible plug-in system for
customizing the environment [7]. Eclipse provides VII. TEST CODE GENERATED BY MISTA
different perspectives like for java development it use
java perspective. The javadoc view shows the MISTA provides test generation for comprehensive
documentation of all the important elements in the coverage criteria of test models, including state
java editor. The java source file is opened in a separate coverage, transition coverage, depth coverage and goal
editor and java editor is used to modify the java source coverage... etc [9]. In MISTA, the test models can be
code. The Test Case implementation of Library animated and verified and it generates executable test
management System is done by using java code, in code for a test model in Java. [10].By using MISTA
Eclipse (IDE). tool, sequence diagram is created for Library
Management System (LMS) and according to the
diagram the test case is generated.

©www.ijrcct.org | * Corresponding Author 273


Diptimayee Rana et al, International Journal of Research in ISSN (Online) 2278- 5841
computer and communication Technology , Vol 6, Issue- 8, August - 2017
ISSN (Print) 2320- 5156

 Test case execution – Based on the UML


diagram different test cases are generated
with naming convention as Test1, Test2
...TestN.
Each of the test cases makes a call to
execute the test case followed by validation
routine. All the validation routines are
designed as assert so that framework
makes sure that it always returns true;
otherwise it fails the test case.

VIII. CONCLUSION

Model based technologies develop the high level


models which refer to derive a suite of test cases from
a model and it represents the behavior of a software
system. The thought of UML- Model based testing for
utilizing event commitment to express abstract model
of System under Test (SUT) and its environment. One
trend present today and it will surely be present in the
future for improving of the automatically code
generation. So model based development can have
Fig 3:- Snapshot of Sequence Diagram for Library ability to conquer high complexity systems with more
Management System by using MISTA Tool modeling and less coding.From the experimental view,
it is found that the test cases generated by MISTA
tools for Library Management System are based on the
flow of UML diagram and finally the Selenium
(Automation Tool) execute the test cases by using web
browser. These days the MBT tools have great scope
in the field of Industrial Automation, Factory
Automation, Content & Configuration Management
System, College Management and Library
Management System.Model based testing has no
privilege to check possibility of bugs in the generated
test scripts which may be difficult to trace at the time
execution. Generating a model by getting contextual
knowledge and built in fault models into model based
testing tools can be considered as the new area of
research in model based testing and there are still lots
of unknown territory to discover.

REFERENCES

[1] Karambir, KuldeepKaur, “Survey of Software Test


Fig 4: - Test Code Generated by MISTA tool case Generation Techniques”, International
Journal of Advanced Research in computer science
and software Engineering, volume 3, Issue 6, June
2013.
Code generated by MISTA tool strictly follows the [2] V. Mary Sumalatha and Dr. G. S. V. P. Raju, “An
UML diagram designed by the Test Engineer. Model Based Test Case Generation Technique
The main functionality of the code generator is as Using Genetic Algorithms”, The International
follows. Journal of Computer Science and Application,
 Initialize the test code – Any classes required Vol.1, No.9, ISSN- 2278-1080, November 2012.
for the test execution are initialized in this [3]KuldeepDeshpande, “Model Based testing of Data
section. warehouse”, International journal of computer
 Set up – All the executor classes that take the Science Issue (IJCSI), vol.10, Issue 2, No.3, March
test cases as input are set up in this section. 2013.
[4] www.iiit.ac.in

©www.ijrcct.org | * Corresponding Author 274


Diptimayee Rana et al, International Journal of Research in ISSN (Online) 2278- 5841
computer and communication Technology , Vol 6, Issue- 8, August - 2017
ISSN (Print) 2320- 5156

[5]www.scribd.com
[6]AshutoshTripathi, AshishSrivastava, “ Online
Library Management System”, IOSR Journal of
Engineering, vol.2, Issue 2, pp.180-186, February
2012.
[7] www/en-Wikipedia-org-wiki-eclipse-software
[8]www.searchsoftwarequality.techtarget.com / tip /
Tutorial-Introducing- Selenium - IDE- an- open-
source- automation- testing-tool.
[9]www.cs.boisestate.edu/~dxu/research/MBT.html

[10]www.mit.bme.hu/~micskeiz/pages/modelbased_te
sting.html

Author:
Diptimayee Rana belongs to Angul, Odisha, India.
Born on 10th of November, 1990. The author is
currently pursuing M.Phill in Computer Science &
Applications from Sambalpur University and has
done MCA in Computer Science & Applications
from Gandhi Institute For Technology.
Programming and learning about technologies
interests the author.

Sarada Baboo born on 05th of August, 1963 is a


Reader at Sambalpur University, Sambalpur. She
done her P.hd in Process Re-Engineering from
Sambalpur University. Software Engineering is her
area of interest.

©www.ijrcct.org | * Corresponding Author 275

You might also like