BLACK BOOK GYM Sagar
BLACK BOOK GYM Sagar
SUBMITTED BY
(SEMESTER VI)
PROJECT GUIDE
SUBMITTED TO
UNIVERSITY OF MUMBAI
(2022-2023)
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 1
ACKNOWLEDGEMENT
The satisfaction and euphoria that accompany the successful completion of any
task would be incomplete without mentioning the names of people who made it
possible, whose constant guidance and encouragement crowns all the efforts with
success.
I also like to thank our BSC.IT Coordinator. Prof. MANJU SURESH, for
guiding and correcting various documents of mine with attention and care. She
has taken pain to go through the project and make necessary correction as and
when needed.
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 2
DECLARATION
I hereby declare that the project entitled, "Gym Management System" done
at Khar Education Society’s College of Commerce and Economics, has not
been in any case duplicated to submit to any other university for the award of any
degree. To the best of my knowledge other than me, no one has submitted to any
other university.
The project is done in partial fulfilment of the requirements for the award of
the degree of BACHELOR OF SCIENCE (INFORMATION
TECHNOLOGY) to be submitted as a final semester project as part of our
curriculum.
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 3
TABLE OF CONTENT
Chapter 2
2.1 Existing System
2.2 Proposed System
2.3 Requirement Analysis
2.4 Hardware Requirements
2.5 Software Requirements
2.6 Justification of Selection of Technology
Chapter 3
3.1 Module Division
3.2 Data Dictionary
3.3 ER Diagram
3.4 DED/UML Diagram
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 4
Chapter 4
4.1 Code (Place Core Segment)
4.2 Testing Approach
4.2.1 Unit Testing (Test cases and test results)
4.2.2 Integration System (Test cases and test results)
Chapter 5
5.1 Results and Discussions (Output Screen)
Chapter 6
6.1 Conclusion and Future Work
Chapter 7
7.1 Reference
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 5
LIST OF FIGURES
Sr.No. Figures Name Page. No
1 Use Case Diagram
2 Activity Diagram
3 Class Diagram
4 ER Diagram
5 Data Flow Diagram
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 6
Chapter 1
Introduction
A fitness app is a mobile application that helps users track and manage their fitness
activities and health goals. These apps often include features such as workout tracking, meal
planning, goal setting, and progress monitoring
Fitness apps have become increasingly popular in recent years as more people look to
technology to help them stay motivated and on track with their fitness goals. They can be a
convenient way to stay accountable to a workout routine, access expert advice, and connect
with other users for support and motivation.
Many fitness apps also integrate with wearable technology, such as smartwatches or fitness
trackers, to provide even more detailed insights into a user's fitness progress. Some apps even
use artificial intelligence and machine learning algorithms to analyze user data and provide
personalized recommendations for workouts, nutrition, and overall health.
Overall, a fitness app can be a valuable tool for anyone looking to improve their physical health
and well-being, providing a convenient and personalized way to track progress and stay
motivated towards their fitness goals.
1.1 Background
● In this module the user is provided with the facility for Adding Gyms or updating the
existing Gyms. ( the number of Gyms for a product can be very large this system is
provided with efficient filtering. "the user can filter the Gyms based on the priority,
database, operating system and status. filter the list of Gyms are displayed from the
database
● Gym and club management systems provide fitness businesses the functionality to
manage schedules, memberships, and facilities. The capabilities of gym management
systems include storing member information in a database, managing financial records,
scheduling classes, and reserving facilities.
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 7
● To help you choose the right gym management software for your business, here are
some tools and features to look out for.
● Gym Management System provides an easy to use interface for the users and a database
for the admin to maintain the records of gym members.
1.2 Objectives
● The main objective of the project is to develop software that facilitates the data storage,
data maintenance and its retrieval for the gym in an igneous way.
● To store the record of the customers, the staff that has the privileges to access, modify
and delete any record and finally the service gym provides to its customers.
● Also, only the staff has the privilege to access any database and make the required
changes, if necessary.
● To develop easy to use software which handles the customer staff relationship in an
effective manner.
● Develop a user friendly system that requires minimal user training. Most of features
and function are similar to those on any windows platform.
● The main objective is to save time of user.
● It help to get proper trainer according to test.
● Fast and accurate results.
● Provide better service to the user.
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 8
1.3 Purpose and Scope
1.3.1 Purpose
● Integration
● Gym management system software is one of the effective ways to modern gyms to
achieve success and optimize their business potential and it has great future scope
as well This technology has progressed well beyond checking member into gym
and processing dues
● They required software which will store data member’s , employees, machine,
salary, diet of member etc. And lock up with graphical user interface (GUI) The
system will check validity of information provided by user, Stores information of
member according to their id and generate reports for different id
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 9
Being physically active can improve your brain health hp manage weight reduce the risk of
disease strengthen bones and muscles and improve your ability to do everyday Adults who sit
less
1.3.2 Scope
A gym app can have a wide scope depending on the features and functionalities it offers.
Some of the most common features of a gym app include:
Workout tracking: Users can track their workout progress and monitor their fitness
goals.
Exercise library: A collection of exercises with instructions and videos can be included
to help users perform workouts correctly.
Personalized training programs: Based on the user's fitness level, goals, and
preferences, customized workout programs can be created.
Nutrition tracking: Users can track their daily food intake and monitor their calorie
consumption.
Community support: Users can connect with other gym-goers for motivation and
support.
Integration with wearables: Users can sync their gym app with wearable fitness devices
to track their activity levels.
Booking system: Users can book gym sessions or classes through the app.
Virtual coaching: Users can receive personalized coaching and feedback from certified
trainers via video chat.
Overall, a gym app can provide a comprehensive fitness experience for users by
offering a range of features to help them achieve their fitness goals.
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 10
Regenerate response
1.3.3 Applicability
The term "gym" can refer to different things depending on the context, but in general, it is a
place or facility where people go to exercise or participate in physical activities. The
applicability of a gym depends on various factors, including the individual's fitness goals,
availability of equipment and facilities, location, and cost.
For individuals who are interested in improving their overall fitness, a gym can be an excellent
option as it provides access to a wide range of equipment, including cardio machines, weight
lifting equipment, and functional training tools. Gyms also offer a variety of classes such as
yoga, Pilates, and group fitness sessions, which can help individuals achieve their fitness goals.
For athletes who require specialized training, a gym can provide the necessary equipment and
facilities to improve their performance in their sport. For example, a powerlifter may require a
gym with a powerlifting-specific equipment such as a squat rack, bench press, and deadlift
platform.
However, not everyone may find a gym suitable for their needs. Some individuals may prefer
outdoor activities such as running or cycling, while others may prefer a more personalized
approach such as working with a personal trainer or attending smaller fitness studios.
Overall, the applicability of a gym depends on an individual's fitness goals and preferences. It
is essential to consider factors such as location, cost, equipment, and facilities before deciding
on a gym membership.
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 11
Chapter 2
System Analysis
2. Survey of Technology
Sure, I can help you with that. Here are some potential survey questions related to gym apps
and technology:
How often do you use gym apps to track your fitness progress and goals?
What types of gym apps do you use most frequently (e.g., workout planners, calorie trackers,
activity monitors, social networks)?
Have you ever encountered technical issues or bugs while using a gym app? If so, how did you
address them?
How important is the design and user interface of a gym app to you?
Have you ever used virtual or augmented reality technology in a gym app? If so, what was your
experience like?
Would you be willing to pay for a premium version of a gym app with additional features or
services?
Have you ever participated in a fitness challenge or competition through a gym app
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 12
2.1 Main Objectives of this project
The main objective of a gym app project may vary depending on the specific goals and
requirements of the project. However, some of the common objectives of a gym app project
may include:
Providing a platform for users to track their fitness goals and progress: The gym app can
provide features that allow users to set fitness goals, track their workouts, monitor their
progress, and receive feedback on their performance.
Offering personalized workout plans and recommendations: Based on user's goals, fitness
level, and preferences, the gym app can suggest personalized workout plans and
recommendations that can help users achieve their fitness goals.
Enhancing the user's overall gym experience: The gym app can provide features that make it
easier and more convenient for users to access the gym, such as online class scheduling,
equipment reservation, and social features that allow users to connect with other gym-goers.
Providing a platform for gym trainers and coaches to connect with clients: The gym app can
provide features that allow trainers and coaches to create and manage workout plans for their
clients, monitor their progress, and provide feedback and support.
Overall, the main objective of a gym app project is to provide a platform that enhances the
user's fitness experience and helps them achieve their fitness goals Similar Work Done by
Others.
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 13
2.3 Currently used System
As an AI language model, I do not have access to information about your personal usage
of the gym app. However, if you are looking for information about currently popular gym
apps, here are a few:
Nike Training Club: A free app that offers over 185 workouts and custom training programs
based on your fitness level and goals.
MyFitnessPal: A free app that allows you to track your workouts and nutrition, set goals,
and connect with friends for support.
Peloton: An app that offers on-demand and live classes for cycling, running, strength
training, yoga, and more.
7 Minute Workout: A simple app that offers quick, high-intensity workouts that can be
done anywhere, anytime.
It's important to note that the effectiveness of any gym app will depend on your personal
fitness goals, preferences, and level of commitment to your fitness routine. It's always a
good idea to consult with a fitness professional before starting any new exercise program.
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 14
2.5 Proposed System
As an AI language model, I don't have access to any specific proposed system gym app.
However, I can provide some general information on what features a gym app could
include:
User profiles: Users should be able to create profiles within the app, which can store their
personal information, goals, fitness level, and workout history.
Workout plans: The app could offer users personalized workout plans based on their fitness
goals, experience level, and other factors. These plans could include exercises, sets, reps,
and rest periods.
Exercise library: A comprehensive library of exercises with detailed instructions and videos
can be included to ensure that users perform exercises correctly.
Tracking and monitoring: Users can track their progress with the app by logging workouts
and tracking progress over time. The app can also integrate with wearables or fitness
trackers to monitor other metrics such as heart rate, calories burned, and steps taken.
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 15
2.6 Requirement Analysis
In order to make the most out of this project it was necessary to be aware of all the
requirements that our targeted user must have. Requirements were taken through google
forms which significantly helped for the structure of the website.
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 16
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 17
2.4 Hardware Requirements
Hard disk space: . 32 GB or more
Processor: 2 GHz Intel Pentium Dual Core or later
RAM: 2 GB or more
Internet: Ethernet Cable, Wi-Fi or data connection
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 18
2.6 JUSTIFICATION OF PLATFORM
Structured Query Language: Abbreviated as SQL S-Q-L, sometimes sequel for historical
reasons) is a domain-specific language used in programming and designed for managing data
held in a relational database management system (RDBMS), or for stream processing in a
relational data stream management system (RDSMS). It is particularly useful in handling
structured data incorporating relations among entities and variables.
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 19
Chapter 3
System Design
3.1 Module Division
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 20
3.3 ER Diagram
An Entity Relationship (ER) Diagram is a type of flowchart that illustrates how "entities"
such as people, objects or concepts relate to each other within a system. ER Diagrams are
most often used to design or debug relational databases in the fields of software engineering,
business information systems, education and research. Also known as ERDs or ER Models,
they use a defined set of symbols such as rectangles, diamonds, ovals and connecting lines
to depict the interconnectedness of entities, relationships and their attributes.
Entity relationship diagrams provide a visual starting point for database design that can also
be used to help determine information system requirements throughout an organization.
After a relational database is rolled out, an ERD can still serve as a reference point, should
any debugging or business process re-engineering be needed later. However, while an ERD
can be useful for organizing data that can be represented by a relational structure, it can't
sufficiently represent semi-structured or unstructured data. It's also unlikely to be helpful on
its own in integrating data into a pre-existing information system.
• A conceptual data model lacks specific detail but provides an overview of the scope
of the project and how data sets relate to one another.
• A logical data model, which is more detailed than a conceptual data model, illustrates
specific attributes and relationships among data points. While a conceptual data
model does not need to be designed before a logical data model, a physical data
model is based on a logical data model.
• A physical data model provides the blueprint for a physical manifestation -- such as
a relational database -- of the logical data model. One or more physical data models
can be developed based on a logical data model.
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 21
There are five basic components of an entity relationship diagram. Similar components will
be designated by the same shape. For example, all entity types might be enclosed in a
rectangle, while all attributes are enclosed in a diamond. The components include
• Entities are objects or concepts that can have data stored about them. Entities refer
to tables used in databases.
• Attributes are properties or characteristics of entities. An ERD attribute can be
denoted as a primary key, which identifies a unique attribute, or a foreign key, which
can be assigned to multiple attributes.
• The relationships between and among those entities.
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 22
3.4 Data Flow/UML Diagram
UML is an acronym that stands for Unified Modeling Language. Simply put, UML is a
modern approach to modelling and documenting software. In fact, it’s one of the most
popular business process modelling techniques. It is based on diagrammatic
representations of software components. As the old proverb says: “a picture is worth a
thousand words”. By using visual representations, we are able to better understand
possible flaws or errors in software or business processes. UML was created as a result of
the chaos revolving around software development and documentation.
Gantt chart: - Gantt chart provides a graphical illustration of a schedule that helps to plan,
coordinate, and track specific tasks in a project.
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 23
Spiral Model
● Spiral Model is a combination of a waterfall model and iterative model. Each phase in
spiral model begins with a design goal and ends with the client reviewing the progress.
Barry Boehm first mentioned the spiral model in his 1986 paper. The development team
in Spiral-SDLC model starts with a small set of requirement and goes through each
development phase for those set of requirements. The software engineering team adds
functionality for the additional requirement in every-increasing spirals until the
application is ready for the production phase.
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 24
Data-Flow Diagram
A Data Flow Diagram (DFD) is a graphical representation of how data flows through a
system. It is a tool used by analysts to model and describe the flow of data through a system,
including inputs, outputs, and the various processing steps that occur.
Entities: These are the sources and destinations of data, such as people, organizations, or
other systems that interact with the system being modelled.
Processes: These are the steps that transform the data as it flows through the system.
Processes can represent anything from simple calculations to complex algorithms.
Data Flows: These are the paths that data takes as it moves through the system, from one
process to another or from a process to an entity.
Data Stores: These are the repositories which data is stored and retrieved from.
DFDs can be used to analyze and improve existing systems, as well as design new systems.
They are particularly useful in identifying inefficiencies or bottlenecks in a system and
suggesting areas for improvement.
• Context Diagram: A context diagram is the highest-level DFD that represents the entire
system as a single process, and shows the interactions between the system and external
entities. It provides an overview of the system without going into detail about the internal
workings of the system.
• Level 0 DFD: A Level 0 DFD shows the main processes of the system, and how they
interact with each other. It represents the first level of decomposition from the context
diagram.
• Level 1 DFD: A Level 1 DFD shows the more detailed sub-processes of each of the main
processes identified in the Level 0 DFD. It represents the next level of decomposition
from the Level 0 DFD.
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 25
• Level 2 (and beyond) DFDs: Level 2 and beyond DFDs provide more detailed views of
the sub-processes identified in the Level 1 DFD. They can continue to decompose the
system into further levels of detail, as necessary.
Each level of the DFD represents a higher level of detail and provides a more detailed view of
the system being modelled. The levels can continue to be decomposed until the desired level
of detail has been reached.
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 26
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 27
Class Diagram
The class diagram is one of the types of UML diagrams which is used to represent the
static diagram by mapping the structure of the systems using classes, attributes, relations,
and operations between the various objects. A class diagram has various classes; each has
threepart; the first partition contains a Class name which is the name of the class or entity
which is participated in the activity, the Second partition contains class attributes that
show the various properties of the class, the third partition contains class operations
which shows various operations performed by the class, relationships shows the relation
between two classes.
Class Diagram provides a static view of the application, and its mapping ability with
object-oriented language makes it ready to be used in construction. Unlike the sequence
diagram, activity diagram, etc., the class diagram is the most popular UML diagram.
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 28
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 29
Use-case Diagram
A UML use case diagram is a type of diagram in the Unified Modeling Language (UML) that
represents the interaction between a system and its external actors (users, other systems,
or devices) in terms of use cases. Use cases are descriptions of specific interactions
between the system and an actor that achieve a specific goal. The use case diagram shows
the relationships between actors and use cases, as well as the relationships between use
cases themselves. The use case diagram is typically used during the requirements gathering
and analysis phase of software development to capture and document the functionality of
a system. It helps to identify the actors and use cases that need to be included in the system
and provides a high-level overview of the system's behaviour.
• Actors: These are external entities (such as users, systems, or devices) that interact with
the system and trigger the use cases.
• Use Cases: These are specific interactions between the system and an actor that
achieve a specific goal. Each use case should have a unique name that describes the
goal.
• Associations: These are lines that connect actors to use cases, indicating that the actor
is involved in the use case.
• System Boundary: This is a rectangle that defines the boundary of the system,
separating the internal components from the external actors.
• Includes/Extends: These are optional relationships that show how one use case can be
included or extended by another use case. The includes relationship indicates that one
use case is always executed as part of another use case, while the extends relationship
indicates that one use case can be optionally executed as an extension of another use
case.
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 30
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 31
Activity Diagram
A UML activity diagram is a type of diagram in the Unified Modeling Language (UML)
that shows the flow of activities in a system or process. It is a graphical representation of a
workflow or business process that shows the sequence of actions, decisions, and transitions
required to complete a task or achieve a goal. Activity diagrams are used to model complex
systems and business processes, and they can help to identify inefficiencies, redundancies,
and potential errors. They are commonly used in software engineering to model the
behaviour of software systems, but they can also be used in other fields, such as business
process modelling and project management.
• Control Flow: A control flow is a line that connects the activities and shows the
sequence in which they are performed.
• Object Flow: An object flow is a line that shows the movement of objects between
activities.
• Start and End Points: A start point indicates where the process or workflow begins,
and an end point indicates where it ends.
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 32
UML activity diagrams are useful for analyzing and improving complex processes, and for
communicating the details of a process or workflow to stakeholders. They can also be used
to model the behaviour of software systems and to develop test cases and other types of
documentation.
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 33
Sequence Diagram
The sequence diagram represents the flow of messages in the system and is also termed as an
event diagram. It helps in envisioning several dynamic scenarios. It portrays the
communication between any two lifelines as a time-ordered sequence of events, such that these
lifelines took part at the run time. In UML, the lifeline is represented by a vertical bar, whereas
the message flow is represented by a vertical dotted line that extends across the bottom of the
page. It incorporates the iterations as well as branching.
Lifeline
Actor
A role played by an entity that interacts with the subject is called an actor. It is out of the scope
of the system. It represents the role, which involves human users and external hardware or
subjects.
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 34
Activation
It is represented by a thin rectangle on the lifeline. It describes that time period in which an
operation is performed by an element, such that the top and the bottom of the rectangle is
associated with the initiation and the completion time, each respectively.
Messages
The messages depict the interaction between the objects and are represented by arrows. They
are in the sequential order on the lifeline. The core of the sequence diagram is formed by
messages and lifelines.
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 35
Return Message: It defines a particular communication between the lifelines of interaction
that represent the flow of information from the receiver of the corresponding caller message .
Recursive Message: A self message sent for recursive purpose is called a recursive message.
In other words, it can be said that the recursive message is a special case of the self message as
it represents the recursive calls.
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 36
Create Message: It describes a communication, particularly between the lifelines of an
interaction describing that the target (lifeline) has been instantiated.
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 37
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 38
Chapter 4
Implementation and Testing
4.1 Code
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.easyfitness">
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="28" />
<uses-feature
android:name="android.hardware.camera.any"
android:required="false" />
<uses-feature
android:name="android.hardware.camera.autofocus"
android:required="false" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:requestLegacyExternalStorage="true"
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 39
android:theme="@style/AppTheme"
<activity
android:name=".MainActivity"
android:configChanges="orientation|screenSize"
android:label="@string/app_name"
android:windowSoftInputMode="stateUnchanged">
<intent-filter>
</intent-filter>
</activity>
<activity
android:name=".intro.MainIntroActivity"
android:theme="@style/Theme.Intro" />
package com.csvreader;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 40
import java.io.StringReader;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.text.NumberFormat;
import java.util.HashMap;
/**
* A stream based parser for parsing delimited text data from a file or a
* stream.
*/
/**
* qualifier.
*/
/**
*/
// this holds all the values for switches that the user is allowed to set
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 41
private Reader inputStream = null;
/**
* @param fileName The path to the file to use as the data source.
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 42
* @param delimiter The character to use as the column delimiter.
*/
throws FileNotFoundException {
if (fileName == null) {
if (charset == null) {
if (!new File(fileName).exists()) {
this.fileName = fileName;
this.userSettings.Delimiter = delimiter;
this.charset = charset;
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 43
/**
* @param fileName The path to the file to use as the data source.
*/
throws FileNotFoundException {
/**
* @param fileName The path to the file to use as the data source.
*/
this(fileName, Letters.COMMA);
/**
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 44
* {@link java.io.Reader Reader} object as the data source.
*/
if (inputStream == null) {
this.inputStream = inputStream;
this.userSettings.Delimiter = delimiter;
initialized = true;
/**
*/
this(inputStream, Letters.COMMA);
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 45
}
/**
*/
/**
*/
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 46
/**
*/
if (data == null) {
package com.csvreader;
import java.io.BufferedWriter;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.nio.charset.Charset;
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 47
import java.nio.charset.StandardCharsets;
/**
* A stream based writer for writing delimited text data to a file or a stream.
*/
/**
* qualifier.
*/
/**
*/
// this holds all the values for switches that the user is allowed to set
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 48
/**
*/
if (fileName == null) {
if (charset == null) {
this.fileName = fileName;
userSettings.Delimiter = delimiter;
this.charset = charset;
/**
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 49
*
*/
/**
* @param outputStream The stream to write the column delimited data to.
*/
if (outputStream == null) {
this.outputStream = outputStream;
userSettings.Delimiter = delimiter;
initialized = true;
/**
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 50
*
* @param outputStream The stream to write the column delimited data to.
*/
int start = 0;
sb.append(original.substring(start, found));
sb.append(replace);
sb.append(original.substring(start));
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 51
return sb.toString();
} else {
return original;
package com.easyfitness.bodymeasures;
import android.content.Context;
import android.database.Cursor;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CursorAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.cardview.widget.CardView;
import com.easyfitness.BtnClickListener;
import com.easyfitness.DAO.bodymeasures.DAOBodyMeasure;
import com.easyfitness.R;
import com.easyfitness.enums.Unit;
import com.easyfitness.utils.DateConverter;
import java.util.Date;
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 52
private final LayoutInflater mInflater;
super(context, c, flags);
mContext = context;
mClickListener = mD;
mInflater = (LayoutInflater)
context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
@Override
TextView t0 = view.findViewById(R.id.LIST_BODYMEASURE_ID);
t0.setText(cursor.getString(0));
TextView t1 = view.findViewById(R.id.LIST_BODYMEASURE_DATE);
Date date =
DateConverter.DBDateStrToDate(cursor.getString(cursor.getColumnIndex(DAOBodyMeasu
re.DATE)));
t1.setText(dateStr);
float measure =
cursor.getFloat(cursor.getColumnIndex(DAOBodyMeasure.MEASURE));
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 53
Unit unit =
Unit.fromInteger(cursor.getInt(cursor.getColumnIndex(DAOBodyMeasure.UNIT)));
TextView t2 = view.findViewById(R.id.LIST_BODYMEASURE_WEIGHT);
t2.setText(t2Str);
int mFirstColorOdd = 0;
if (cursor.getPosition() % 2 == mFirstColorOdd) {
cdView.setCardBackgroundColor(context.getResources().getColor(R.color.record_backgrou
nd_even));
} else {
cdView.setCardBackgroundColor(context.getResources().getColor(R.color.record_backgrou
nd_odd));
editImg.setTag(cursor.getLong(cursor.getColumnIndex(DAOBodyMeasure.KEY)));
editImg.setOnClickListener(v -> {
if (mClickListener != null)
mClickListener.onBtnClick(v);
});
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 54
deletImg.setTag(cursor.getLong(cursor.getColumnIndex(DAOBodyMeasure.KEY)));
deletImg.setOnClickListener(v -> {
if (mClickListener != null)
mClickListener.onBtnClick(v);
});
@Override
package com.easyfitness.bodymeasures;
import android.app.AlertDialog;
import android.app.DatePickerDialog;
import android.content.DialogInterface;
import android.database.Cursor;
import android.os.Bundle;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.AdapterView.OnItemLongClickListener;
import android.widget.DatePicker;
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 55
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.appcompat.widget.Toolbar;
import androidx.cardview.widget.CardView;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider;
import com.easyfitness.BtnClickListener;
import com.easyfitness.DAO.Profile;
import com.easyfitness.DAO.bodymeasures.BodyMeasure;
import com.easyfitness.DAO.bodymeasures.BodyPart;
import com.easyfitness.DAO.bodymeasures.BodyPartExtensions;
import com.easyfitness.DAO.bodymeasures.DAOBodyMeasure;
import com.easyfitness.DAO.bodymeasures.DAOBodyPart;
import com.easyfitness.MainActivity;
import com.easyfitness.AppViMo;
import com.easyfitness.R;
import com.easyfitness.SettingsFragment;
import com.easyfitness.ValuesEditorDialogbox;
import com.easyfitness.enums.Unit;
import com.easyfitness.enums.UnitType;
import com.easyfitness.utils.DateConverter;
import com.easyfitness.utils.ExpandedListView;
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 56
import com.easyfitness.utils.UnitConverter;
import com.easyfitness.utils.Value;
import com.easyfitness.views.EditableInputView;
import com.easyfitness.views.GraphView;
import com.github.mikephil.charting.data.Entry;
import com.onurkaganaldemir.ktoastlib.KToast;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
switch (view.getId()) {
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 57
case R.id.deleteButton:
showDeleteDialog((long) view.getTag());
break;
case R.id.editButton:
showEditDialog((long) view.getTag());
break;
};
@Override
BodyMeasure lastBodyMeasure =
mBodyMeasureDb.getLastBodyMeasures(mInitialBodyPart.getId(), getProfile());
: getValueWithValidUnit(lastBodyMeasure);
editorDialogbox.setTitle(R.string.AddLabel);
editorDialogbox.setPositiveButton(R.string.AddLabel);
editorDialogbox.setOnDismissListener(dialog -> {
if (!editorDialogbox.isCancelled()) {
mBodyMeasureDb.addBodyMeasure(date, mInitialBodyPart.getId(),
newValue, getProfile().getId());
refreshData();
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 58
}
});
editorDialogbox.show();
};
// Get the cursor, positioned to the corresponding row in the result set
profilListArray[0] = getActivity().getResources().getString(R.string.DeleteLabel);
// Delete
if (which == 0) {
mBodyMeasureDb.deleteMeasure(selectedID);
refreshData();
KToast.infoToast(getActivity(),
getActivity().getResources().getText(R.string.removedid).toString() + " " + selectedID,
Gravity.BOTTOM, KToast.LENGTH_SHORT);
});
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 59
itemActionBuilder.show();
return true;
};
if (v.getId() == R.id.deleteButton) {
delete();
};
/**
*/
args.putLong("bodyPartID", bodyPartID);
args.putBoolean("showInput", showInput);
f.setArguments(args);
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 60
return f;
deleteDialogBuilder.setTitle(getActivity().getResources().getText(R.string.global_confirm));
deleteDialogBuilder.setMessage(getActivity().getResources().getText(R.string.delete_bodyp
art_confirm));
deleteDialogBuilder.setPositiveButton(this.getResources().getString(R.string.global_yes),
(dialog, which) -> {
mDbBodyPart.delete(mInitialBodyPart.getId());
deleteRecordsAssociatedToMachine();
getActivity().onBackPressed();
});
deleteDialogBuilder.setNegativeButton(this.getResources().getString(R.string.global_no),
(dialog, which) -> {
// Do nothing
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 61
dialog.dismiss();
});
deleteDialog.show();
List<BodyMeasure> listBodyMeasure =
mDbBodyMeasure.getBodyPartMeasuresList(mInitialBodyPart.getId(), lProfile);
mDbBodyMeasure.deleteMeasure(record.getId());
@Override
Bundle savedInstanceState) {
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 62
addButton = view.findViewById(R.id.buttonAdd);
nameEdit = view.findViewById(R.id.BODYPART_NAME);
measureList = view.findViewById(R.id.listWeightProfil);
bodyToolbar = view.findViewById(R.id.bodyTrackingDetailsToolbar);
bodyPartImageView = view.findViewById(R.id.BODYPART_LOGO);
mDateGraph = view.findViewById(R.id.bodymeasureChart);
/* Initialisation BodyPart */
mInitialBodyPart = mDbBodyPart.getBodyPart(bodyPartID);
addButton.setVisibility(View.GONE);
} else {
addButton.setVisibility(View.VISIBLE);
}*/
if (mInitialBodyPart.getBodyPartResKey() != -1) {
bodyPartImageView.setVisibility(View.VISIBLE);
bodyPartImageView.setImageDrawable(mInitialBodyPart.getPicture(getContext()));
} else {
bodyPartImageView.setVisibility(View.GONE);
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 63
/* Initialisation des boutons */
if (mInitialBodyPart.getType() == BodyPartExtensions.TYPE_WEIGHT) {
nameEdit.ActivateDialog(false);
nameEdit.setOnTextChangeListener(onTextChangeListener);
addButton.setOnClickListener(onClickAddMeasure);
measureList.setOnItemLongClickListener(itemlongclickDeleteRecord);
((MainActivity) getActivity()).getActivityToolbar().setVisibility(View.GONE);
nameEdit.setText(mInitialBodyPart.getName(getContext()));
bodyToolbar.setNavigationIcon(R.drawable.ic_back);
deleteButton = view.findViewById(R.id.deleteButton);
deleteButton.setOnClickListener(onClickToolbarItem);
if (mInitialBodyPart.getType() == BodyPartExtensions.TYPE_WEIGHT) {
// Observe the LiveData, passing in this activity as the LifecycleOwner and the
observer.
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 64
// Update the UI, in this case, a TextView.
refreshData();
});
return view;
@Override
super.onStart();
refreshData();
package com.easyfitness.bodymeasures;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.easyfitness.DAO.Profile;
import com.easyfitness.DAO.bodymeasures.BodyMeasure;
import com.easyfitness.DAO.bodymeasures.BodyPart;
import com.easyfitness.DAO.bodymeasures.DAOBodyMeasure;
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 65
import com.easyfitness.R;
import com.easyfitness.graph.MiniDateGraph;
import com.easyfitness.utils.DateConverter;
import com.easyfitness.utils.ImageUtil;
import com.github.mikephil.charting.data.Entry;
import java.util.ArrayList;
import java.util.List;
Context mContext;
this.mContext = context;
@Override
/*
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 66
@Override
if (convertView == null) {
viewHolder.txtID = convertView.findViewById(R.id.LIST_BODYPART_ID);
viewHolder.txtName = convertView.findViewById(R.id.LIST_BODYPART);
viewHolder.txtLastMeasure =
convertView.findViewById(R.id.LIST_BODYPART_LASTRECORD);
viewHolder.logo = convertView.findViewById(R.id.LIST_BODYPART_LOGO);
convertView.setTag(viewHolder);
} else {
//result.startAnimation(animation);
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 67
//lastPosition = position;
viewHolder.txtID.setText(String.valueOf(dataModel.getId()));
viewHolder.txtName.setText(dataModel.getName(getContext()));
if (dataModel.getLastMeasure() != null)
viewHolder.txtLastMeasure.setText(String.valueOf(dataModel.getLastMeasure().getBodyMe
asure().getValue()));
else
viewHolder.txtLastMeasure.setText("-");
if (!dataModel.getCustomPicture().isEmpty()) {
ImageUtil.setPic(viewHolder.logo, dataModel.getCustomPicture());
} else {
if (dataModel.getBodyPartResKey() != -1)
viewHolder.logo.setImageDrawable(dataModel.getPicture(getContext()));
else
convertView.post(() -> {
List<BodyMeasure> valueList =
mDbBodyMeasure.getBodyPartMeasuresListTop4(dataModel.getId(), getProfile());
if (valueList != null) {
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 68
if (valueList.size() < 1) {
viewHolder.miniGraph.getChart().clear();
} else {
if (valueList.size() > 0) {
yVals.add(value);
viewHolder.miniGraph.draw(yVals);
);
package com.easyfitness.DAO.bodymeasures;
import com.easyfitness.utils.Value;
import java.util.Date;
/* DataBase Object */
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 69
private final int mBodypart_id;
public BodyMeasure(long id, Date pDate, int pBodypart_id, Value pMeasure, long
pProfile_id) {
super();
mId = id;
mDate = pDate;
mBodypart_id = pBodypart_id;
mMeasure = pMeasure;
mProfile_id = pProfile_id;
return mId;
mId = id;
return mDate;
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 70
return mBodypart_id;
return mMeasure;
mMeasure = bodyMeasure;
return mProfile_id;
switch (pBodyID) {
case ABDOMINAUX:
case DELTOIDS:
case DORSEAUX:
return R.drawable.ic_chest;
case ADDUCTEURS:
case MOLLETS:
case QUADRICEPS:
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 71
case ISCHIOJAMBIERS:
return R.drawable.ic_leg;
case BICEPS:
case TRICEPS:
return R.drawable.ic_arm;
case PECTORAUX:
return R.drawable.ic_chest_measure;
case LEFTBICEPS:
case RIGHTBICEPS:
return R.drawable.ic_arm_measure;
case LEFTTHIGH:
case RIGHTTHIGH:
return R.drawable.ic_thigh_measure;
case LEFTCALVES:
case RIGHTCALVES:
return R.drawable.ic_calf_measure;
case WAIST:
return R.drawable.ic_waist_measure;
case NECK:
case TRAPEZIUS:
case SHOULDERS:
return R.drawable.ic_neck;
case BEHIND:
return R.drawable.ic_hip_measure;
case OBLIQUES:
return R.string.obliques;
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 72
return -1;
switch (pBodyID) {
case WEIGHT:
return UnitType.WEIGHT;
case FAT:
case BONES:
case WATER:
case MUSCLES:
return UnitType.PERCENTAGE;
default:
return UnitType.SIZE;
}package com.easyfitness.DAO.cardio;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteException;
import com.easyfitness.DAO.DAOBase;
import com.easyfitness.DAO.DAOProfile;
import com.easyfitness.DAO.DAOUtils;
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 73
import com.easyfitness.DAO.Profile;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 74
+ DISTANCE + " FLOAT, "
super(context);
mContext = context;
SQLiteDatabase db = this.getReadableDatabase();
mCursor = null;
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 75
if (mCursor.moveToFirst()) {
do {
//Get Date
Date date;
try {
date = new
SimpleDateFormat(DAOUtils.DATE_FORMAT).parse(mCursor.getString(mCursor.getColu
mnIndex(DAOOldCardio.DATE)));
} catch (ParseException e) {
e.printStackTrace();
// Get Profile
Profile lProfile =
lDAOProfile.getProfile(mCursor.getLong(mCursor.getColumnIndex(DAOOldCardio.PROFI
L_KEY)));
mCursor.getString(mCursor.getColumnIndex(DAOOldCardio.EXERCICE)),
mCursor.getFloat(mCursor.getColumnIndex(DAOOldCardio.DISTANCE)),
mCursor.getLong(mCursor.getColumnIndex(DAOOldCardio.DURATION)),
lProfile);
value.setId(Long.parseLong(mCursor.getString(mCursor.getColumnIndex(DAOOldCardio.K
EY))));
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 76
// Adding value to list
valueList.add(value);
} while (mCursor.moveToNext());
return valueList;
return getRecordsList(selectQuery);
open();
SQLiteDatabase db = this.getReadableDatabase();
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 77
int value = cursor.getCount();
cursor.close();
close();
// return count
return value;
Cursor res;
SQLiteDatabase db = this.getReadableDatabase();
try {
res.close();
} catch (SQLiteException e) {
isExist = false;
return isExist;
SQLiteDatabase db = this.getReadableDatabase();
db.execSQL(TABLE_DROP);
return true;
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 78
}
package com.easyfitness.enums;
FREE_WORKOUT_DISPLAY,
PROGRAM_RUNNING_DISPLAY,
HISTORY_DISPLAY,
PROGRAM_PREVIEW_DISPLAY,
PROGRAM_EDIT_DISPLAY;
switch (x) {
case 0:
return FREE_WORKOUT_DISPLAY;
case 1:
return PROGRAM_RUNNING_DISPLAY;
case 2:
return HISTORY_DISPLAY;
case 3:
return PROGRAM_PREVIEW_DISPLAY;
case 4:
return PROGRAM_EDIT_DISPLAY;
return null;
}package com.easyfitness.enums;
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 79
KM("km"),
MILES("miles");
//Constructeur
DistanceUnit(String displayName) {
this.mDisplayName = displayName;
switch (x) {
case 0:
return KM;
case 1:
return MILES;
return null;
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 80
public String toString() {
return mDisplayName;
switch (ordinal()) {
case 0:
return Unit.KM;
case 1:
return Unit.MILES;
return null;
package com.easyfitness.enums;
STRENGTH("strength"),
CARDIO("cardio"),
ISOMETRIC("isometric");
ExerciseType(String displayName) {
this.mDisplayName = displayName;
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 81
public String toString() {
return mDisplayName;
switch (x) {
case 0:
return STRENGTH;
case 1:
return CARDIO;
case 2:
return ISOMETRIC;
return null;
package com.easyfitness.enums;
import android.content.res.Resources;
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 82
import com.easyfitness.R;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;
import java.util.SortedMap;
import java.util.TreeMap;
ABDOMINALS(R.string.abdominaux, 0),
BACK(R.string.dorseaux, 1),
BICEPS(R.string.biceps, 2),
CALVES(R.string.mollets, 3),
CHEST(R.string.pectoraux, 4),
DELTOIDS(R.string.deltoids, 5),
GLUTES(R.string.glutes, 6),
HAMSTRINGS(R.string.ischio_jambiers, 7),
OBLIQUES(R.string.obliques, 8),
QUADRICEPS(R.string.quadriceps, 9),
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 83
SHOULDERS(R.string.shoulders, 10),
THIGHS(R.string.adducteurs, 11),
TRAPEZIUS(R.string.trapezius, 12),
TRICEPS(R.string.triceps, 13);
this.resourceId = resourceId;
this.newId = newId;
if (muscle.newId == id) {
return muscle;
return resources.getString(this.resourceId);
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 84
if (bodyParts.equals("")) {
add(fromDatabaseId(bodyPartId, resources));
}};
add(Integer.parseInt(bodyPartString));
}};
if (muscles.size() == 0) {
return "";
return bodyPartStringFor(sortedMuscleIds);
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 85
public static Set<Muscle> setFromMigratedBodyPartString(String bodyPartString) {
if (bodyPartString.equals("")) {
add(Muscle.fromId(Integer.parseInt(bodyPart)));
}};
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 86
4.2 Testing Approach
Unit testing is an important step in the development process because if done correctly, it can
help detect early flaws in code which may be more difficult to find in later testing stages. A
unit test is a way of testing a unit - the smallest piece of code that can be logically isolated in
a system. In most programming languages, that is a function, a subroutine, a method or a
property. The isolated part of the definition is important. In his book "Working Effectively
with Legacy Code", author Michael Feathers states that such tests are not unit tests when they
rely on external systems: “If it talks to the database, it talks across the network, it touches the
file system, it requires system configuration, or it can't be run at the same time as any other
test."
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 87
Types of unit testing
Unit tests can be performed manually or automated. Those employing a manual method
may have an instinctual document made detailing each step in the process; however,
automated testing is the more common method for unit tests. Automated approaches
commonly use a testing framework to develop test cases. These frameworks are also set to
flag and report any failed test cases while also providing a summary of test cases.
Integration testing is a software testing technique where individual software components are
combined and tested as a group to ensure that they function properly together. The purpose
of integration testing is to identify defects in the interactions between these components,
which may not be apparent during unit testing.
Integration testing is important because it verifies that the individual software components
can work together as expected and that the interfaces between them are correctly
implemented. It also helps to identify any issues related to performance, reliability, and
security that may arise when multiple components are combined.
To perform integration testing, you need to first identify the individual components of the
software system that need to be integrated. Then, you need to create test cases that cover all
the possible interactions between these components. These test cases should be designed to
test the functionality and the interface of each component when it is integrated with other
components.
The process of integration testing can be performed manually or using automated tools.
Automated testing tools can help to streamline the testing process and can also provide more
accurate and reliable results. Once the testing is complete, any defects or issues that are
identified should be documented and addressed by the development team.
In summary, integration testing is a critical part of software testing that ensures that the
individual components of a software system can work together seamlessly. By performing
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 88
integration testing, you can identify and address any issues before the software is released to
users, which can help to ensure the reliability, performance, and security of the system.
1. Verify System Functionality: Integration testing ensures that the software system
works as intended when all components are combined. This helps to ensure that the
software performs all the necessary functions and meets the stakeholders'
requirements.
2. Detect Defects Early: Integration testing can identify defects in the software system
early in the development process. This allows the development team to address issues
before software release, saving time and resources.
3. Ensure System Stability: Integration testing helps to ensure system stability and
performance under different conditions. This is critical because it prevents system
crashes, data loss, and other issues that impact the user experience.
4. Identify Interface Issues: Integration testing identifies interface issues between
components, such as compatibility issues and communication problems. These issues
can be addressed before the software is released, preventing costly errors down the
line.
5. Improve User Experience: Integration testing ensures that the software system
provides a seamless and intuitive user experience. This is significant because it
improves user satisfaction, adoption, and retention.
The box testing approach of software testing consists of black box testing and white box
testing. We are discussing here white box testing which also known as glass box is testing,
structural testing, clear box testing, open box testing and transparent box testing. It tests
internal coding and infrastructure of a software focus on checking of predefined inputs against
expected and desired outputs. It is based on inner workings of an application and revolves
around internal structure testing. In this type of testing programming skills are required to
design test cases. The primary goal of white box testing is to focus on the flow of inputs and
outputs through the software and strengthening the security of the software.
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 89
The term 'white box' is used because of the internal perspective of the system. The clear box or
white box or transparent box name denote the ability to see through the software's outer shell
into its inner workings.
Developers do white box testing. In this, the developer will test every line of the code of the
program. The developers perform the White-box testing and then send the application or the
software to the testing team, where they will perform the black box testing and verify the
application along with the requirements and identify the bugs and sends it to the developer.
The developer fixes the bugs and does one round of white box testing and sends it to the testing
team. Here, fixing the bugs implies that the bug is deleted, and the particular feature is working
fine on the application.
Here, the test engineers will not include in fixing the defects for the following reasons:
o Fixing the bug might interrupt the other features. Therefore, the test engineer should
always find the bugs, and developers should still be doing the bug fixes.
o If the test engineers spend most of the time fixing the defects, then they may be unable
to find the other bugs in the application.
Black box testing is a technique of software testing which examines the functionality of
software without peering into its internal structure or coding. The primary source of black box
testing is a specification of requirements that is stated by the customer.
In this method, tester selects a function and gives input value to examine its functionality, and
checks whether the function is giving expected output or not. If the function produces correct
output, then it is passed in testing, otherwise failed. The test team reports the result to the
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 90
development team and then tests the next function. After completing testing of all functions if
there are severe problems, then it is given back to the development team for correction.
o In the second step, the tester creates a positive test scenario and an adverse test scenario
by selecting valid and invalid input values to check that the software is processing them
correctly or incorrectly.
o In the third step, the tester develops various test cases such as decision table, all pairs
test, equivalent division, error estimation, cause-effect graph, etc.
o The fourth phase includes the execution of all test cases.
o In the fifth step, the tester compares the expected output against the actual output.
o In the sixth and final step, if there is any flaw in the software, then it is cured and tested
again.
Test procedure
The test procedure of black box testing is a kind of process in which the tester has specific
knowledge about the software's work, and it develops test cases to check the accuracy of the
software's functionality.
It does not require programming knowledge of the software. All test cases are designed by
considering the input and output of a particular function. A tester knows about the definite
output of a particular input, but not about how the result is arising. There are various techniques
used in black box testing for testing like decision table technique, boundary value analysis
technique, state transition, All-pair testing, cause-effect graph technique, equivalence
partitioning technique, error guessing technique, use case technique and user story technique.
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 91
4.4.5 Grey Box Testing
White box testing involves complete knowledge of the inner workings of a system under test
and black box involves no knowledge. Grey box testing, however, is a compromise – testing a
system with partial knowledge of its internals. It is most commonly used in integration testing,
end-to-end system testing, and penetration testing.
Grey box testing combines inputs from developers and testers and can result in more effective
testing strategies. It reduces the overhead required to perform functional testing of a large
number of user paths, focusing testers on the paths most likely to affect users or result in a
defect.
Grey box testing combines the benefits of black box and white box testing:
● Ensuring that tests are performed from the user’s perspective, like in black box testing.
● Leveraging inside knowledge to focus on the problems that matter most, and to identify
and resolve internal weaknesses of the system, like in white box testing.
In the world of Application Security Testing , the grey box testing approach is called Interactive
Application Security Testing (IAST). IAST combines:
● SAST — which performs white box testing by evaluating static application code.
● Dynamic Application Security Testing (DAST) — which performs black box testing, by
interacting with running applications and discovering faults and vulnerabilities like a user
or external attacker would.
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 92
Chapter 5
Results and Discussion
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 93
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 94
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 95
6.Bibliography
T.Y.B.Sc(IT)/Semester-VI/2022-23/KES College 96