You are on page 1of 50

Roll No.

2028192 Subject code: BTCS-506-18

Practical-1
Aim-1 Study & usage of OpenProj or similar software to draft project plan
1.1 Introduction of MS Project:
 Microsoft Project is a project management software program developed
and sold by Microsoft, designed to assist a project manager in developing
a schedule, assigning resources to tasks, tracking progress, managing the
budget, and analyzing workloads.
 Project creates budgets based on assignment work and resource rates. As
resources are assigned to tasks and assignment work estimated, the
program calculates the cost, equal to the work times the rate, which rolls
up to the task level and then to any summary task, and finally to the
project level.
 Each resource can have its own calendar, which defines what days and
shifts a resource is available. Microsoft Project is not suitable for solving
problems of available materials (resources) constrained production.
Additional software is necessary to manage a complex facility that
produces physical goods.
1.2 Project Work Plan
Prepare a list of all tasks in the work breakdown structure, plus:
 Duration of task.
 Current task status.
 Task dependencies.
 Key milestone dates.
Step 1: How to start the application

Page 1
Roll No. 2028192 Subject code: BTCS-506-18

1.1 To start with Microsoft Project, navigate to Start - All programs - Microsoft
Office - Microsoft Office Project 2007.
1.2 After starting the project, the Gantt chart view appears by default (same as
Figure): 5 Step-by-Step Lab Activities
(with outcome data for Team #0)

Step 1: How to start the application


1.1To start with Microsoft Project, navigate to Start - All programs-Microsoft
Office-Microsoft Office Project 2007.
1.2 After starting the project, the Gantt chart view appears by default (same as
Figure below):
1.3 Depending on the information needed, it is possible to work in different
views of the project data. When starting a list of tasks or activities, it is easiest
to start with TaskSheet View (WBS View).
1.4 To display Task Sheet View, navigate to View (Menu item) - More Views.
1.5 A new screen appears then select task sheet and click Apply (see Figure
below).

Page 2
Roll No. 2028192 Subject code: BTCS-506-18

1.6 Task sheet view appears with only few columns of data (see Figure below).

Step 2: Entering the project title


2.1 Navigate to File (Menu item) –Properties.
2.2 Enter the Title of the project as specified in the Labl Assignment and then
click OK.

Page 3
Roll No. 2028192 Subject code: BTCS-506-18

Step 3: Entering the start date for the project


3.1 To do so, go to Project (Menu item) - Project Information. Enter the Start
date of the project as specified in the Labl Assignment. Then click OK.

Step 4: Inserting a new column on the Task Sheet


4.1 We will need a column for hierarchical order of tasks. As a result, we need
to include in the Task Sheet a column for WBS Code. To do so, Select Insert
(Menu item) Column WBS and then click OK.

Page 4
Roll No. 2028192 Subject code: BTCS-506-18

4.2 Alternate way to add a new column is as follows:


Highlight any column where you want to insert, right-click then select Insert
Column, it is inserted to the left side of the highlighted column.
After inserting a new column the view appears like on the figure below.

Step 5: a unique WBS Code


5.1 After you add a WBS Column to the sheet, the next thing you need to do is
to create a unique WBS codes for each task/activity.
5.2 Select Project (Menu item)- WBS-Define Code. You can now add a code
that will prefix the number sequence (for example, 1, 1.1, 1.1.1, etc. as specified
in column #1 of Labl Assignment).
You can also create the numbering hierarchy.

Page 5
Roll No. 2028192 Subject code: BTCS-506-18

5.3 For example, if we want to create four levels of hierarchy (like 1.1.1.1),
 select Numbers (ordered) in the first four rows of the sequence columns
of the
WBS code definition dialog box.
 To separate the numbers using periods, select the period in the separator
column.
 Leave the two items Checked at the bottom of the screen as shown below

Step 6: Entering a task


6.1 To enter a task, click the empty cell in the column named Task Name once
and start entering the task name as specified in the column # 2 of Labl
Assignment.
6.2 The alternate way to do this is as follows:
Double click the empty cell in the column named Task Name for each task to
show the Task Information screen and Go to General tab. Enter the names of the
tasks as given in the column # 2 of Lab1 Assignment. Then click OK.

Page 6
Roll No. 2028192 Subject code: BTCS-506-18

The outcome of this step should look like a figure below:

Page 7
Roll No. 2028192 Subject code: BTCS-506-18

Practical-2
Aim-2 Study and usage of OpenProj or similar software to track the
progress of a project.
Tracking Progress
●Network Diagram
●Gantt Chart:
 Bar chart format.
 Useful to monitor project status at any point in time.
●PERT Chart:
 Flowchart format.
 Illustrate task dependencies and critical path.

Project Progress Views


The View menu lists several views by default, Calendar, Gantt Chart, Network
Diagram, Task Usage, and Tracking Gantt. The Resource related views are:
Resource Graph, Sheet and Usage. You can click More Views to see additional
Views.

Network Diagram
Let us look at the Network Diagram view. By selecting it we see the following:

Page 8
Roll No. 2028192 Subject code: BTCS-506-18

2.1 GANTT CHART


 Select Gantt Chart view from the view menu.
 You'll have a spreadsheet where you can now enter information of all the
activities i.e. task name, duration, start date, end date, predecessors and
various other fields.
 You can enter required information in two ways, in spreadsheet or when
you double click on cell you get pop up window in which you can enter
all the information of that particular activity for predecessor activity you
need to write activity number.
 The SW itself will calculate start and end date.
 Now the Gantt Chart is complete.

On the View menu, click Gantt Chart. In the Task Name field, type a task name,
and then press TAB. (Microsoft Project enters an estimated duration of one day
for the task followed by a question mark). In the Duration field, type the amount
of time each task will take in months, weeks, days, hours, or minutes, not
counting nonworking time. (By default the time period will be days, but that can
be changed to hours, months, etc.). Press ENTER. It should look like the figure
below:

Page 9
Roll No. 2028192 Subject code: BTCS-506-18

●PERT Chart:
 Flowchart format.
 Illustrate task dependencies and critical path.
Critical Path Analysis
The critical path is used by project managers to monitor and control the project.
It is called the critical path as it depicts.

Page 10
Roll No. 2028192 Subject code: BTCS-506-18

Practical-3

Aim-3 Preparation of Software Requirement Specification Document,


Design Documents and Testing Phase related documents for your project.
Such as Case study for (Library Management System)

Library Management System

GROUP NO (-)
Name of Student (Course Branch, Rollno)

Software Requirements Specification Document

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


LYALLPUR KHALSA COLLEGE OF ENGINEERING

Page 11
Roll No. 2028192 Subject code: BTCS-506-18

Table of Contents

1. Introduction
1.1 Purpose
1.2 Scope
1.3 Definitions, Acronyms, and Abbreviations
2. The Overall Description
2.1 Product Functions
2.2 User Characteristics
2.3 Constraints
3. Specific Requirements
3.1 External Interfaces
3.2 Functions
3.3 Logical Database Requirements
3.4 Design Constraints
3.4.1Software
3.4.2 Hardware
3.4.3 Operating System

Page 12
Roll No. 2028192 Subject code: BTCS-506-18

Practical-3
Aim-3 Preparation of Software Requirement Specification Document,
Design Documents and Testing Phase related documents for your project.
Such as Case study for (Library Management System).
1. Introduction
This software system can fulfil the requirements of "Library System" In this
software, you can manage the record Books, Students Record, Issue Book
Record, Return Books Record, Stock in Library, Reports of Books, Students.
All the transaction which is doing manually will do with the help of
computer. We use Visual Basic as front end and Oracle 8i as backend for
making this project. This software will helpful in searching the Student
Record, Books Record in Library. This software also checks the duplicate
Book Entry, Student Roll No. There will be no chance of duplicity. Because
the Book No. will be unique. In any Class Student also have their different
Roll no.
We are using Oracle Si as a back end in our project. Oracle Si is the most
popular database currently in use. Various approach3s to data management are:
 Manual methods of data management
 Management of data and information
 Convenient and efficient retrieval
 Updating operations
1.1Purpose:
1.The purpose of software system can fulfil the requirements of "Library
System" In this software, you can manage the record Books, Students Record,
Issue Book Record, Return Books Record, Stock in Library, Reports of Books,
Students.
2. It also maintains the record of books that means book name, book id, book
author, publisher, quantity etc.
3. Searching
1.2 Scope:
In this software, you can manage the record Books, Students Record, Issue
Book Record, Return Books Record, Stock in Library, Reports of Books,
Students. All the transaction which is do manually will do with the help of
computer.
This product is very important for school, college and university library system.
It is very simple to understand for simple naïve user. In this software duplicate
entry is not possible. After entering the data in database user can also take the

Page 13
Roll No. 2028192 Subject code: BTCS-506-18

detail of various books, students, issue record, return books record in printing
form.
This software will helpful in searching the Student Record, Books Record in
Library. This software also checks the duplicate Book Entry, Student Roll No.
There will be no chance of duplicity. Because the Book no. will be unique. In
any Class Student also have their different Roll no.

1.3 Definitions, Acronyms, and Abbreviations.:


frm: This abbreviation is used for Form.
sturec: This stand from student record
bookree: This stand for book record
rpt: Used for report
con: It stand for connection
rs: It stand for recordset
text: It is used for all text box tool that is already available in VB 6.0
prbarl: It is used for progress bar.

2. The Overall Description:


The front end tool used in Visual Basic- which has many advanced features as
compared to character based languages like C++, e etc. The VB6 is that
software which can be directly inserted on the form and code automatically
executed. The main features are: RAD (Rapid Application Development) a
Special tools like timer controls and OLE HANDLING a Other database
connectivity with MS tools as well as Oracle a Supports may user defined
reports features, in built reports features and can supports crystal reports.
Can be used for on line applications.

2.1 Product Perspective:


Developing a system is just like a manufacturing unit where some raw material
and man power is used to produce the goods- in computer system, the data and
figures are fed to computer for processing. The results produced by computer
are called information and have value of its users. On the basic of information
we can take valuable decisions..

Page 14
Roll No. 2028192 Subject code: BTCS-506-18

A system is defined as the organized collection of components works in a


coordinated manner, to achieve an objective. There three main implications of a
system i.e.
1. A system must have a predetermined objectives
2. There must be interrelationship and interdependence among the system
components. 3. The objective of organization as whole has higher priority than
the objective of an individual component.

2.2 User Characteristics:


1. Organization: It means all the parts of a software system must be properly
arranged in order an structure.
2. Interaction: All the components of a system must interact with other
components to achieve the objective.
3.Interdependence: One part of a system must depend upon other component for
proper working. It means the output of one part may be feed to the other
component as input.
4. Integration: It means holism; which means the collection of all the
components.
5.Central Objective: Each system must have one central objective.

2.3 Constraints:
Following are the important constraints that are used in this software before
installation into the PC. 1. Recognition of need
2. Feasibility study
3. Analysis
4. Design
5. Implementation & Maintenance

3. Specific Requirements
3.1 Internal Interfaces:
Which are used to collect the data from sources within the organization and they
are:
 a Finance Reports

Page 15
Roll No. 2028192 Subject code: BTCS-506-18

 a Personnel Staff
 a Professional Staff
 a System documents and manuals
 User Staff
 Reports transaction documents

3.2 External Interfaces:


These are the outside tools used to collect the data from the system for
designing and they are:
 a Vendors
 a Government documents
 Newspapers and professional journals
To collect the data properly, some tools are used and they are;
 Review of literature, procedures, and forms
 On-site observations
 a Questionnaires
 a Interviews

3.2.1 Functions:
 Sorting of data
 Searching
 Retrieval of data
 Manage the record Books
 Students Record
 Issue Book Record
 Return Books Record
 Stock in Library
 Reports of Books & Students

3.3Logical Database Requirements:


1. Distributed Database System
For database, which is split across a network Oracle combines the data, which is
physically located on different database into logical database, which can be
accessed by everyone.

Page 16
Roll No. 2028192 Subject code: BTCS-506-18

2. Concurrent database users


Oracle 9.0 supports a large number of concurrent users accessing data at the
same time. It maintains certain locking mechanisms, which maintains
consistency of data.
3. Oracle 9.0 Database Structure
Oracle 9.0 database structures can be divided into two parts:
1. Logical Structure
2. Physical Structure
Logical Structure
Logical, database can be divided into following different parts:
1. Table Space
2. Schema Objects
Table Space is made up of one or more data files. The various schema objects,
which are logically stored in the Table Space, are actually stored in the data
files.
Schema object are collection of different object of same user.
There are various schemas in Oracle 9.0 like
 Table
 Index
 Sequences
 Synonymous
 Procedure
 Views
Physical Structure
Physical oracle 9.0 stores all the information into various files like:
 Control Files
 Redo Files
 Data Files
 Parameter Files

3.4 Design Constraints:


3.4.1 Hardware Requirement
 PIII or PIV
 128 MB RAM
Page 17
Roll No. 2028192 Subject code: BTCS-506-18

 1024 KB Cache Memory


 Hard Drives (Master & Slave)

3.4.2 S/W Requirement:


 VB 6
 ORACLE 91
 MS OFFICE

3.4.3 Operating System:


 Window XP Service Pack II
 3.4.4Human Ware:
 One Programmer
 One Data Librarian
 Data Entry Operators (As per requirements)

Page 18
Roll No. 2028192 Subject code: BTCS-506-18

Practical-4
Aim-4 Preparation of Software Configuration Management and Risk
Managementrelated documents.
SCM defines a mechanism to deal with different technical difficulties of a
project plan. In a software organization, effective implementation of software
configuration management can improve productivity by increased coordination
among the programmers in a team. SCM helps to eliminate the confusion often
caused by miscommunication among team members. The SCM system controls
the basic components such as software objects, program code, test data, test
output, design documents, and user manuals.
The SCM system has the following advantages:
 Reduced redundant work.
 Effective management of simultaneous updates.
 Avoids configuration-related problems.
 Facilitates team coordination.
 Helps in building management; managing tools used in builds.
 Defect tracking: It ensures that every defect has traceability back to its
source
Configuration management is a technique or discipline to systematically
manage, organize and control the changes in the documents, codes, artifacts and
other entities during the development life cycle.

Features of a good CM tools are:


 Ease for the developers to work simultaneously
 Ensuring that the developers don't over write watch others code
 Maintenance the history of everything.

List of Software configuration management tools available are:


 VSS-Visual source safe
 CVS-Concurrent version system
 Rational Clear Case
 SVN-Subversion
 Perforce Tortoise SVN .
 IBM Rational team concert
 IBM Configuration management version management
 Razor
 Quma version control system
 Source Anywhere
Page 19
Roll No. 2028192 Subject code: BTCS-506-18

Risks are the events that may lead to project failure of delay. There are 3
categories of risk:
1. Project Risk:-That affect the project schedule or resources.
2. Product Risk: - That affect the quality or performance of the
software being developed.
3. Business Risk: - that affect the organization developing or procuring the
software.

Page 20
Roll No. 2028192 Subject code: BTCS-506-18

<PROJECT NAME>

Name (BTECH CSE, Rollno)

CONFIGURATION MANAGEMENT PLAN

Version Number: 1.0

Version Date: <mm/dd/yyyy>

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING, LYALLPUR


KHALSA COLLEGE OF ENGINEERING JALANDHAR PUNJAB

Page 21
Roll No. 2028192 Subject code: BTCS-506-18

VERSION HISTORY

[Provide information on how the development and distribution of the Configuration


Management Plan will be controlled and tracked. Use the table below to provide the
version number, the author implementing the version, the date of the version, the name
ofthe person approving the version, the date that particular version was approved, and
a brief description of the reason for creating the revised version.]

Version Implemented Revision Approved Approval Description of


Number By Date By Date Change

1.0 <Author <mm/dd/yy> <name> <mm/dd/yy> <description of


name> change>

Page 22
Roll No. 2028192 Subject code: BTCS-506-18

TABLE OF CONTENTS

1.INTRODUCTION
1.1 Purpose of The Configuration Management Plan
2.CONFIGURATION MANAGEMENT
2.1 Approach
2.2 Organization
2.3 Training
3. CONFIGURATION MANAGEMENT ACTIVITIES
3.1 Configuration Items
3.2 Configuration Identification
3.3 Artifact Life Cycle
3.4Configuration Control
3.5Configuration Auditing/Reporting
APPENDIX A: CONFIGURATION MANAGEMENT PLAN APPROVAL
APPENDIX B: REFERENCES
APPENDIX C: KEY TERMS

Page 23
Roll No. 2028192 Subject code: BTCS-506-18

1. Introduction
1.1 Purpose of the Configuration Management Plan
[Provide the purpose of the Configuration Management Plan.]
The overall objective of a Configuration Management (CM) Plan is to
document and inform project stakeholders about CM with the project, what
CM tools will be used, and how they will be applied by the project to promote
success. The <Project Name> CM Plan defines the project's structure and
methods for
 Identifying, defining, and base lining configuration items (CI)
 Controlling modifications and releases of CIs
 Reporting and recording status of Cls and any requested modifications
 Ensuring completeness, consistency, and correctness of CIs
 Controlling storage, handling, and delivery of the CIS
The intended audience of the CM Plan is the project manager, project
team, project sponsor and any senior leaders whose support is needed to
carry out communication plans.
2. Configuration Management
2.1 Approach
[Identify the recommended CM approach (make or buy). Justify why one option
was selected of the other. If purchasing a CM system, identify which system(s)
were recommended as potential options and why one was chosen over the
others.]
2.2 Organization
[Identify items such as how CM activities will impact the organization,
definition of roles and responsibilities for those involved the CM activities and
those impacted by them, what organizational policies and procedures may be
impacted, and any interfaces between other organizations that may impact the
CM effort.]
2.3 Training
[Identify the kind and amount of training necessary to bring the performing
organization up to speed on what configuration management is, any tools used to
perform CM activities, and what, if any, impact CM may have on how work is
performed. This may include development team orientation, tools training,
organizational awareness, etc.]
3. Configuration Management Activities
3.1 Configuration Items
[Identify what items will and will not be placed under CM.]
3.2 Configuration Identification
[Define how configuration items will be identified throughout the CM/Project
Page 24
Roll No. 2028192 Subject code: BTCS-506-18

life cycle.This section should define identification schemas for information such
as:
 Labelling and numbering documents and files and files
 Relationships between documents
 Addressing versions and releases
 Various baselines for the project (product versioning)]

3.3 Artifact Life Cycle


[Define the artifact life cycle for the different CIs under CM]

3.4 Configuration Control


[Define how configuration items will be controlled throughout the
CM/Project life cycle. This section should define procedures for items
such as:
 Changing baselines
 Processing and managing change requests and Change Control Boards (CCBs)
 Communicating configuration status
 Performing configuration audits
 Building, testing, and debugging workspaces
 Who owns what product code and how to appropriately work with that code]

3.5 Configuration Auditing/Reporting


[Define how configuration items will be tracked, measured, and reported.]

Page 25
Roll No. 2028192 Subject code: BTCS-506-18

Appendix A: Configuration Management Plan Approval


The undersigned acknowledge that they have reviewed the <Project Name>
Configuration Plan and agree with the information presented within this document.
Changes to this Configuration Management Plan will be coordinated with, and
approved by, the undersigned, or their Management designated representatives.
[List the individuals whose signatures are desired. Examples of such individuals are
Business Owner, Project Manager (if identified), and any appropriate stakeholders.
Add additional lines for signature as necessary.]

Signature: Date:
Print Name:
Title:
Role:

Signature: Date:
Print Name:
Title:
Role:

Signature: Date:
Print Name:
Title:
Role:

APPENDIX B: REFERENCES
[Insert the name, version number, description, and physical location of any
documents referenced in this document. Add rows to the table as necessary.]

The following table summarizes the documents referenced in this document.

Document Name Description Location

<Document Name And <Document description> <URL or Network path


Version Number> where document is located

Page 26
Roll No. 2028192 Subject code: BTCS-506-18

Practical-5
Aim-5 Study and usage of any Design phase CASE tool
Relational rose
1. Rational Software
Rational Machines was founded by Paul Levy and Mike Devlin in 1981 to
provide tools to expand the use of modem software engineering practices,
particularly explicit modular architecture and iterative development.
2. Rational Environment
The Rational Environment was organized around a persistent intermediate
representation (DIANA), providing users with syntactic and semantic
completion, incremental compilation, and integrated configuration management
and version control. To overcome a conflict between strong typing and iterative
development that produced recompilation times proportional to system size
rather than size-of-change, the Rational Environment supported the definition of
subsystems with explicit architectural imports and exports; this mechanism later
proved useful in protecting application architectures from inadvertent
degradation. The Environment's Command Window mechanism made it easy to
directly invoke Ada functions and procedures, which encouraged
developerdriven unit testing. The company's name was later changed from
"Rational Machines" to Rational to avoid emphasizing this proprietary
hardware. Rational provided code generators and cross-debuggers for then-
popular instruction set architectures such as the VAX, Motorola 68000, and
X86, much of this was accomplished through a partnership with Tartan Labs,
founded by Bill Wulf to commercialize his work on optimizing code generators
semiautomatically produced from architecture descriptions (PQCC).
3. Organization
Rational's field organization was noteworthy for its team-based approach to
customer success. Sales teams were led by an account representative, and
included 3 to 5 software engineers referred to as technical representatives
(techreps). Sales teams engaged with their customers both pre-sales and
postsales, and were held accountable for customer success as well as for
revenue targets. This approach encouraged deep engagement between techreps
and customers, which in turn helped Rational develop a significant experience
base in the successful development of complex long-lived software. The Best
Practices underlying the later Rational Unified Process (RUP) - iterative
development, component-based architecture, modelling, continuous developer-

Page 27
Roll No. 2028192 Subject code: BTCS-506-18

driven testing, requirements management, and automated testing are all


traceable to this experience base.
4. Second-generation products
In 1990, Rational launched three parallel development efforts: re-
implementation of the Rational Environment (for Ada) to run on Unix-based
workstations from Sun and IBM, development of a comparable Rational
Environment for C++ to run on Unix-based workstations from Sun and IBM,
and development of a workstation hosted modelling tool called Rose that
supported a graphical notation developed by Grady Booch. Apex, the Rational
Environment for Ada, was launched on Sun and IBM Unix platforms in 1993,
and the Rational The latter, which allowed prospective customers to analyze
existing C++ code to produce "as-built" navigable class diagrams, helped
overcome Rational's late reentry into the market for object-oriented modelling
tools. Rose 2.0 ran on Windows PCs and on several Unix-based workstations.
5. Acquisitions
The momentum generated by Rose and the UML enabled Rational to establish a
partnership with Microsoft, which then saw model-based development as a
means of attracting enterprise-scale developers to the Windows platform;
Rational's aim was to secure Microsoft's public support for modelling in the
software development process. This engagement with Microsoft convinced
Rational to address the broader Windows-based IT market.
PROCEDURE:
UML Diagrams of Hotel Management System

Page 28
Roll No. 2028192 Subject code: BTCS-506-18

❖ Use Case Diagram of Hotel Management System


Use case Diagram are central to modelling the behaviour of a system,
subsystem, or a class. Use case diagrams are important for visualizing,
specifying, & documenting the behaviour of an element.

Page 29
Roll No. 2028192 Subject code: BTCS-506-18

❖ Class diagram of Hotel Management System

1. Class diagram for Booking Rooms In Hotel

Page 30
Roll No. 2028192 Subject code: BTCS-506-18

2. Class diagram for Room Search In Hotel

❖ Component Diagram for Hotel Management


A component Diagram shows the organization and dependencies among a set of
components. This involves modelling the physical things that reside on a node,
such as executables, libraries, tab, files, and documents.

Page 31
Roll No. 2028192 Subject code: BTCS-506-18

❖ Deployment Diagram for Hotel Management System


Deployment diagram shows the configuration of run time processing nodes and
the components that live on them. It is used to model the static deployment view
of a system.

Page 32
Roll No. 2028192 Subject code: BTCS-506-18

❖ Collaboration Diagram
Collaboration names a society of classes, interfaces , and other elements that
work together to provide some cooperative behaviour that’s bigger than the sum
of all its parts.

❖ Sequence Diagram of Hotel Management System

Page 33
Roll No. 2028192 Subject code: BTCS-506-18

❖ State Chart Diagram


A state chart diagram is normally used to model how the state of an object
changes in its lifetime. They are good at describing how the behaviour of an
object changes across several use case executions.

Page 34
Roll No. 2028192 Subject code: BTCS-506-18

Practical-6
Aim-6 To perform unit testing and integration testing using Jasmine tool.

Unit Testing Integration Testing


Unit testing is a type of testing to check Integration testing is a type of testing to
if the small piece of code is doing what check if different pieces of the modules
it is suppose to do. are working together.
Unit testing checks a single component The behavior of integration modules is
of an application. considered in the Integration testing.
The scope of Unit testing is narrow, it The scope of Integration testing is wide, it
covers the Unit or small piece of code covers the whole application under test
under test. Therefore while writing a and it requires much more effort to put
unit test shorter codes are used that together.
target just a single class.
Unit tests should have no dependencies Integration testing is dependent on other
on code outside the unit tested. outside systems like databases, hardware
allocated for them etc.
This is first type of testing is to be This type of testing is carried out after
carried out in Software testing life cycle Unit testing and before System testing and
and generally executed by developer. executed by the testing team.
Unit testing is not further sub divided Integration testing is further divided into
into different types. different types as follows:
Top-down Integration, Bottom-Up
Integration and so on.
Unit testing is starts with the module Integration testing is starts with the
specification. interface specification.
The detailed visibility of the code is The visibility of the integration structure is
comes under Unit testing. comes under Integration testing.
Unit testing mainly focus on the testing Integration testing is to be carried out to
the functionality of individual units only discover the issues arise when different
and does not uncover the issues arises modules are interacting with each other
when different modules are interacting to build overall system.
with each other.
The goal of Unit testing is to test the The goal of Integration testing is to test
each unit separately and ensure that the combined modules together and ensure
each unit is working as expected. that every combined modules are working
as expected.
Unit testing comes under White box Integration testing is comes under both
testing type. Black box and White box type of testing.
Page 35
Roll No. 2028192 Subject code: BTCS-506-18

introduction.js
Jasmine is a behaviour-driven development framework for testing JavaScript
code. It does not depend on any other JavaScript frameworks. It does not
require a DOM. And it has a clean, obvious syntax so that you can easily write
tests. This guide is running against Jasmine version 2.0.0.
Standalone Distribution
The releases page has links to download the standalone distribution, which
contains everything you need to start running Jasmine. After downloading a
particular version and unzipping, opening SpecRunner.html will run the
included specs. You'll note that both the source files and their respective specs
are linked in the of the SpecRunner.html. To start using Jasmine, replace the
source/spec files with your own.
describe("A suite", function(){
it("contains spec with an expectation", function() {
expect(true).toBe(true);
});
});
Suites: describe Your Tests
A test suite begins with a call to the global Jasmine function describe with two
parameters: a string and a function. The string is a name or title for a spec suite -
usually what is being tested. The function is a block of code that implements the
suite.
Specs
Specs are defined by calling the global Jasmine function it, which, like describe
takes a string and a function. The string is the title of the spec and the function
is the spec, or test. A spec contains one or more expectations that test the state
of the code. An expectation in Jasmine is an assertion that is either true or false.
A spec with all true expectations is a passing spec. A spec with one or more
false expectations is a failing spec.
It's Just Functions
Since describe and it blocks are functions, they can contain any executable code
necessary to implement the test. JavaScript scoping rules apply, so variables
declared in a describe are available to any it block inside the suite.

Page 36
Roll No. 2028192 Subject code: BTCS-506-18

Expectations

Expectations are built with the function expect which takes a value, called the
actual. It is chained with a Matcher function, which takes the expected value.
describe("The toBe' matcher compares with==’, function() {
It(“ and has a positive case", function(){ expect(true).toBe(true);
});
Matchers
Each matcher implements a Boolean comparison between the actual e and the
expected value. It is responsible for reporting to Jasmine if the expectation is true
or false. Jasmine will then pass or fail the spec.
Any matcher can evaluate to a negative assertion by chaining the call to expect
with a not before calling the matcher.
At a high level, these are the steps we cover:
1. Install Jasmine
2. Write a JavaScript program to use as the program under test
3. Write the Jasmine unit test
4. Execute the test and view results

Write a JavaScript program


To write my JavaScript program, I created a JavaScript project Jasmine Unit
Testing in Eclipse and added a new file with name ExampleCode.js
function AddTwoNumbers(a,b){

return a+b; //Function to return addition of two numbers a and b.

function MultiplyTwoNumbers(a,b){

return a*b;//Function to return product of two numbers a and b.

Page 37
Roll No. 2028192 Subject code: BTCS-506-18

I have created two simple programs for addition and product of two numbers in
ExampleCodejs.
3. Write the Jasmine unit test
Before I wrote my test program, I added the jasmine-standalone-2.0.3 folder to
my project by doing simple copy-paste of folder. I can also do it by using
Import option in Eclipse. I then added a new file UnitTest.js in the
$JASMINE_DIR/spec folder.
My project files structure looks like this.

Jasmine tests consists of two parts primarily:


1. describe blocks to describes a suite of tests.
2. it blocks for individual test specification.
Both the describe and it functions take two parameters
1. A text string to explain the purpose of our test (e.g.: test name)
2. function()
Here is my complete UnitTest.js. In this program I am testing my functions
written in ExampleCode.js.
describe("Testing Two Numbers", function() {
var a = 4;
var b = 3;
it("Add Numbers", function() {
expect(AddTwoNumbers(a,b)).toEqual(7);
});
it("Multiply Numbers", function() {
expect(MultiplyTwoNumbers(a,b)).toEqual(12);
});
Page 38
Roll No. 2028192 Subject code: BTCS-506-18

it("Compare Numbers to be Greater Than", function() {


expect(a).toBeGreaterThan(b);
});
it("Compare Numbers to be Less Than", function() {
expect(b).toBeLessThan(a);
});
});
The methods toEqual, toBeLessThan, toBeGreater are known as matchers –
assert methods that increase the readability of code. In Jasmine each matcher
implements a Boolean comparison between the actual value and expected value.
It is responsible for reporting to Jasmine if the expectation is True or False.
Jasmine will then pass or fail the Spec.
Here is the list of some popular matchers in Jasmine:-
1.expect(a).toBe(b);
2.expect(a).not.toBe(b);
3.expect(a).toMatch(b);
4.expect(a).toBeDefined();
5.expect(a).toBeNull();
6.expect(a).toContain("value");
7. expect(a).toBelessThan(b);
8.expect(a).toBeTruthy();
9.expect(a).toBeFalsy():
10. expect(a).not.toBeNull():
4 Execute the test and view results
To execute this test I have to run $JASMINE_DIR/SpecRunner.html. But
before that, lets update the source file and spec file location.
<DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Page 39
Roll No. 2028192 Subject code: BTCS-506-18

<title>side Jasmine Spec Runner v2.0.3</title>


<link rel="shortcut icon" type="image/png" href="lib/jasmine-
2.0.3/jasmine_favicon.png">
<link rel="stylesheet" type="text/css" href="lib/jasmine-2.0.3/jasmine.css">
<script type="text/javascript" src="lib/jasmine-2.0.3/jasmine.js"></script>
< script type="text/javascript" src="lib/jasmine-2.0.3/jasmine-
html.js"></script>
<script type="text/javascript" src="lib/jasmine-2.0.3/boot.js"></script>

< ---include source files here...-- >


<script type="text/javascript" src="./ExampleCode.js"></script>
< --include spec files here...-- >
<script type text/javascript" src="spec/UnitTest.js"></script>
</head>
</body>
</html>

In this HTML file, I put the exact files location of my source and spec files.
To view results, I have to open SpecRunner.html with a browser.

Page 40
Roll No. 2028192 Subject code: BTCS-506-18

Practical-7
Aim-7 To perform various white box and black box testing techniques
Black box testing treats the system as a "black-box", so it doesn't explicitly use
Knowledge of the internal structure or code. Or in other words the Test engineer
need not know the internal working of the "Black box" or application.
Main focus in black box testing is on functionality of the system as a whole.
The term “behavioural testing” is also used for black box testing and white box
testing is also sometimes called 'structural testing'. Behavioural test design is
slightly different from black-box test design because the use of internal
knowledge isn't strictly forbidden, but it's still discouraged.
Black box testing occurs throughout the software development and Testing life
cycle ie in Unit, Integration, System, Acceptance and regression testing stages.

Tools used for Black Box testing:


Black box testing tools are mainly record and playback tools. These tools are
used for regression testing that to check whether new build has created any bug
in previous working application functionality. These record and playback tools
records test cases in the form of some scripts like TSL, VB script, Java
script,Perl.

Advantages of Black Box Testing


-Tester can be non-technical.
-Used to verify contradictions in actual system and the specifications.
-Test cases can be designed as soon as the functional specifications are complete

Disadvantages of Black Box Testing


-The test inputs needs to be from large sample space.
- It is difficult to identify all possible inputs in limited testing time. So writing
test cases is slow and difficult
- Chances of having unidentified paths during this testing

Page 41
Roll No. 2028192 Subject code: BTCS-506-18

Methods of Black box Testing:


Graph Based Testing Methods:
Each and every application is build up of some objects. All such objects are
identified and graph is prepared. From this object graph each object relationship
is identified and test cases written accordingly to discover the errors.
Error Guessing:
This is purely based on previous experience and judgment of tester. Error
Guessing is the art of guessing where errors can be hidden. For this technique
there are no specific tools, writing the test cases that cover all the application
paths.
Boundary Value Analysis:
Many systems have tendency to fail on boundary. So testing boundry values of
application is important. Boundary Value Analysis (BVA) is a test Functional
Testing technique where the extreme boundary values are chosen. Boundary
values include maximum, minimum, just inside/outside boundaries, typical
values, and error values.

BVA techniques:
1.Number of variables For n variables: BVA yields 4n+1 test cases.
2.Kinds of ranges Generalizing ranges depends on the nature or type of
variables.
Advantages of Boundary Value Analysis
1. Robustness Testing - Boundary Value Analysis plus values that go
beyond the
Limits.
2. Min-1, Min, Min +1, Nom, Max-1, Max, Max +1.
3. Forces attention to exception handling
Limitations of Boundary Value Analysis
 Boundary value testing is efficient only for variables of fixed values i.e
boundary.

Page 42
Roll No. 2028192 Subject code: BTCS-506-18

Equivalence Partitioning: Equivalence partitioning is a black box testing


method that divides the input domain of a program into classes of data from
which test cases can be derived.

How this partitioning is performed while testing:


1. If an input condition specifies a range, one valid and one two invalid classes
are defined.
2. If an input condition requires a specific value, one valid and two invalid
equivalence classes are defined.
3. If an input condition specifies a member of a set, one valid and one invalid
equivalence class is defined.
4.If an input condition is Boolean, one valid and one invalid class is defined.
Comparison Testing:
Different independent versions of same software are used to compare to each
other for testing in this method.
White Box Testing (WBT) is also known as Code-Based Testing or Structural
Testing. White box testing is the software testing method in which internal
structure is being known to tester who is going to test the software. In this
method of testing the testcases are calculated based on analysis internal structure
of the system based on Code coverage, branches coverage, paths coverage,
condition Coverage etc.
In the White box testing following steps are executed to test the software code:
 Basically verify the security holes in the code.
 Verify the broken or incomplete paths in the code.
 Verify the flow of structure mention in the specification document
 Verify the Expected outputs
 Verify the all conditional loops in the code to check the complete
functionality of the application.
 Verify the line by line or Section by Section in the code & cover the 100%
testing

White Box Testing Techniques


Statement Coverage: In this white box testing technique try to cover 100%
statement coverage of the code, it means while testing the every possible
Page 43
Roll No. 2028192 Subject code: BTCS-506-18

statement in the code is executed at least Tools: To test the Statement Coverage
the Cantata++ can be used as white box testing tool. once.
Decision Coverage: In this white box testing technique try to cover 100%
decision coverage of the code, it possible decision conditions like if-else, for
loop and other conditional loops in the code is executed at means while testing
the very least once.
Tools: To cover the Decision Coverage testing in the code the TCAT-PATH is
used. This supports for the C. C++ and Java applications.
Condition Coverage:
In this white box testing try to cover 100% Condition coverage of the code, it
means while testing the every possible conditions in the code is executed at least
once.
Decision/Condition Coverage:
In this mixed type of white box testing technique try to cover 100%
Decision/Condition coverage of the code, it means while testing the every
possible Decisions/Conditions in the code is executed at least once.
Multiple Condition Coverage:
In this type of testing we use to cover each entry point of the system to be
execute once.
In the actual development process developers are make use of the combination of
techniques those are suitable for their software application.
Using above mentions testing white box testing techniques the 80% to 90% code
coverage is completed which might be sufficient with white box testing,
Advantages of White Box Testing -
 To start the testing of the software no need to wait for the GUI, you can
start the White Box Testing
 As covering all possible paths of code so this is a thorough testing.
 Tester can ask about implementation of each section, so it might be
possible to remove unused lines of code which might be causing
introduction of bug
 By executing equivalence use to approximates the partitioning. As the
tester is aware of internal coding structure, then it is helpful to derive
which type of input data is needed to testing software application
effectively.
 White box testing allows you to help in the code optimization.
Page 44
Roll No. 2028192 Subject code: BTCS-506-18

Disadvantages of White Box Testing –


 To test the software application a highly skilled resource is required to
carry out testing who know the deep knowledge of internal structure of the
code which increase the cost.
 Update test script is required if changing the implementation too
frequently. .
 If the application under test large is size then exhaustive testing is
impossible.
 It is not possible for testing each and every path/condition of software
program, which might miss the defects in code.
 White box testing very expensive type of testing.
 To analyze each line by line or path by path is nearly impossible work
which may introduce or miss the defects in the code.
 To test each paths or conditions may require different input conditions, so
to test full application tester need to create fill range of inputs which may
be a time consuming.

Page 45
Roll No. 2028192 Subject code: BTCS-506-18

Practical-8
Aim-8 Testing of a website.
Following Aspects are checked during website testing.
1) Functionality Testing
2) Usability testing
3) Interface testing
4) Compatibility testing
5) Performance testing
6) Security testing

1) Functionality Testing:
Test for all the links in web pages, database connection, forms used for
submitting or getting
information from user in the web pages, Cookie testing etc.
Check all the links:
 Test the outgoing links from all the pages to specific domain under test
 Test all internal links
 Test links jumping on the same pages.
 Test links used to send email to admin or other users from web pages.
 Test to check if there are any orphan pages.
 Finally link checking includes, check for broken links in all above-
mentioned links.

Test forms in all pages:


Forms are the integral part of any website. Forms are used for receiving
information from users and to interact with them. So what should be checked on
these forms?
 First check all the validations on each field.
 Check for default values of the fields.
 Wrong inputs in the forms to the fields in the forms.
 Options to create forms if any, form delete, view or modify the forms

Page 46
Roll No. 2028192 Subject code: BTCS-506-18

Let's take example of the search engine project currently I am working on, in this
project we have advertiser and affiliate signup steps. Each sign up step is
different but its dependent on the other steps. So sign up flow should get
executed correctly. There are different field validations like email Ids, User
financial info validations etc. All these validations should get checked in manual
or automated web testing.
Cookies Testing:
Cookies are small files stored on the user machine. These are basically used to
maintain the session mainly the login sessions. Test the application by enabling
or disabling the cookies in your browser options. Test if the cookies are
encrypted before writing to user machine. If you are testing the session cookies
(e. cookies that expire after the session ends) check for login sessions and user
stats after session ends. Check effect on application security by deleting the
cookies. (I will soon write a separate article on cookie testing as well)
Validate your HTML/CSS:
If you are optimizing your site for Search engines then HTML/CSS validation is
the most important one. Mainly validate the site for HTML syntax errors. Check
if the site is crawl able to different search engines.
Database testing:
Data consistency is also very important in web application. Check for data
integrity and errors while you edit, delete modify the forms or do any DB
related functionality.
Check if all the database queries are executing correctly, data is retrieved and
also updated correctly. More on database testing could be load on DB, we will
address this in web load or performance testing below.
2) Usability Testing:
Test for navigation: Navigation means how a user surfs the web pages,
different controls like buttons, boxes or how the user uses the links on pages surf
different pages.
Usability testing includes the following:
 Website should be easy to use.
 Instructions provided should be very clear.
 Check if the instructions provided are perfect to satisfy its purpose.
 Main menu should be provided on each page,
 It should be consistent enough.

Page 47
Roll No. 2028192 Subject code: BTCS-506-18

Content checking: Content should be logical and easy to understand. Check for
spelling errors. Usage of dark colors annoys the users and should not be used in
the site theme. You can follow some standard colors that are used for web page
and content building. These are the common accepted standards like what I
mentioned above about annoying colors, fonts, frames etc.
Content should be meaningful. All the anchor text links should be working
properly. Images should be placed properly with proper sizes.
These are some of basic important standards that should be followed in web
development. Your task is to validate all for UI testing
Other user information for user help: Like search option, sitemap also help
files etc. Sitemap should be present with all the links in websites with proper tree
view of navigation. Check for all links on the sitemap.
"Search in the site" option will help users to find content pages that they are
looking for easily and quickly. These are all optional items and if present they
should be validated.
3) Interface Testing: The main interfaces are:
Web server and application server interface
Application server and Database server interface
Check if all the interactions between these servers are executed and errors are
handled properly. If database or web server returns any error message for any
query by application server then application server should catch and display
these error messages appropriately to the users. Check what happens if user
interrupts any transaction in-between? Check what happens if connection to the
web server is reset in between?
4) Compatibility Testing:
Compatibility of your website is a very important testing aspect. See which
compatibility test to be executed:
 Browser compatibility
 Operating system compatibility
 Mobile browsing
 Printing options
Browser compatibility:
In my web-testing career I have experienced this as the most influencing part on
web site testing. Some applications are very dependent on browsers. Different
browsers have different configurations and settings that your web page should be
Page 48
Roll No. 2028192 Subject code: BTCS-506-18

compatible with. Your website coding should be a cross browser platform


compatible. If you are using java scripts or AJAX calls for UI functionality,
performing security checks or validations then give more stress on browser
compatibility testing of your web application. Test web application on different
browsers like Internet Explorer, Firefox, Netscape Navigator, AOL, Safari,Opera
browsers with different versions.
OS compatibility:
Some functionality in your web application is that it may not be compatible with
all operating systems. All new technologies used in web development like
graphic designs, interface calls like different API's may not be available all in
Operating Systems Hence test your web application on different operating
systems like Windows, UNIX, MAC, Linux, Solaris with different OS flavors.
Mobile browsing:
We are in new technology era. So in future Mobile browsing will rock. Test your
web pages on mobile browsers. Compatibility issues may be there on mobile
devices as well.
Printing options:
If you are giving page-printing options then make sure fonts, page alignment,
page graphics etc., are getting printed properly. Pages should fit to the paper size
or as per the size mentioned in the printing option.
5) Performance testing:
Web application should sustain to heavy load. Web performance testing should
include:
 Web Load Testing
 Web Stress Testing
Test application performance on different internet connection speed.
Web load testing: You need to test if many users are accessing or requesting the
same page. Can system sustain in peak load times? Site should handle many
simultaneous user requests, large input data from users, simultaneous connection
to DB, heavy load on specific pages etc.
Web Stress testing: Generally stress means stretching the system beyond its
specified limits. Web stress testing is performed to break the site by giving stress
and its checked as how the system reacts to stress and how it recovers from
crashes. Stress is generally given on input fields, login and sign up areas. In web
performance testing website functionality on different operating systems and
Page 49
Roll No. 2028192 Subject code: BTCS-506-18

different hardware platforms is checked for software and hardware memory


leakage errors.
6) Security Testing:
Following are some of the test cases for web security testing:
 Test by pasting internal URL directly onto the browser address bar
without login. Internal pages should not open.
 If you are logged in using username and password and browsing internal
pages then try changing URL options directly. I.e. If you are checking
some publisher site statistics with publisher site ID=123. Try directly
changing the URL site ID parameter to different site ID which is not
related to the logged in user. Access should be denied for this user to view
others stats.
 Try some invalid inputs in input fields like login username, password,
input text boxes etc. Check the systems reaction on all invalid inputs.
 Web directories or files should not be accessible directly unless they are
given download option.
 Test the CAPTCHA for automates script logins.
 Test if SSL is used for security measures. If used proper message should
get displayed when user switch from non-secure http:// pages to secure
https:// pages and vice versa.
 All transactions, error messages, security breach attempts should get
logged in log files somewhere on the web server.

Page 50

You might also like