1. Testing Functional Requirements

2008
GA Scheduling - Testing Document
Ofir Cohen
Oren Goldenberg
Shay Horonchik
15/06/2008
GA Scheduling - Testing Document
Revision Control
Rev.
0.1
2
Detailed Description
Original version
Paragraph Reference
Approved by
Date
15.6.08
GA Scheduling - Testing Document
Table of Content
1.
Testing Functional Requirements.........................................................................................4
1.1.
3
Problem definition........................................................................................................... 4
2.
Testing Non-functional Requirements .................................................................................5
3.
Test-Driven Development ....................................................................................................6
4.
Random & Automatically-Generated Tests..........................................................................6
5.
Testing the User Interface ....................................................................................................6
6.
Testing Build, Integration & Deployment ...........................................................................11
6.1.
Database ........................................................................................................................ 11
6.2.
Lindo API ........................................................................................................................ 11
GA Scheduling - Testing Document
1. Testing Functional Requirements
This section describes the functional requirements testing of the application.
1.1.
Problem definition
We will define a problem which we will use during all of the next test cases:
Problem is defined as follows:
1 product with 2 jobs
2 resources – 'resource 1' and 'resource 2'
2 step with one mode each
Mode 1 Step 1 uses 'Resource 1' for 10 time units
Mode 1 Step 2 uses 'Resource 2' for 5 time units
Step 1 is precedent of step 2
See next diagram:
Product 1
Step 1
Step 2
Mode 1
Mode 1
Resource 1: 0-10
No
4
Functional
Requirement
Job 1
Job 2
Resource 2: 0-5
Description
Expected results
GA Scheduling - Testing Document
1
Create and save a
new problem
1) Open the system GUI
create the above problem using
the graphical tool
The problem should
be loaded correctly
into the database
2) Give the problem the name "test
problem"
3) press 'save problem' button
2
Selecting an existing
problem from the
database.
1) Open the problem solver tool
2) Press 'solve problem from list'
radio button
"test problem"
should appear at the
"available problems"
3) Press 'refresh' button below the
list box
3
Solving mrcps
problem using
Genetic Algorithm
1) Open the problem solver tool
2) Select an existing problem from
the database
3) Set the genetic algorithm
parameter:
a. Population size - 10
at the statistical
viewer result should
present the
following:
Best Result should
be:
25
b. Generation size - 10
4) Press the run button
4
Generate Excel file
1) Open the statistical viewer tool
2) Press the right arrow at the top
of the screen to the last solution
generated
3) Press the excel button at the
bottom of the page
Excel file should be
generated
timing result should
match the Gantt
chart at the
statistical viewer
screen
4) Select the file name
2. Testing Non-functional Requirements
This section describes the non-functional requirements testing of the application.
5
GA Scheduling - Testing Document
No
1
Requirement
Execution time
Description
Expected results
1) Open the problem
solver
The execution should be
finished in less than 10
minutes
2) Select the existing
problem "test
problem"
3) Set the genetic
algorithm parameters:
a. Population size
– 16
b. Generation
size – 34
4) Press the run button
3. Test-Driven Development
We didn’t develop our system in TDD. The main reason for not using TDD is that our very
first steps in the development process were in the logical section. This section contains
develop and implementation of the genetic algorithm. This kind of functionality (and
system) could not be written according to tests where the answer is known in advance.
Moreover, in our very first development steps our system was subjected to frequent
changes in the requirements. In such situation it is less suiting to develop in TDD
methodology.
4. Random & Automatically-Generated Tests
N/A,
The main thing we need to test is of course the genetic algorithm. For the rest of the
functional requirements there is no point for auto-generated test, a mass of tests won’t find
new bugs. For testing the genetic algorithm there is no point for automated test because we
won't be able to compare the result of a large scale problem to the optimize solution.
5. Testing the User Interface
Testing the GUI is done manually; we prepared a list of common and rare scenarios that
covers all the buttons and input boxes that appear in the GUI. We run the scenarios one by
one, and marked in the list the actual result and whether the test had passed or not. In
6
GA Scheduling - Testing Document
addition the GUI provides context sensitive help for the main sections using tool tips.
Followed is the list for the basic GUI elements tests that we run, all the other parameters
effect and usages would be covered in the user manual document.
No
GUI section
GUI element
Main window
Start new problem
button
Main window
Open Problem solver
monitor
3
Main window
Open statistical
viewer monitor
4
Problem creator
monitor
Controls section
Problem creator
monitor
Controls section
1
2
5
Description
Expected results
Press the button
Problem creator
monitor opens
Press the button
Problem solver
monitor opens
Press the button
Statistic monitor
opens
1. Press the add step button
2. Click on the canvas
1. Add two steps to the
canvas.
2. Press on add product
located in 'add products'
section.
A new step added to
the canvas on each
click.
A constrain arrow
drown from step1 to
step2.
3. Press the 'add scheduling
button'.
4. On the canvas, click on
step1 and than on step2.
6
Problem creator
monitor
Controls section
1. Press on add product
located in 'add products'
section.
2. Add three steps and
constrain arrows from
step1 to step2 and from
step1 to step3 to the
canvas.
3. Press the eraser button.
7
After clicking on
step3, the step and
the constrain arrow
to the step deleted
from the canvas.
After clicking on the
arrow from step1 to
step2 the arrow
deleted from the
canvas. The canvas
should contain only
step1 and step2
GA Scheduling - Testing Document
4. Click on the step3.
icons with no arrows
5. Click on the arrow from
step1 to step2
7
Problem creator
monitor
Controls section
1. Press on add product
located in 'add products'
section.
2. Add two steps and
constrain arrow from
step1 to step2 to the
canvas.
After double clicking
the step icon, mode
monitor opens. After
double clicking the
arrow constraint
properties window
opens.
3. Press the 'select button'
4. Double click step1 icon on
the canvas
5. Double click the arrow on
the canvas
8
Problem solver
monitor
Problem source
section
1. Create the test problem
described above save as
test2 and load from the
problem creator monitor.
Available problems
list and selected
problems list change
to disable mode
2. Select 'solve current'
9
Problem solver
monitor
Problem source
section
1. Select 'solve problems
from list'
2. Click on refresh
3. Add problems test and
test2 to 'selected
problems list.
4. Select test2 problem from
'selected problems list'
and click on the left arrow
10
8
Problem solver
monitor
Start/stop execution
1. Select test problem.
2. Set number of loops to 5
All the problems
from the database
appear on 'available
problems list' after
clicking on refresh.
Problem test2
disappears from
selected problem list
after clicking on the
left arrow.
The system start the
execution and
processing icon
appear, after each
GA Scheduling - Testing Document
from parameters section
3. Click on play button
11
Problem solver
monitor
Start/stop execution
1. Select test problem.
2. Set number of loops to 5
from parameters section
3. Click on play button
4. After one second click on
12
Statistic monitor
Overview tab
1. Execute the test problem.
2. Open the statistic monitor
after execution done.
3. Click on right arrow to
change to the last run
statistic
13
Statistic monitor
Resource to
operation tab
1. Execute the test problem.
2. Open the statistic monitor
after execution done.
3. Click on right arrow to
change to the last run
statistic
14
9
Statistic monitor
Results over
generation tab
1. Execute the test problem.
2. Open the statistic monitor
after execution done.
loop you can see the
progress bar at the
bottom filling. The
execution end and a
popup with
'execution done'
message appears.
The system start the
execution and
processing icon
appear, after the
first loop the
execution end and a
popup with
'execution was
terminated by the
user' message
appears.
Verify that all the
information
displayed matches
the input from the
problem solver
monitor (e.g.
problem title, #
iterations, selection
method, etc')
A gant chart
displaying all the
steps of each job is
displayed. For the
test problem the
total makespan
should be 25.
A graph showing the
best result for each
generation is
displayed.
GA Scheduling - Testing Document
3. Click on right arrow to
change to the last run
statistic
15
Statistic monitor
Resources workload
1. Execute the test problem.
2. Open the statistic monitor
after execution done.
3. Click on right arrow to
change to the last run
statistic
16
Statistic monitor
Solution range in
generation
1. Execute the test problem.
2. Open the statistic monitor
after execution done.
3. Click on right arrow to
change to the last run
statistic
10
A pi graph displaying
the ration between
resource 1 and
resource 2 is
displayed.
A graph showing the
range of the results
for each generation
is displayed.
GA Scheduling - Testing Document
6. Testing Build, Integration & Deployment
6.1.



Database
“MySQL” database installation - success or fail message is shown after finish the
installation.
Schema and tables definition – done with the “MySQL” GUI tool. Success or fail message
is shown after finish the definition.
If the integration is not done properly there will be a compilation error or run-time
exception in the checking programs otherwise integration finish successfully.
6.2.
Lindo API
 Check if the library "c:\lindoapi" exists.
 Check if license file exists at "c:\Lindoapi\license\lndapi40.lic"
 Open the license file , check that the content as follows:
LINDO API
Extended
4.00
1
None
Barrier
Educational
Windows
CLPC5-401064
format=0
11