Testing - My Part
Testing - My Part
C#:
We use C# in developing the desktop application which is useful for the clerk and Asp.net
for dashboard to show monthly or annual report of the traffic status.
Office 2016:
Used to write all software documentation.
Visio:
Used to create diagrams like use case, DFD, database diagrams.
Python:
For configuration API that connect to sky drive
Sensors:
There are two sensors. Both the first and the second sensors sense moving object, then they
send signal to the micro controller periodically
Arduino:
When micro controller (Arduino) receive the first signal it starts the time counter. And the
second signal came from the sensor to stops counter and calculate speed and sends command
to camera to capture photo. And receive the photo from camera and upload to sky drive.
Camera:
The Camera is used to capture image frames of the area ahead of the vehicle.
Cables:
Cables used to connect to Arduino with camera and sensors
Sky drive and a powerful supply of internet access are also among the requirements.
axes(handles.axes1); cla;
imaqreset;
set(hObject,'UserData',0) %User data 0 (1 stop capture)
% Enable "Start" and "Stop" buttons
% set(handles.uipanel3,'visible','off');
% Disable current button
% set(hObject,'Enable','off');
% Get default source
% Open GUI to select the camera to use
sel_camera;
%
uiwait;
% Bring the camera features
% id = Camera ID
% es_web_ext = indicator if laptop or external camera
global id es_web_ext;
% Determine format depending on the type of camera to use
if es_web_ext == 0
formt = 'YUY2_640x480';
else
formt = 'RGB24_640x480';
%formt='RGB24_320x240';
end
try
% Create video object
vid = videoinput('winvideo', id, formt);
% Update handles
guidata(hObject, handles);
catch
% Message on error
msgbox('Check the connection of the camera','Camera')
% Remove axis labels
set(handles.axes1,'XTick',[ ],'YTick',[ ])
end
% Specify how often to acquire frame from video stream
vid.FrameGrabInterval = 1;
set(vid,'TriggerRepeat',Inf);
% Start capture
% _______Get Background_________
vid.FramesPerTrigger=50;
start(vid);
data = getdata(vid,50);
if es_web_ext == 0
bgImage = double(ycbcr2rgb(data(:,:,:,50)));
else
bgImage = double(data(:,:,:,50));
end
% Set last image as background
% Show background
imshow(uint8(bgImage));
% Reset video object
stop(vid);
clear vid;
imaqreset;
% Save background
handles.backg = bgImage;
guidata(hObject,handles);
%%
% Performs morphological closing (dilation followed by erosion).
b = bwmorph(difference,'close');
%%
% Performs morphological opening (erosion followed by dilation).
difference = bwmorph(b,'open');
difference = bwmorph(difference,'erode',2);
%%
% Select the biggest object
big_object = bwlabel(difference,8);
%%
% Measure properties of image regions such as: 'Area', 'Centroid', and 'Box'
object = regionprops(big_object);
%%
% Number of objects in in the image.
N = size(object,1);
%%
% Return whether no object in the image
if N < 1||isempty(object)
return
end
%%
% Remove holes less than 200 pixels
holeFilled = find([object.Area]<200);
if ~isempty(holeFilled)
object(holeFilled)=[ ];
end
%%
% Count objects
N = size(object,1);
if N < 1 || isempty(object)
return
end
%%
% Draw a rectangle and center point for every object in the image
for n = 1 : N
hold on
centroid = object(n).Centroid;
C_X = centroid(1);
C_Y = centroid(2);
rectangle('Position', object(n).BoundingBox, 'EdgeColor', 'g', 'LineWidth', 1);
plot(C_X, C_Y, 'Color', 'g', 'Marker', '+', 'LineWidth', 1);
hold off
end
indicador = 1;
set(handles.compare_output, 'String', indicador);
end
Speed detection
while islogging(vid)
if get(handles.stop,'UserData') % Data from "Stop" button
break
end
% Get image
if es_web_ext == 0
get_image = ycbcr2rgb(getdata(vid, 1));
else
get_image = getdata(vid, 1);
end
% Show image
image(get_image);
% Convert image to double
input_image = double(get_image);
axis image off;
%Frame set
frame_counts = 0;
% set(handles.frame_count, 'String', '');
%
% set(handles.speed_detected, 'String', '');
end
drawnow;
end
5. Introduction
Tremendous works have been done to analyze, design, implement and finally test the whole
system. This test plan document also tries to stipulate the steps followed and the strategies used
to complete testing the whole system. Accordingly the works done in each phases of the test as a
unit in unit testing, as a system, system testing and finally as to how much the hard ware and
software systems are integrated in integration testing are listed in the document.
5.1. Objective
The objective of the test suite is to provide adequate coverage metrics, requirements validation,
and system quality data such that sufficient data is provided for those making the decision to
release.
The main objective of this test plan conforming to our system is to make sure that the hardware
parts all together that were used in manipulating the vehicles like, sensors which are used to
detect the motion of vehicles, the arduino board which used in configuring the linkage in the
whole systems, the cameras to caption targeted cars and other undisclosed parts are properly put
in place so that they are able to function with the software code written.
5.2. Scope
VSMS as it was discussed in the design phase has 3 main components namely the interface,
logical and database layers. Particularly the logical layer is the most crucial section that needs to
be tested though the whole system testing is more crucial. The whole process staring from taking
camera shots through determining the elapse speed up to uploading and securing the file needs to
be under scope of test plan. This includes a couple of steps to follow. Like, noise removal,
skewing, segmentation, feature extraction, background subtraction and other essential steps so
that the whole system comes to a completion.
However, the interface and the database layers are also under the test plan. As we importantly
need to provide a secured access to the uploaded images authorized users need to be verified by
using their prior account inserted in the database.
5.3. Resources
The resources we used to test our system includes the physical characteristics of the
facilities, including the hardware, software, special test tools, and other resources
needed.
Facility required:
The lab area with a sustainable power out let, an internet connection, a table for easy
access and depiction of the simulation work. A toe car for simulating the real car is
also amongst the needed facilities.
Hard ware required:
5.4. Schedule
Types of Testing Date of testing Tested by
Unit testing April (7-10) Surafel Nigussie
Integration testing April (26-30) Yitbarek Adugna & Seifu Geremew
System testing May ( 16-23) Surafel Nigussie
5.7. Approach
Black box testing:
Which is also called behavioral testing or partition testing. This kind of testing focuses on the
functional requirements of the software. It enables one to derive sets of input conditions that will
fully exercise all functional requirements for a program.
GUI Testing:
GUI testing will includes testing the UI of OCR. It covers easiness for use, look and
Integration Testing:
Integration testing is systematic technique for the program structure while conducting test to
uncover errors associated with interacting different function together. In image processing,
integration testing includes the testing preprocessing algorithms and integration of preprocessing
algorithm with feature extraction.
Functional Testing:
Functional testing is carried out in order to find out unexpected behavior of the recognized text.
The characteristic of functional testing are to provide correctness, reliability, testability and
accuracy of the recognized text.
System Testing:
System testing of software is testing conducted on a complete, integrated system to evaluate the
system's compliance with its specified requirements.
Performance Testing:
The clerk was given a full authority as to control the synced images and it is a crucial test.
The purpose behind user acceptance testing is to conform that system is developed according to
the specified user requirements and is ready for operational use. Acceptance testing is carried out
at two levels - Alpha and Beta Testing.