הקדמההקדמה
משחקים כמבחן לבינה מלאכותית
התמודדות מול שחקנים אנושיים•
התמודדות מול יריבים ממוחשבים•
משחקי תכנות(Programming Games)
השחקן - אנושי או ממוחשב?•
מקרה מבחן מעניין•
•Robocode
משחקים ומשחקי תכנותמשחקים ומשחקי תכנות
Flash ProjectFlash ProjectSurfing analyzing for mobile devicesSurfing analyzing for mobile devices
ADDADD
Flash ProjectFlash Project
BackgroundBackground(Reminder)(Reminder)
The CompanyThe Company
Flash Networks enables mobile operators to deliver
the best possible user experience for mobile data
over advanced cellular networks.
Flash Networks focuses on Quality of Experience
and Maximizes Profitability for Mobile Data Carriers
Company Site: www.flashnetworks.com
Flash NetworksFlash Networks
ACCELERATING THE ADOPTION OF MOBILE DATA 4
proprietary & confidentialproprietary & confidentialproprietary & confidentialproprietary & confidential
NettGain
Mobile Carrier
Public Sites
Exchange Server
Intranet
VideoGames
Content Providers
Internet
Enterprise
File Server
NettGain™: QoE Enhancement
GGSN
(Gateway)
PDSN
GPRS/EDGE/UMTS/HSDPA
1xRTT/1xEVDO/EVDO rev A
GW
BackgroundBackground
While processing internet data, NettGain causes irreversible changes to data before it reaches mobile device.
Those changes sometimes cause quality & reliability issues and deteriorate surfing experience instead of improving it.
The ProblemThe Problem
Therefore, there is a need for a robust system that will perform variety tests in order to map all above issues and inform the results to development and QA teams.
Flash ProjectFlash Project
System RequirementsSystem Requirements
Brief overviewBrief overview
System RequirementsSystem Requirements
Analyze Internet surfing performance using mobile devices over cellular network that uses NettGain.
Examine internet sites content that were manipulated by NettGain.
Main GoalMain Goal
System RequirementsSystem Requirements
Bandwidth and network identification• Communication Initialization
Task Acquisition • Acquires the task file for the mobile to perform
Task Execution• Executes all subtasks in the task that was
acquired
Task Results Delivery• Delivers the results back to the PC component
Mobile ComponentMobile Component
System RequirementsSystem Requirements
Task Builder
• Constructs task templates and stores them
Task Control Center
• Assignment of tasks and management of designated tasks.
Analysis & Statistics
• Presents graphical statistical results based on data gathered from mobile devices.
PC ComponentPC Component
Flash ProjectFlash Project
System ArchitectureSystem Architecture
System ArchitectureSystem Architecture
Data base
WebServer
FlashNetworks Products
Cellular Internet Router
Cellular Network
Internet
FlashNetworks User
Task & Result Communication
User Interaction
ACCELERATING THE ADOPTION OF MOBILE DATA 12
proprietary & confidentialproprietary & confidentialproprietary & confidentialproprietary & confidential
System Architecture and Technologies:
System ArchitectureSystem Architecture
DefinitionsDefinitions
System ArchitectureSystem Architecture
Access to the PC component is done via the web )web application(.
Includes 2 major parts :
Web Application - composed of sub components:
• Task & result handling – enables retrieval of tasks by mobile devices and receiving result files from them.
• User Interaction – By using the internet and regular web browser the user can enable/disable working tasks, create new template tasks and designating them, View statistics and control the system
Database – stores the data for future usage and restore purposes.
PC ComponentPC Component
System ArchitectureSystem Architecture
This component will:
1. Retrieve tasks
2. Execute them
3. Deliver the results to the PC Component.
In order to obtain the task goal, the PC component will need to compare data that will be collected by the Mobile - with and without NettGain.
The mobile components divided into two types: • Nokia Cellular )Symbian OS(
• PDA )Windows Mobile OS(.
Mobile ComponentMobile Component
Components Components ResponsibilitiesResponsibilities
– PDA - Nati B., Ilya M.
– Nokia - Ronen B., Roy K
– PC - All
Flash ProjectFlash Project
Main Classes Main Classes
& Relationships& Relationships
Main ClassesMain Classes
PC ComponentPC Component
Main ClassesMain Classes
PDA ComponentPDA Component
Main ClassesMain Classes
Symbian ComponentSymbian Component
Flash ProjectFlash Project
User InterfaceUser Interface
OverviewOverview
PC ComponentPC ComponentU
I Overv
iew
UI O
verv
iew
PC ComponentPC ComponentU
I Overv
iew
UI O
verv
iew
PC ComponentPC ComponentU
I Overv
iew
UI O
verv
iew
PC ComponentPC ComponentU
I Overv
iew
UI O
verv
iew
PC ComponentPC ComponentU
I Overv
iew
UI O
verv
iew
PC ComponentPC ComponentU
I Overv
iew
UI O
verv
iew
PC ComponentPC ComponentU
I Overv
iew
UI O
verv
iew
PCPCComponeComponentnt U
I Overv
iew
UI O
verv
iew
PC ComponentPC ComponentU
I Overv
iew
UI O
verv
iew
PDA ComponentPDA ComponentU
I Overv
iew
UI O
verv
iew
Symbian ComponentSymbian ComponentU
I Overv
iew
UI O
verv
iew
Flash ProjectFlash Project
TestingTesting
Brief OverviewBrief Overview
Testing overviewTesting overview
PDATestExecutor• A predefined task with )partially( known
results based on previous calculations will be given to the ‘executeTask’ method
• Test executor will execute all subtasks within it.
• The collected results will be compared to known correct results
Unit Testing (PDA)Unit Testing (PDA)
Testing overviewTesting overview
PDAXMLhandler
• A predefined result chunk will be given
to the XML handler.
• It will parse it into XML format.
• Parse result will be compared to
expected parse format of the given
result chunk.
Unit Testing (PDA)Unit Testing (PDA)
Testing overviewTesting overview
PDACommunicator
• A task will be put in web server’s task
queue, designated to that specific
mobile.
• Task will be pulled by communicator.
• Downloaded task will be compared with
original task that was in the queue.
Unit Testing (PDA)Unit Testing (PDA)
Testing overviewTesting overview
DBFacade• A task template will be given to
‘saveTask’ method.
• DB façade will save the task template in the DB.
• Task template will be pulled from the DB and will be compared to initially given one
Unit Testing (PC)Unit Testing (PC)
Testing overviewTesting overview
TaskManager
• A predefined task will be sent as an
argument to ‘enqueueDesignatedTask’
method.
• Task will be enqueued to the task queue.
• Task queue size has been increased by
one, and the last task on queue is the
given task.
Unit Testing (PC)Unit Testing (PC)
Testing overviewTesting overview
XMLParser - TestGetNextSubTask
• A predefined Task file will be available
for parsing, and will be given as input to
the method.
• An expected SubTask class will be
compared to the output of the method
• If they are equal test passes. Else – test
fails.
Unit Testing (Symbian)Unit Testing (Symbian)
Testing overviewTesting overview
XMLParser - TestMakeResultChunk
• A predefined ResultChunk will be given
as input to the method
• An expected ResultChunk file )as XML
string( will be compared to the output of
the method
• If they are equal , test passes – else –
test fails.
Unit Testing (Symbian)Unit Testing (Symbian)
Testing overviewTesting overview
XMLParser - TestHTMLDoc
• A predefined HTML document will be
given as input to the method
• The expected result of links and images
will be given for comparison
• If they are equal , test passes – else –
test fails.
Unit Testing (Symbian)Unit Testing (Symbian)
Testing overviewTesting overview
Communicator - requestTask • A predefined link for retrieval of the task
file will be given.
• The communicator should retrieve the result file from the link.
• An expected Task will be compared to the output of the method.
• If they are equal , test passes – else – test fails.
Unit Testing (Symbian)Unit Testing (Symbian)
Testing overviewTesting overview
Communicator - sendResultChunk
• A predefined ResultChunk will be given
to the method.
• The communicator will be configured to
a predefined address.
• The test passes if the method returns
"true".
Unit Testing (Symbian)Unit Testing (Symbian)
Testing overviewTesting overview
Communicator - HttpGet
• A predefined link with known errors )or
known number of links and images( will
be given to the method.
• The result will be matched against a the
known parameters )in a file(.
Unit Testing (Symbian)Unit Testing (Symbian)
Testing overviewTesting overview
CBrCtlSampleAppLoadEventObserver - TestHandleBrowserLoadEventL
• A few premade "sites" will be given to the browser to invoke an event for the observer.
• The observer should create a relevant result file
• The output result file will be compared to an expected result file .
• If they are equal, test passes – else – test fails.
Unit Testing (Symbian)Unit Testing (Symbian)
Testing overviewTesting overview
Tasks will be given to Mobile component to see how it handles them.
We’ll start with simple task files )few type of tests & few sub tasks(, which are put inside the mobile device, let it parse each, and perform the execution of the sub tasks.
We’ll examine the results, to see if they are logical, and fit the given sub tasks.
Gradually we’ll give the mobile more & more complicated tasks with more types of tests.
Integration Testing (Mobile)Integration Testing (Mobile)
Testing overviewTesting overview
Task template will be created, mobile devices will be registered.
Templates and mobile devices will be pulled from db in order to see if they were stored correctly. They will be combined together into designated tasks, and put in the queue.
We’ll examine if the queue handles all enqueued tasks correctly.
Integration Testing (PC)Integration Testing (PC)
Testing overviewTesting overview
Designated Task will be put in the Task queue in the PC component targeted to a specific mobile device that is included in out test.
The mobile device should pull the given task file, execute it, and send back the results to the PC component.
After all results have arrived to the PC component we’ll examine them to their correctness.
We’ll perform this test several times, then use statistics engine to check if they it computes & analyze them correctly.
Integration Testing (All)Integration Testing (All)
Flash ProjectFlash Project
Task ListTask List
Brief OverviewBrief Overview
Tasks ListTasks List
Task ID1
Task NameBrowsers Research
Estimated Start Date16/10/2006Actual Start Date16/10/2006
Estimated End Date31/10/2006Actual End Date31/10/2006
Brief DescriptionResearch of Open Source / Free browsers for supported platforms.
Sub Tasks1.1. Symbian OS browsers research1.2. Windows Mobile browsers research
Tasks ListTasks List
Task ID2
Task NameProof of Concept
Estimated Start Date31/10/2006Actual Start Date05/11/2006
Estimated End Date05/12/2006Actual End Date05/12/2006
Brief DescriptionImplement small program proving it is possible to take control over the browser and “catch” its events per need
Sub Tasks2.1. Symbian OS platform.2.2. Windows Mobile platform.
Tasks ListTasks List
Task ID3
Task NameMySQL Database Design and Implementation
Estimated Start Date06/12/2006Actual Start Date06/12/2006
Estimated End Date09/12/2006Actual End Date10/12/2006
Brief DescriptionDesign database scheme according to the application needs.
Sub TasksN/A
Tasks ListTasks List
Task ID4
Task NamePC Component Data Layer Design & Implementation
Estimated Start Date10/12/2006Actual Start Date12/12/2006
Estimated End Date20/12/2006Actual End Date21/12/2006
Brief DescriptionDesign of basic data classes ( e. g. SubTask, Task, Test, ResultChunk etc. )
Sub TasksN/A
Tasks ListTasks List
Task ID5
Task NameDefining Tests
Estimated Start Date20/12/2006Actual Start Date20/12/2006
Estimated End Date30/12/2006Actual End Date30/12/2006
Brief DescriptionDefine tests that should be implemented ( e. g. measuring website loading time, bytes received/transmitted, links count etc.)
Sub TasksN/A
Tasks ListTasks List
Task ID6
Task NameMobile Component Prototype implementation
Estimated Start Date30/12/2006Actual Start Date03/01/2007
Estimated End Date12/03/2007Actual End Date-
Brief DescriptionDesign and implement mobile-side application that should be able to perform most of functional requirements.
Sub Tasks
6.1. Symbian OS ( Nokia ) component implementation- XMLHandler implementation- Communicator implementation- Test Execution implementation
6.2. Windows Mobile component implementation- XMLHandler implementation- Communicator implementation- Test Execution implementation
Tasks ListTasks List
Task ID7
Task NameWeb Server Prototype
Estimated Start Date15/02/2007Actual Start Date20/02/2007
Estimated End Date02/03/2007Actual End Date07/03/2007
Brief DescriptionDesign and implement web server that should accept connections, upload/download results/tasks to/from Mobile devices.
Sub Tasks7.1. Install and configure working environment ( Apache web
server with PHP & MySQL support ).7.2. Implement functionality.
Tasks ListTasks List
Task ID8
Task NameWeb Server GUI Design & Implementation
Estimated Start Date13/03/2007Actual Start Date-
Estimated End Date15/04/2007Actual End Date-
Brief DescriptionWeb server complete implementation.
Sub TasksN/A
Tasks ListTasks List
Task ID9
Task NameSystem Integration
Estimated Start Date15/04/2007Actual Start Date-
Estimated End Date15/05/2007Actual End Date-
Brief DescriptionIntegration of the mobile components with PC component + database integration.
Sub Tasks9.1. Symbian Component integration.9.2. Windows Mobile Component integration.
Tasks ListTasks List
Task ID10
Task NameSystem Testing/Debugging
Estimated Start Date15/05/2007Actual Start Date-
Estimated End Date06/06/2007Actual End Date-
Brief DescriptionIntegration of the mobile components with PC component + database integration.
Sub Tasks9.1. Symbian Component integration.9.2. Windows Mobile Component integration.
Flash ProjectFlash Project
Flash ProjectFlash Project
BACKUPBACKUP
Complete TaskListComplete TaskList
PC Component – Main Classes DescriptionDB Facade•Acts like a gate to all accesses to PC component DB.•Use to perform queries on DB, as well as to store new data into it.
Task Manager•Handles all missions related to designating new tasks & taking care of existing ‘live’ tasks•Taking care of creating new task templates.•Contains tasks queue in which it enqueues new designated tasks to be dequeued later by one of the mobile devices.•Manages all task statuses: enqueue, pause, cancel, etc. •Communicates with the mobile devices, sends tasks, receives acknowledges for sent items.
Result Manager•Handles the result chunks received from the mobile devices. •Gathers result chunks to task result and save that result to the DB•Sends acknowledgment for each received chunk back to the mobile device.
Task Designation GUI•Receives inputs from the user regarding the content of the new designated task.•Sends the received information to the business logic layer in order to process the request.•Previews the new designated task
PDA Component – Main Classes Description
PDAXMLHandler•Should parse Task file and create tests to execute•Should encode to progress file to be sent to PC component
PDATestExecutor•Within given tests list, should execute them one by one using WebControlOperator •and save progress/final results to xml result file.
PDAWebControl•Internet Explorer Mobile Browser Control used to navigate and fire events.
PDAWebControlOperator•Uses WebControl )via IEMobile API( in order to perform navigation to requested •URLs, catches WebControls fired events and reacts accordingly.
PDACommunicator•Will handle all network related missions: dial up, hang up, file transmissions, task puller, etc.
PDAppGUI•GUI for representation
Symbian ClassesSymbian Classes
CBrCtlSampleAppContainer
Contains all the web browser observers
Embeds the web browser view into the GUI.
CBrCtlSampleAppLoadEventObserver
Observer that handles load events of the web browser.
Handles: • start of URL loading
• end of loading a URL
Symbian ClassesSymbian Classes
BrowserBridge
Bridges )Bridge Design pattern( between the browser control
and the outer application.
XMLParser
Parses the task files that are received from the PC component.
Parses HTML documents.
Manipulates and creates result files.
Symbian ClassesSymbian Classes
Communicator
uses HTTP Request commands.
• Retrieves the task files.
• Sends result files
• Performs many of the tests of the given tasks
– Such as: error detection, number of images, links, etc…
System RequirementsSystem Requirements
Application Language
• English
Two types of mobile components
• Symbian and Windows mobile 5 based
Test Results
• Graphically displayed
Non Functional RequirementsNon Functional Requirements
PDA ComponentPDA ComponentU
I Overv
iew
UI O
verv
iew
Testing overviewTesting overview
Speed – We’ll put heavy tasks in the task queue, and see if there’s a time out of 5 minutes for task running period.
Capacity
• Connection will be made to the web server simultaneously from 2 different clients, to see if it reacts properly.
• We’ll use up to 10 different mobile devices, put tasks for all of them, and see if the web server can handle all of them successfully.
Availability & Stability – We’ll operate our system for 72 hours continuously to verfiy it’s stability.
Testing Non-Functional Req.Testing Non-Functional Req.