27.03.2014 Views

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

integrate the test results.<br />

• Autotest, which is a framework for automated testing.<br />

• Eucalyptus, which manages Xen nodes u sing cloud<br />

controller, node controller and so on.<br />

• Xen nodes, which makes virtual machine available by<br />

virtualization in cloud infrastructure.<br />

A. Test_Manager<br />

T est_Manager is a module developed using Web<br />

framework Django. It is the control center of AT-Cloud, which<br />

manages the communication among the Web, Eucalyptus and<br />

Autotest. The functions of Test_Manager are as follows:<br />

1) Receives the test task, configuration file and test scene<br />

flow graph from tester. The test task includes test source code,<br />

test scripts based on test scene flow graph. The configuration<br />

file describes the hardware and software environment<br />

requirement of a test task.<br />

2) Analyzes test scene flow graph and finds parallel paths<br />

according to the prime path coverage criterion.<br />

3) Transfers emi-id, unique ID of the registered machine<br />

software image on the cloud, to the cloud controller.<br />

4) Registers virtual machines to Autotest Server as clients<br />

and schedules parallel test paths to run on the registered VMs.<br />

5) Collects test results produced by each test path from<br />

Autotest and integrates them together.<br />

B. Autotest<br />

A utotest is an open test framework for implementing<br />

automated test. The test procedures are shown as follows:<br />

1) Autotest Server receives test source code, test scripts<br />

from Test_Manager.<br />

2) Autotest Server receives VM IP address from cloud and<br />

adds the VM IP to Autotest Server’s host list as an Autotest<br />

client.<br />

3) Scheduled by Test_Manager, Autotest Server creates test<br />

job and run test job on Autotest client.<br />

4) Autotest Server saves test results for every test.<br />

C. Eucalyptus<br />

A T-Cloud deploys virtual machine resource using<br />

Eucalyptus, which comprised five components: Cloud<br />

Controller, Walrus, Cluster Controller, Storage Controller, and<br />

Node Controller. The procedures of providing virtual machine<br />

resources VMs are as follows:<br />

1) The cloud controller receives emi-id from Test_Manager.<br />

2) According to the emi-id, Eucalyptus chooses or launches<br />

an instance of VMs.<br />

3) After creating an VM instance, Eucalyptus assigns the<br />

instance an IP address, and this IP address will be transmitted<br />

to Autotest Server by Test_Manager.<br />

D. Xen<br />

AT-Cloud uses Xen as virtualization software. Xen is a<br />

virtual-machine monitor providing services that allow multiple<br />

computer operating systems to execute on the same computer<br />

hardware concurrently [7].<br />

III. FINDING PARALLEL TEST PAHTS<br />

Path test is a k ind of structure test based on program<br />

source code in white-box test, which derives test path from<br />

program graph [8]. In this paper, path test is introduced for<br />

software function testing, modeling the test scene flow based<br />

on prime path coverage criterion.<br />

A. Test Scene Flow Graph and Test Path<br />

By decomposing software functions based on the scenes of<br />

a unit test, we can design the test cases according to the test<br />

equivalence class, and use a test scene flow graph to describe<br />

the function point and their relationships, which may have a<br />

number of test paths.<br />

B. Prime Path Coverage Criterion<br />

Prime path coverage criterion has the practical advantage<br />

of finding the parallel paths and improving the test coverage.<br />

In prime path coverage, tests should tour each prime path in a<br />

test scene flow graph. Prime path coverage requires touring all<br />

subpaths of length 0 (all nodes), of length 1 (all edges), length<br />

2, 3, etc. Thus it subsumes node coverage, edge coverage and<br />

edge-pair coverage, which have a high path coverage rate [9].<br />

The following are definitions about prime path coverage<br />

criterion:<br />

1) Simple path: n i and n j are nodes in test scene flow graph<br />

G. A path form n i to n j is a simple path if no node a ppears<br />

more than once in the path, with the exception that the first<br />

and last nodes may be identical.<br />

2) Prime path: A path from n i to n j is a prime path if it is a<br />

simple path and it does not appear as a proper subpath of any<br />

other simple path.<br />

3) Prime path coverage (PPC) criterion: Test requirement<br />

contains each prime path in graph G.<br />

C. Finding Parallel Test Paths<br />

According to PPC criterion, after finding all prime paths in<br />

a graph, the parallel test paths can be obtained as follows.<br />

1. Set up a test scene flow graph G<br />

2. For path-length from 0 to the longest simple path in G,<br />

find all possible prime path<br />

If the simple path's final node in G has no outgoing<br />

edges or the simple path's node is a lready in the<br />

path and not the first node<br />

A dd the simple path to path-list<br />

Else<br />

E xtending the simple path with every node that<br />

can be reached from the final node<br />

3. If one path in the path-list is a proper sub path of another<br />

path in the path-list<br />

Re move the path from the path-list, finally all the<br />

pr ime paths will be found<br />

4. For each prime path in the path-list<br />

S tarting with the longest prime paths and extends<br />

them to the beginning and end nodes in the graph<br />

280

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!