For the purposes of testing the complete model, the testing strategies are to be specified first. The next sections describe the behaviour testing strategy used (state graph) and then the functional testing strategies (white and black boxes).
For the purposes of testing the complete model, first the state diagram was defined to describe the behaviour of XCVQ and to implement the State Graph testing strategy (Beizer, 1990; Farrell-Vinay, 2008).
The following is the detailed description of each state of the state graph in Figure 1.
State-A: This state is the GUI of the designed model. It represents the starting state in order to deal with all the other states. This state has three outputs:
Out-1: to compress an XML document, go to state-B.
Out-2: to decompress an XML document, go to State-C. This output is true only if (Out-1) is performed at least one time.
Out-3: to write a query, go to State-D. This output is true only if (Out-1) is performed at least one time.
State-B: This state represents the process of compressing an XML document. It has two outputs:
Out-4: to decompress an XML document, go to State-C.
Out-5: to submit a query, go to State-D.
State-C: This stage represents the process of decompressing an XML document and it has two outputs:
Out-6: return to the starting state.
Out-7: submit the decompressed document to the user, go to State-I.
State-D: this is the most important state in the system which represents the query submission and checking its syntax. It has the following five outputs:
Out-8: if the submitted query has syntactical error(s), return to the same stage to resubmit another query.
Out-9: if the syntactically true query specifies the exact XML document to retrieve information from, go to Stage-E.
Out-10: if the syntactically true query does not specify the exact XML document to retrieve information from, go to Stage-F.
Out-11: take the out-of-errors query and the relevant XML document(s) as inputs to State-G.
Out-12: from this stage the user can return back to the starting state.
State-E: This state is responsible on retrieving the required XML document which specified by the query. It has only one output:
Out-13: carry the unique XML document which is specified by the query to State-D.
State-F: In the state, the set of relevant XML document is specified depending on the submitted query. This state has one output:
Out-14: carry the set of the relevant XML document(s) retrieved from the repository to State-D.
State-G: In this state, the query is processed and the required information is retrieved from the relevant XML document(s). It has three outputs:
Out-15: to ignore the current query, return to State-D.
Out-16: if more retrieval process required for the retrieved document, go to State-B to decompress the retrieved document first.
Out-18: to submit the results of the querying process to the user, go to State-I
State-H: This state returns the retrieved information as an XML document to the compressor to compress it and add it to the XML repository for further querying process and it has only one
Out-17: if the user required more querying on the retrieved information, go to State-B.
State-I: This state is the final state where the resulted document(s) are submitted to the user.