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.

D. An Example for Parallel Test Paths<br />

Fi gure 2 shows the test scene flow graph of software about<br />

automated teller machine (ATM).<br />

<br />

in User.CardId 1 error”<br />

2 1<br />

CardId=100 PS=123<br />

PS=123<br />

3<br />

2 2<br />

CardId=100 PS=123 Output=“Passwo<br />

PS123<br />

rd Error, again”<br />

8<br />

… … … … … …<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

Figure 2 An example of test scene flow graph<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

It has eight nodes and twelve edges except the start node<br />

and end node. Seven prime paths can be found:<br />

1) [1, 8]<br />

2) [1, 2, 8]<br />

3) [1, 2, 3, 4, 7, 8]<br />

4) [1, 2, 3, 5, 7, 8]<br />

5) [1, 2, 3, 6, 7, 8]<br />

6) [1, 2, 3, 6, 8]<br />

7) [6, 6]<br />

Then we get the set of test paths:<br />

1) [1, 8]<br />

2) [1, 2, 8]<br />

3) [1, 2, 3, 4, 7, 8]<br />

4) [1, 2, 3, 5, 7, 8]<br />

5) [1, 2, 3, 6, 7, 8]<br />

6) [1, 2, 3, 6, 8]<br />

7) [1, 2, 3, 6, 6, 7, 8]<br />

For each test scene, we can design the test cases from<br />

different test equivalence class and set up a symbol to indicate<br />

the next scene as TABLE I showed, which contains SceneId, a<br />

serial number assigned to a test scene; CaseId, a serial number<br />

assigned to a test case; Prerequisites describes the values of<br />

the conditions and environment variable before the test is<br />

performed; TestData are input data; ExpectedResult are<br />

outputs or activities; NextScene indicates the following scene.<br />

Test_Manager store the test case in XML document as Figure<br />

3 and analyze the XML document to generate test scripts.<br />

TABLE I. TEST SCENE AND TEST CASES<br />

SceneId CaseId Prerequisites TestData ExpectedResult NextScene<br />

100 exits in CardId Output=“Input<br />

1 1<br />

2<br />

User.CardId =100 Password”<br />

1 2 101 not exits CardId=10Output= “Card 8<br />

<br />

<br />

<br />

100 exits in User.CardId<br />

<br />

CardID=100<br />

Output=“Input Password”<br />

<br />

scene2<br />

<br />

……<br />

<br />

<br />

……<br />

<br />

……<br />

<br />

Figure 3 Test cases in XML<br />

IV. SCHEDULING PARALLEL TEST PATHS AND INTEGRATING<br />

TEST RESULTS<br />

The test paths can be dispatched on AT-Cloud and be<br />

tested in parallel, which related with scheduling test paths and<br />

integrating test results.<br />

A. Schedule Parallel Test Paths<br />

The goal of test task scheduling is to find an assignment<br />

function to dispatch the test tasks for minimizing test time.<br />

This paper considers test path length as dec ision<br />

making criteria.<br />

path-length: the number of nodes between beginning and<br />

end nodes in a test path.<br />

priority: the longer path has higher priority; the front path<br />

near the start point of the graph has higher priority.<br />

G iven a set of test paths set S = {s 1 , s 2 , ..., s m }, there is a set<br />

of VMs M in cloud, M = {m 1 , m 2 , ..., m n } and a set T for fail<br />

test paths. The schedule procedure in AT-Cloud is as follows.<br />

1) Sorting test paths<br />

If S is not empty, then sort the test paths based on path's<br />

priority in descending order.<br />

2) Choose or creating VMs<br />

I f machine set M is empty, which means VMs in AT-Cloud<br />

with the required environment for the test task is not available,<br />

notify the cloud to create a VM for the test task according to<br />

the quantity of test paths and the resource requirements. If M<br />

is not empty, choose a VM that satisfied the test requirement.<br />

3) Dispatch test paths to VMs<br />

281

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

Saved successfully!

Ooh no, something went wrong!