Вы находитесь на странице: 1из 19

School of Information Technology and Engineering

Course Name: Software Engineering process


methods and tools.
Topic: TESTING THE EFFICIENCY OF ONLINE CAR PARKING
SYSTEM

TESTING TOOL:CALABASH

PROJECT REVIEW-III

GROUPMEMBERS:
15MIS0218-NAVEENKUMAR S
15MIS0066-KARTHICK E
15MIS0294-VIJAYKUMAR S

UNDERTHEGUIDANCEOF
Prof.Ramaprabha K B
SITE, VIT UNIVERSITY.
INTRODUCTION:

Make it easy for your customers to reserve a parking space


online. Sell long-term parking tickets conveniently online. Another benefit,
e.g., for business parks with employee parking: The companies can
independently manage long-term parking tickets for employees.

Regardless whether short-term or long-term parker: Offer your


business and private customers these services. Expand your offer to your
homepage as well: External services such as car washes or vehicle
maintenance can be integrated easily.

ABSTRACT:

Online Car Parking Reservation System is designed for booking the car
parking spaces through online. This is used to eliminate the delay on
parking. The User should register with his/her mail id and select the place
like hotel, theatre, malls, etc. after selecting the place, the system will
display the outlook of the car parking area. The user should select the
parking area, date and time and pay the money. Once the user booked the
parking area successfully, the area should be blocked for the upcoming
user. In this system, user can pay the parking charge through online or load
the money to this system and pay. If the User cancels the reservation,
parking charges will be refunded to the user account and the user can post
the Queries and Complaints through this system.

AIM:
Our aim to test the efficiency of that application on
Online Car Parking System that has been basically generated
by making the VIT car parking system as automated.

OBJECTIVES:

The manual car parking in our daily life has many


complications. This problem can be solved by making the
system automatic. The online car parking system will help
us to reduce the waiting of cars in queue. In this the user
can pay the parking fee through online with security, and
can check if there is any available place to park the car.

HOME ACTIVITY (ANDROID CODE):

package com.example.apple.ranjith;

import android.app.Activity; import


android.app.Dialog; import
android.content.Intent; import
android.os.Bundle; importandroid.view.View;
import android.widget.Button; import
android.widget.EditText; import
android.widget.Toast;

public class HomeActivityextends Activity


{
Button btnSignIn,btnSignUp;
LoginDataBaseAdapterloginDataBaseAdapter;

@Override
protected void onCreate(Bundle savedInstanceState)
{

super.onCreate(savedInstanceState); setContentView(R.layout.main);

// create a instance of SQLite Database loginDataBaseAdapter=new


LoginDataBaseAdapter(this); loginDataBaseAdapter=loginDataBaseAdapter.open();

// Get The Refference Of Buttons


btnSignIn=(Button)findViewById(R.id.buttonSignIN);
btnSignUp=(Button)findViewById(R.id.buttonSignUP);

// Set OnClick Listener on SignUp button


btnSignUp.setOnClickListener(new View.OnClickListener() { public void
onClick(View v) { //TODO Auto-generated method stub

/// Create Intent for SignUpActivityabdStart The Activity


Intent intentSignUP=new

Intent(getApplicationContext(),SignUPActivity.class);

startActivity(intentSignUP);

}
});

// Methos to handleClick Event of Sign In Button


public void signIn(View V)
{

final Dialog dialog = new Dialog(HomeActivity.this);


dialog.setContentView(R.layout.login); dialog.setTitle("Login");

// get the Refferences of views final


EditText
editTextUserName=(EditText)dialog.findViewById(R.id.editTextUserNameToLogin);
final EditText

editTextPassword=(EditText)dialog.findViewById(R.id.editTextPasswordToLogin);

Button

btnSignIn=(Button)dialog.findViewById(R.id.buttonSignIn);

// Set On ClickListener
btnSignIn.setOnClickListener(newView.OnClickListener() {

publicvoidonClick(Viewv){//getThe
User name andPassword
String userName=editTextUserName.getText().toString();

String password=editTextPassword.getText().toString();
// fetch the Password form database for respective user nameString
storedPassword=loginDataBaseAdapter.getSinlgeEntry(userName);

// check if the Stored password matches with Password entered by


user
if(password.equals(storedPassword))

Toast.makeText(HomeActivity.this, "Congrats: "+userName+"


Login Successfull", Toast.LENGTH_LONG).show(); dialog.dismiss();
startActivity(newIntent(HomeActivity.this,mainpage.class));

} else
{
Toast.makeText(HomeActivity.this,"UserNameorPassworddoesnotmatch",
Toast.LENGTH_LONG).show();

});

dialog.show();

@Override
protected void onDestroy() {
super.onDestroy(); // CloseThe
Database
loginDataBaseAdapter.close();

}
SCREEN SHOT:
PARKING ACTIVITIES:
package com.example.apple.ranjith;

import android.app.ProgressDialog; import


android.content.Intent; importandroid.graphics.Bitmap;
import android.net.Uri;

import android.support.v7.app.AppCompatActivity; import


android.os.Bundle; import android.view.View; import
android.webkit.WebView; import android.webkit.WebViewClient;
import android.widget.Toast; import android.widget.ToggleButton;

publicclassmainblockextendsAppCompatActivity {
ToggleButtontg1,tg2,tg3,tg4;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_mainblock); tg1= (ToggleButton)
findViewById(R.id.toggleButton1); tg2 = (ToggleButton)
findViewById(R.id.toggleButton2); tg3 = (ToggleButton)
findViewById(R.id.toggleButton3); tg4 = (ToggleButton)
findViewById(R.id.toggleButton4);

publicvoidparkingarea1(Viewv)

{ if(tg1.isChecked())

startActivity(newIntent(mainblock.this,parkingarea.class)); else

Toast.makeText(this,"Not Booked",Toast.LENGTH_SHORT).show();

public void parkingarea2(View v)

{ if(tg2.isChecked())

startActivity(newIntent(mainblock.this,parkingarea.class)); else

Toast.makeText(this,"Not Booked",Toast.LENGTH_SHORT).show();

}
public void parkingarea3(View v)

{ if(tg3.isChecked())

startActivity(newIntent(mainblock.this,parkingarea.class)); else
Toast.makeText(this,"NotBooked",Toast.LENGTH_SHORT).show(); }

public void parkingarea4(View v)

{ if(tg4.isChecked())

startActivity(newIntent(mainblock.this,parkingarea.class)); else
Toast.makeText(this,"Not Booked",Toast.LENGTH_SHORT).show();

}
LOGIN PAGE(JAVA):

package com.example.apple.ranjith;

import android.content.ContentValues; import


android.content.Context; importandroid.database.Cursor;
import android.database.SQLException; import
android.database.sqlite.SQLiteDatabase;

public class LoginDataBaseAdapter

static final String DATABASE_NAME = "login.db";


static final intDATABASE_VERSION = 1;
public static final intNAME_COLUMN = 1;
// TODO: Create public field for each column in your table.
// SQL Statement to create a new database. static final String
DATABASE_CREATE = "create table "+"LOGIN"+ "( " +"ID"+" integer
primary key autoincrement,"+ "USERNAME text,PASSWORD text); ";
// Variable to hold the database instance public
SQLiteDatabasedb;
// Context of the application using the database.
private final Context context; // Database
open/upgrade helper private DataBaseHelperdbHelper;
public LoginDataBaseAdapter(Context _context)
{ context= _context;

dbHelper= new DataBaseHelper(context, DATABASE_NAME, null,

DATABASE_VERSION);
}
public LoginDataBaseAdapteropen()throwsSQLException

db= dbHelper.getWritableDatabase(); return


this; } public voidclose()

{ db.close();

}
public SQLiteDatabasegetDatabaseInstance()

{ return db;
}
public voidinsertEntry(String userName,String password)
{

ContentValuesnewValues = newContentValues();
// Assign values for each row.
newValues.put("USERNAME", userName); newValues.put("PASSWORD",password);

// Insert the row into your tabledb.insert("LOGIN",


null, newValues);
///Toast.makeText(context, "Reminder Is Successfully
Saved", Toast.LENGTH_LONG).show();
}

public intdeleteEntry(String UserName)

//String id=String.valueOf(ID);String
where="USERNAME=?";
intnumberOFEntriesDeleted= db.delete("LOGIN", where, new String[]{UserName}) ;

// Toast.makeText(context, "Number fo Entry Deleted


Successfully : "+numberOFEntriesDeleted,
Toast.LENGTH_LONG).show(); return
numberOFEntriesDeleted;
}

public String getSinlgeEntry(String userName)

Cursor cursor=db.query("LOGIN", null, " USERNAME=?", newString[]{userName},


null, null, null); if(cursor.getCount()<1) // UserName Not Exist

{cursor.close();return"NOT
EXIST";}cursor.moveToFirst();
Stringpassword=

cursor.getString(cursor.getColumnIndex("PASSWORD"));
cursor.close(); returnpassword;

}
public void updateEntry(String userName,String password)

{
// Define the updated row content.
ContentValuesupdatedValues = newContentValues();

//Assignvaluesforeachrow.updatedValues.put("USERNAME",userName);
updatedValues.put("PASSWORD",password);
String where="USERNAME = ?"; db.update("LOGIN",updatedValues, where, new

String[]{userName});

}
SCREENSHOT:
SCREEN SHOT:
DATABASE:
package com.example.apple.ranjith;

import android.content.Context; importandroid.database.sqlite.SQLiteDatabase;


import android.database.sqlite.SQLiteDatabase.CursorFactory; import
android.database.sqlite.SQLiteOpenHelper; importandroid.util.Log;

public class DataBaseHelperextends SQLiteOpenHelper

publicDataBaseHelper(Context context, String name,CursorFactory factory, intversion)

super(context, name, factory, version);

// Called when no database exists in disk and the helper class


needs
// to create a new one.
@Override
public void onCreate(SQLiteDatabase _db)

_db.execSQL(LoginDataBaseAdapter.DATABASE_CREATE);

// Called when there is a database version mismatch meaning that


the version
// of the database on disk needs to be upgraded to the
current version. @Override
public void onUpgrade(SQLiteDatabase _db, int_oldVersion, int_newVersion)

{
// Log the version upgrade.
Log.w("TaskDBAdapter", "Upgrading from version "+_oldVersion + " to "
+_newVersion + ", which will destroy all olddata");

// Upgrade the existing database to conform to the new version.


Multiple
// previous versions can be handled by comparing
_oldVersion and _newVersion
// values.

_db.execSQL("DROP TABLE IF EXISTS "+ "TEMPLATE");


onCreate(_db); }} }
TESTING TOOL:

Calabash:

CalabashisoneframeworkthatenablesautomatedUIAcceptance
TestswritteninCucumbertoberunoniOSandAndroidapplications.While
CalabashintegratestightlywithXamarin.iOSandXamarin.Androidproject,
itcanalsobeusedwithiOSandAndroidprojectswrittenintheindigenous
languagesofObjective-CandJava.

Features:

Thecommunicationbetweendevelopersandsubjectmatterexperts
resultsinanubiquitouslanguagethatminimizesmisunderstandings
astheapplicationisdeveloped.

 Theacceptancetestsprovideclearandsimpledocumentation
abouthowtheapplicationshouldwork.

 Theapplicationhasteststhatwillnotifydevelopersifanyfuturechanges
totheapplicationbreakexistingfunctionality.Thisisespeciallypowerful
whencombinedaspartofacontinuousintegrationworkflowthatwill
buildtheappandrunthetestseachtimeadeveloperchecksincode.
Advantages andDisadvantages:
TESTING TOOL:

SCREENSHOT:
Conclusion:

Fromtheabovewecantesttheefficiencyofthe
OnlineCarParkingSystem.Therearealsomanyother
methodstodothetesting.Butthismethodwillhelp
totesttheandroidapplicationinaneasyway.