internal_2_25

Download Report

Transcript internal_2_25

CS499
– Test Generation Project –
Internal Docs
This PowerPoint file is available at
http://www.ukytest.net/docs/internal_2_25.ppt
Part 1 - Database Design
Storage method: mySQL DBMS
Entity-Relationship Diagram
index
body
type
questions
category
chapter
qa
body
label
correct
answers
qb
index
books
title
Relational Schema
TABLE:
FIELD
index
title
books
DATA TYPE
INTEGER
TEXT
CONSTRAINTS
PRIMARY KEY
NOT NULL
TABLE: questions
FIELD
DATA TYPE
CONSTRAINTS
idx
INTEGER
PRIMARY KEY
body
TEXT
NOT NULL
type
ENUM
DEFAULT=0*
category VARCHAR(128)
chapter INTEGER
book
INTEGER
REFERENCES books
*the 'type' field is an enumeration:
0=not_specified, 1=multiple_choice, 2=true_false,
3=fill_blank, 4=short_answer, 5=essay
TABLE: answers
FIELD
DATA TYPE
CONSTRAINTS
body
TEXT
NOT NULL
label
CHAR(1)
correct ENUM
DEFAULT=0*
question INTEGER
REFERENCES questions
*the 'correct' field is an enumeration:
0=not_specified, 1=incorrect, 2=correct
The mySQL Server
Host: ukytest.net
Database: ukyadmin_testdata
Connecting to the server
There are many UI’s and GUI’s available for use in connecting to the server.
This will show you how to connect with the mySQL command-line shell
(mysql.exe) that is distributed with the mySQL DBMS itself. This program is similar
to SQL*Plus for Oracle.
mySQL.exe is available for download at http://www.ukytest.net/utils/mysql.zip
1)
2)
3)
In windows, open a command prompt.
cd to the folder that contains mysql.exe
Execute mysql.exe with the following syntax:
mysql.exe –hukytest.net –u<username> -p<password> -Dukyadmin_testdata
(make sure the ‘D’ is capitalized, see next page for an example)
The mySQL Server (cont.)
There are 5 usernames set up:
ukyadmin_erica
ukyadmin_kevin
ukyadmin_sameer
ukyadmin_yi
ukyadmin_user
The password is your last name (or ‘test’ for ‘ukyadmin_user’).
As an alternative to this command-line shell, one of the GUI’s available
is mySQL-Front, see http://dwam.free.fr/mysqlfront122.zip
The mySQL Server (cont.)
Here are some examples of things you can do from the mysql> prompt,
once you are logged in.
1)
Execute SQL statements/queries:
SELECT * FROM questions;
(make sure to end a statement with a semicolon)
2)
View database information:
show tables; (lists all tables in database)
describe answers; (shows schema of table, ‘answers’)
3)
Run SQL scripts:
An SQL script is a bunch of SQL statements in a text file.
You can execute the SQL in a script with backslash-period, like this:
\. sqlscriptfilename
Part 2 – Populating the
Database
Method: Parser program to convert existing data to SQL script, which
can be executed, using the mySQL shell interface.
Very crude, preliminary code:
Version 0.1 of the parser (a Java version) is available at:
http://www.ukytest.net/code/parser_java_0_1.zip
Version 0.2 of the parser (a C++ version) is available at:
http://www.ukytest.net/code/parser_cpp_0_2.zip
Version 0.2 was used to make an SQL script to test-populate the
database, using questions from Dr. Keen (only chapters 1-3 so far).
The script is available here:
http://www.ukytest.net/code/populate_1-3.zip
Part 3 – The user interface
Functionality:
The interface should allow the user to:
1) Add/Edit/Delete questions
2) Browse questions
3) Generate a test
Issues:
1) What language should it be written in?
2) What output formats should be available for test generation?
(plain text, XML, HTML?)
3) What flexibility should be available when generating tests?
Allow user to pick some, with the rest at random?
Allow a user-defined distribution? (5 from Ch3, 2 from cat “spreadsheet”)
Customer Communication
When do we need to meet with the customer again?
What will we need to prepare to show him when we do?
Unresolved issues (asked via email, but not answered):
1) Is there any more existing data that we do not have?
2) On what platform will the UI run (if Windows, what version?)
Web Page/Other Issues
1)
2)
One of the sections should list what we have done as a group
in our meetings (decisions made, questions, etc).
Our first presentation is NEXT WEEK!
Tuesday, Feb 25.