Tik-76.115 Individual Project: Guinea Pig
$Id: architecture.html,v 2.1 1996/04/22 14:17:33 hynde Exp $
Test Logic - Architecture
The Test Logic is implemented in
Python
using an object oriented approach to hide as much of the raw
communication events behind objects as possible. After the
initialization phase Test Logic is an event driven system driven by
the packets it receives through its communication channels. It also
contains the code to do decisions that are needed when the test is in
progress. For example, in the audiometry test it will be responsible
for the selection of the playing parameters for the sample to be
played next based on the testee responses.
Most of the test logic is implemented in two python modules.
Module gpTestLogic defines the
test subject information and the
test object which controls the whole test
procedure. Module
gpTestItems defines the
test item classes. In addition, there is the
gpTestAnalysis module which is
closely related to gpTest objects and is used in
result
prosessing.
In addition the following modules are used:
gpSoundPlayer
module for controlling the
SoundPlayer,
Testee UI modules,
config_parser and file_parser for reading files, and
various standard puthon modules.
1 · Classes and objects
1.1 · Test subject information
The objects of class
gpTestSubject
contain information about the test subject (elsewhere referred as
testee). The object contains the information specified in the
personal_info.
It also contains information about the
results file,
such as the filename and the file object of the logfile when it is
open.
1.2 · The Test object
When the logic module starts, a new instance of the
gpTest
class is created. This test object
contains the information needed to perform the test. The parameters of
the test are read from the
test.config
file. The information contained in the test object such tidbits as:
samples, configuration information, the
sound player object,
GUIserver and the
test items.
The test is performed by calling the appropiate methods of the
test object.
1.3 · The Test item objects
The class
gpTestItem
is the base class for the different test item types. Generally each
test type (such as A/B, A/B/C, etc.) will have a derived class that
handles one item of that test type. In the A/B test one item is such
that it plays a pair of samples and then waits for the subject's
answer.
Information contained in the base class includes things such as:
ID of the test item, samples used in that item,
the answer the subject gave, etc.
2 · Operation
When the
test program is started it first
creates a new test object (class
gpTest).
Then the test object's methods are used to load the test configuration
information. Then the samples are loaded (after connecting to the
player program), test items are created from the information in the
items list and the connection to the GUI server is established.
When all necessary information is loaded the test may begin. First the
most comfortable listening level is set by the subject (or a
predefined value is used if the subject is not allowed to set the
level). Next the test item sequence is run one item at a time and
finally the results are logged in the results file.
·
Test Logic Index
·
Document index
·
Guinea Pig
·