For an interactive software, the first page may be a user 
login page. User could enter the system only when he inputs 
valid username and password. The constructed data flow graph 
for the login page is listed in figure 2. 
In figure 2, user inputs username and password through two 
textboxes. If the user’s information has been stored in the user 
table of database, the user could enter system, otherwise, a 
prompt dialog pop out to show that the values of username or 
password are wrong. 
III. GENERATION OF TEST CASE
Test case is the set of input operations or data which drive 
the tested software from one state to another state. For 
interactive software, test case usually includes a testing path 
and a set of input operations or data. Testing path is the 
execution path, input operations or data is the concrete values 
in human-machine interaction. For a specified data flow graph, 
design of test case includes two parts: testing path following 
data flows, and input data. 
A. Testing Path Generation 
For a specified function, data flow graph is constructed 
firstly. In the data flow graph, every path from data source 
node to data terminal node is testing path. 
Definition 2. Path in data flow graph could be defined as 
follows: 
a. Let m and n are two nodes in data flow graph, and there 
is a data flow from m to n, the data flow (m, n) is a path. 
b. If both p and q is a path, and tail(p)=head(q), then (p, q) 
is a path. Execution of the path (p, q) is to execute p and q 
sequentially. 
c. If both p and q is a path, tail(p)=tail(q) or 
head(p)=head(q), then (p and q) is a path. Execution of the path 
(p and q) need to execute both p and q. 
d. If both p and q is a path, tail(p)=tail(q) or 
head(p)=head(q), then (p or q) denotes two paths. Execution of 
(p or q) need to execute p or q. 
e. If both p and q is a path, tail(p)=tail(q) or 
head(p)=head(q), then (p xor q) denotes two paths. Execution 
of (p xor q) need to execute one of p and q. 
For every function, corresponding data flow graph should 
be constructed firstly. To complete a function, a path from a 
data source node to a data terminal node in the data flow graph 
should be executed. To test a function comprehensively, all the 
paths from data source nodes to data terminal nodes in the data 
flow graph should be executed. 
Definition 3. Path Coverage Criteria. For a specified 
function, test cases set T is adequate for function coverage only 
if T covers all the paths from data source nodes to data terminal 
nodes in the corresponding data flow graph G. Let PGdenotes 
the set of all paths from data source nodes to data terminal 
nodes in G, ║PG║denotes the number of the paths in PG. Let 
Path(T) denotes the set of the covered paths by T, ║Path(T)║
denotes the number of the paths in Path(T). Then, function 
coverage rate of T is defined as: 
% 100
P
) T ( Path
G
×
For example, to test the login page, the paths in the data 
flow graph of figure 2 could be described as: 
(“user”,((“username textbox” and “password textbox”) and 
“user table”),“compare”,(“system page” xor “prompt 
dialog”),“user”) 
The paths include two paths: 
a. (“user”,((“username textbox” and “password textbox”) 
and “user table”),“compare”,“system page”,“user”) 
b. (“user”,((“username textbox” and “password textbox”) 
and “user table”),“compare”,“prompt dialog”,“user”) 
Both of the two paths should be executed to test the login 
page. 
B. Testing Data Generation 
Each input data in testing path has attributes of type, 
domain and constraint. 
Data type includes: a. control information inputted through 
behavior component; b. data information inputted through 
information component. 
Data domain includes: exhaustive domain and exhaustless 
domain. Trigger event inputted through behavior component 
usually is exhaustive. For example, btn_click event triggered 
through button, item_select event triggered though list are 
exhaustive. Data inputted through information behavior usually 
is exhaustless. For example, domains of username and 
password inputted through textbox in login page are 
exhaustless. 
For exhaustless data, an exhaustive set could be determined 
based on corresponding data flow constraints and testing 
strategies. For example, for username and password, based on 
data flow constraint and equivalent partition, there are two 
types of values: one is the data existing in database, another is 
the data not existing in database. In the testing, at least one of 
data in the two types should be selected to cover user login 
page. 
IV. CONCLUSIONS
In this paper, a test case generation method for interactive 
software based on data flow graph is proposed. For an 
interactive software, to test a specified function, the data flow 
graph is abstracted firstly according its’ logic completion 
process and interface. Then, testing paths and test data could be 
abstracted based on the data flow graph. This method could test 
the function comprehensively. With this testing method, testing 
processes could be organized orderly, faults could be located 
and coverage rate could be calculated conveniently.
 
For an interactive software, the first page may be a user 
login page. User could enter the system only when he inputs 
valid username and password. The constructed data flow graph 
for the login page is listed in figure 2. 
In figure 2, user inputs username and password through two 
textboxes. If the user’s information has been stored in the user 
table of database, the user could enter system, otherwise, a 
prompt dialog pop out to show that the values of username or 
password are wrong. 
III. GENERATION OF TEST CASE
Test case is the set of input operations or data which drive 
the tested software from one state to another state. For 
interactive software, test case usually includes a testing path 
and a set of input operations or data. Testing path is the 
execution path, input operations or data is the concrete values 
in human-machine interaction. For a specified data flow graph, 
design of test case includes two parts: testing path following 
data flows, and input data. 
A. Testing Path Generation 
For a specified function, data flow graph is constructed 
firstly. In the data flow graph, every path from data source 
node to data terminal node is testing path. 
Definition 2. Path in data flow graph could be defined as 
follows: 
a. Let m and n are two nodes in data flow graph, and there 
is a data flow from m to n, the data flow (m, n) is a path. 
b. If both p and q is a path, and tail(p)=head(q), then (p, q) 
is a path. Execution of the path (p, q) is to execute p and q 
sequentially. 
c. If both p and q is a path, tail(p)=tail(q) or 
head(p)=head(q), then (p and q) is a path. Execution of the path 
(p and q) need to execute both p and q. 
d. If both p and q is a path, tail(p)=tail(q) or 
head(p)=head(q), then (p or q) denotes two paths. Execution of 
(p or q) need to execute p or q. 
e. If both p and q is a path, tail(p)=tail(q) or 
head(p)=head(q), then (p xor q) denotes two paths. Execution 
of (p xor q) need to execute one of p and q. 
For every function, corresponding data flow graph should 
be constructed firstly. To complete a function, a path from a 
data source node to a data terminal node in the data flow graph 
should be executed. To test a function comprehensively, all the 
paths from data source nodes to data terminal nodes in the data 
flow graph should be executed. 
Definition 3. Path Coverage Criteria. For a specified 
function, test cases set T is adequate for function coverage only 
if T covers all the paths from data source nodes to data terminal 
nodes in the corresponding data flow graph G. Let PGdenotes 
the set of all paths from data source nodes to data terminal 
nodes in G, ║PG║denotes the number of the paths in PG. Let 
Path(T) denotes the set of the covered paths by T, ║Path(T)║
denotes the number of the paths in Path(T). Then, function 
coverage rate of T is defined as: 
% 100
P
) T ( Path
G
×
For example, to test the login page, the paths in the data 
flow graph of figure 2 could be described as: 
(“user”,((“username textbox” and “password textbox”) and 
“user table”),“compare”,(“system page” xor “prompt 
dialog”),“user”) 
The paths include two paths: 
a. (“user”,((“username textbox” and “password textbox”) 
and “user table”),“compare”,“system page”,“user”) 
b. (“user”,((“username textbox” and “password textbox”) 
and “user table”),“compare”,“prompt dialog”,“user”) 
Both of the two paths should be executed to test the login 
page. 
B. Testing Data Generation 
Each input data in testing path has attributes of type, 
domain and constraint. 
Data type includes: a. control information inputted through 
behavior component; b. data information inputted through 
information component. 
Data domain includes: exhaustive domain and exhaustless 
domain. Trigger event inputted through behavior component 
usually is exhaustive. For example, btn_click event triggered 
through button, item_select event triggered though list are 
exhaustive. Data inputted through information behavior usually 
is exhaustless. For example, domains of username and 
password inputted through textbox in login page are 
exhaustless. 
For exhaustless data, an exhaustive set could be determined 
based on corresponding data flow constraints and testing 
strategies. For example, for username and password, based on 
data flow constraint and equivalent partition, there are two 
types of values: one is the data existing in database, another is 
the data not existing in database. In the testing, at least one of 
data in the two types should be selected to cover user login 
page. 
IV. CONCLUSIONS
In this paper, a test case generation method for interactive 
software based on data flow graph is proposed. For an 
interactive software, to test a specified function, the data flow 
graph is abstracted firstly according its’ logic completion 
process and interface. Then, testing paths and test data could be 
abstracted based on the data flow graph. This method could test 
the function comprehensively. With this testing method, testing 
processes could be organized orderly, faults could be located 
and coverage rate could be calculated conveniently.
การแปล กรุณารอสักครู่..

 
 
เป็นซอฟต์แวร์แบบโต้ตอบ , หน้าแรกอาจมีผู้ใช้ 
 เข้าสู่ระบบหน้า ผู้ใช้สามารถเข้าระบบเท่านั้น เมื่อเขาป้อนชื่อผู้ใช้ที่ถูกต้องและรหัสผ่าน 
 . การสร้างข้อมูลการไหลของกราฟ 
 สำหรับเข้าสู่ระบบหน้าถูกแสดงในรูปที่ 2 
 รูปที่ 2 ผู้ใช้ป้อนชื่อผู้ใช้และรหัสผ่านผ่านสอง textboxes 
 . ถ้าข้อมูลของผู้ใช้ได้ถูกเก็บไว้ในผู้ใช้ 
 ตารางของฐานข้อมูล ผู้ใช้สามารถเข้าระบบมิฉะนั้น 
 กล่องพร้อมปรากฏออกมาแสดงให้เห็นว่าค่าของชื่อผู้ใช้หรือ 
 รหัสผ่านผิด 
 3 
 สร้างกรณีทดสอบกรณีทดสอบเป็นชุดของการดำเนินการป้อนข้อมูลหรือข้อมูลที่ไดรฟ์ 
 การทดสอบซอฟต์แวร์จากสถานะหนึ่งไปยังอีกสถานะ . สำหรับ 
 ซอฟต์แวร์โต้ตอบกรณีทดสอบมักจะมีการทดสอบเส้นทาง 
 และชุดของการป้อนข้อมูลหรือข้อมูล เส้นทางทดสอบคือ 
 ปฏิบัติการทางการป้อนข้อมูลหรือข้อมูล คือ ค่าคอนกรีต 
 - ในการโต้ตอบ . เพื่อระบุข้อมูลการไหลของกราฟ 
 การออกแบบกรณีทดสอบการทดสอบประกอบด้วยสองส่วน : เส้นทางต่อไปนี้ 
 การไหลของข้อมูลและข้อมูล . 
 a การทดสอบทางรุ่น 
 สำหรับฟังก์ชันที่กำหนด กราฟการไหลของข้อมูลจะถูกสร้างขึ้น 
 ตอนแรก ในการไหลของข้อมูลจากแหล่งข้อมูลกราฟทุกเส้นทางไปยังโหนดปลายทางข้อมูล 
 โหนดทดสอบเส้นทาง
 นิยาม 2 เส้นทางในกราฟการไหลของข้อมูลจะถูกกำหนดเป็น 
 
 a . ให้ 1 M และ N สองโหนดในกราฟการไหลของข้อมูล และมีการไหลของข้อมูลจาก 
 เป็น M กับ N , การไหลของข้อมูล ( m , n ) เป็นเส้นทาง 
 b . ถ้าทั้ง P และ Q เป็นเส้นทาง และหาง ( P ) = หัว ( Q ) แล้ว ( p , q ) 
 เป็นเส้นทาง การดำเนินการของเส้นทาง ( p , q ) คือ P และ Q 
 รันตามลำดับ . 
 C . ถ้าทั้ง P และ Q เป็นเส้นทางหาง ( p ) = 
 ( Q ) หรือ หางหัว ( P ) = หัว ( Q ) แล้ว ( P และ Q ) เป็นเส้นทาง การดำเนินการของเส้นทาง 
 ( P และ Q ) ต้องดำเนินการทั้ง P และ Q . 
 d ถ้าทั้ง P และ Q เป็นเส้นทางหาง ( P ) = หาง ( Q ) 
 ( P ) = หัวหรือหัว ( Q ) แล้ว ( P หรือ Q ) แสดงถึงสองเส้นทาง การประหารชีวิต 
 ( P หรือ A ) ต้องรัน P หรือ Q . 
 E . ถ้าทั้ง P และ Q เป็นเส้นทางหาง ( P ) = หาง ( Q ) 
 ( P ) = หัวหรือหัว ( Q ) แล้ว ( P XOR Q ) แสดงถึงสองเส้นทาง ประหาร 
( P XOR q ) ต้องรันหนึ่งของ P และ Q . 
 สำหรับทุกฟังก์ชัน กราฟการไหลของข้อมูลที่เกี่ยวข้องควรจะ 
 ถูกสร้างขึ้นก่อน ให้เสร็จสมบูรณ์ฟังก์ชัน เส้นทางจากโหนดเพื่อ 
 แหล่งข้อมูล terminal ข้อมูลโหนดในกราฟการไหลของข้อมูล 
 ควรถูกประหารชีวิต เพื่อทดสอบฟังก์ชันทั่วถึงทุก 
 เส้นทางจากโหนดแหล่งข้อมูลไปยังปลายทางข้อมูลโหนดในกราฟการไหลของข้อมูล 
 ควรถูกประหารชีวิต 
คำนิยาม 3 เงื่อนไขความคุ้มครองเส้นทาง สำหรับฟังก์ชันที่กำหนด 
 t ชุดกรณีทดสอบครอบคลุมเพียงพอสำหรับฟังก์ชันเฉพาะ 
 ถ้าไม่ครอบคลุมทุกเส้นทาง จากโหนดกับโหนด terminal 
 ข้อมูลแหล่งข้อมูลในที่การไหลของข้อมูลกราฟ G ให้ pgdenotes 
 ชุดทุกเส้นทางจากโหนดแหล่งข้อมูลข้อมูล terminal 
 โหนดใน G , PG ║║แสดงทศนิยมหมายเลขของเส้นทางใน PG ให้ 
เส้นทาง ( T ) หมายถึงชุดของครอบคลุมเส้นทางโดย T ║เส้นทาง ( T ) ║ 
 แสดงหมายเลขของเส้นทางในเส้นทาง ( T ) แล้วฟังก์ชัน 
 ครอบคลุมอัตรา T หมายถึง : 
 % 100 
 p 
 ) T ( เส้นทาง 
 g 
 × 
 ตัวอย่าง เพื่อทดสอบหน้าเข้าสู่ระบบ , ถนนในข้อมูล 
 ไหลกราฟรูปที่ 2 อาจจะอธิบาย : 
 ( " ผู้ใช้ " , ( " ชื่อช่อง " และ " กล่องข้อความ " และรหัสผ่าน ) 
 " ตารางผู้ใช้ " ) , " เปรียบเทียบ "( " หน้า " ระบบ XOR " โต้ตอบ " ให้ " ผู้ใช้ " ) 
 ) 
 : 
 2 เส้นทางประกอบด้วยเส้นทาง A ( " ผู้ใช้ " , ( " ชื่อ " กล่องข้อความ " และช่อง " รหัสผ่านและผู้ใช้ ) 
 " ตาราง " ) , " เปรียบเทียบ " , " หน้า " ระบบ " ผู้ใช้ " ) 
 B ( " ผู้ใช้ " , ( " ชื่อ " กล่องข้อความ " และช่อง " รหัสผ่านและผู้ใช้ ) 
 " ตาราง " ) , " เปรียบเทียบ " , " โต้ตอบ " ให้ " ผู้ใช้ " ) 
 ทั้งสองเส้นทางจะดำเนินการทดสอบระบบ 
 หน้า 
 Bทดสอบรุ่นข้อมูล 
 แต่ละข้อมูลในเส้นทางการทดสอบมีแอตทริบิวต์ของพิมพ์ 
 โดเมน จำกัด ประเภทของข้อมูลรวมถึงข้อมูลการควบคุม 
 
 . ป้อนผ่านองค์ประกอบพฤติกรรม ข้อมูล . ข้อมูลป้อนผ่าน 
 องค์ประกอบข้อมูล โดเมน : โดเมนและข้อมูลรวมถึงข้อมูล 
 
 exhaustless โดเมน ทริกเกอร์เหตุการณ์ป้อนผ่าน 
 ด้านพฤติกรรมมักจะหมดแรง .ตัวอย่างเช่น btn_click เหตุการณ์ทริกเกอร์ 
 ผ่านปุ่ม item_select เหตุการณ์ทริกเกอร์ แม้ว่ารายการจะ 
 หมดจด . ข้อมูลที่ป้อนผ่านทางพฤติกรรมข้อมูลมักจะเป็น exhaustless 
 . ตัวอย่างเช่นโดเมนของชื่อผู้ใช้และรหัสผ่านในช่องป้อนผ่าน 
 
 หน้าเข้าสู่ระบบจะ exhaustless . 
 ข้อมูล exhaustless , ชุดสมบูรณ์ อาจจะตัดสินใจ 
ขึ้นอยู่กับข้อจำกัดของข้อมูลที่สอดคล้องกันและการทดสอบ 
 กลยุทธ์ เช่น ชื่อผู้ใช้และรหัสผ่านตาม 
 ข้อจำกัดข้อมูลและเทียบเท่ากั้น มีอยู่สองชนิดของค่า 
 : หนึ่งคือข้อมูลที่มีอยู่ในฐานข้อมูลอื่น 
 ข้อมูลไม่ได้ที่มีอยู่ในฐานข้อมูล ในการทดสอบอย่างน้อยหนึ่ง 
 ข้อมูลใน 2 ประเภท ควรเลือกให้คลุมหน้าเข้าสู่ระบบ 
 ผู้ใช้ 
 IVสรุป 
 ในกระดาษนี้เป็นวิธีการสร้างกรณีทดสอบซอฟต์แวร์แบบโต้ตอบ 
 ตามกราฟแสดงการไหลของข้อมูลที่นำเสนอ สำหรับ 
 ซอฟต์แวร์เชิงโต้ตอบเพื่อทดสอบฟังก์ชั่นที่ระบุไว้ , การไหล 
 ข้อมูลกราฟจะใจลอยประการแรกตามตรรกะของ ' เสร็จ 
 กระบวนการและอินเตอร์เฟซ งั้น เส้นทางการทดสอบและข้อมูลการทดสอบจะขึ้นอยู่กับการไหลของข้อมูล 
 สรุปกราฟ วิธีนี้สามารถทดสอบ 
ฟังก์ชันทั่วถึง ด้วยวิธีการทดสอบนี้ กระบวนการทดสอบ 
 อาจจะจัดเป็นระเบียบ ความผิดพลาดอาจจะตั้งอยู่และสามารถคำนวณอัตรา 
 ความสะดวก
การแปล กรุณารอสักครู่..
