XML usage guide

Intro

BETA is capable of generating and organizing its test cases into a XML file. The main reason for this XML version of a test suite is to help developers who want to implement the test cases generated by BETA using a programming language that is not supported by the tool. A developer can write code that read the test cases on the XML file and translates it to concrete test code on a programming language of their choice. Here we will explain each section of our XML test suite representation using the tests generated for the Player machine from Schneider’s book. The generated XML file can be downloaded here

Machine information

Before the test cases the XML will present some general information about the machine and the test strategy used by BETA to generate this particular test suite.

	<machine-name>Player</machine-name>
	<machine-invariant>
		<invariant-clause>card(team) = 11</invariant-clause>
		<invariant-clause>team &lt;: PLAYER</invariant-clause>
	</machine-invariant>
	<operation-under-test>substitute</operation-under-test>
	<partition-strategy>Boundary Values</partition-strategy>
	<combinatorial-criteria>All-Combinations</combinatorial-criteria>
	<oracle-strategy>
		<state-variables>true</state-variables>
		<return-variables>true</return-variables>
		<invariant-ok>true</invariant-ok>
	</oracle-strategy>


In this section you will find the following nodes:

Test Case information

After this basic information you will find the <test-cases> node. This node has many <test-case> nodes as children, each one of this nodes represent a test case of our test suite. Here is an example of <test-case>:

	<test-case>
	<id>1</id>
	<formula>not(pp : team) &amp; team &lt;: PLAYER ...</formula>
	<state-variables>
		<variable>
			<identifier>team</identifier>
			<values>
				<value>PLAYER1</value>
				<value>PLAYER2</value>
				<value>PLAYER3</value>
				<value>PLAYER4</value>
				<value>PLAYER5</value>
				<value>PLAYER6</value>
				<value>PLAYER7</value>
				<value>PLAYER8</value>
				<value>PLAYER9</value>
				<value>PLAYER10</value>
				<value>PLAYER11</value>
			</values>
		</variable>
	</state-variables>
	<operation-parameters>
		<parameter>
			<identifier>rr</identifier>
			<values>
				<value>PLAYER12</value>
			</values>
		</parameter>
		<parameter>
			<identifier>pp</identifier>
			<values>
				<value>PLAYER12</value>
			</values>
		</parameter>
	</operation-parameters>
	<return-variables/>
	</test-case>


Each <test-case> has the following sections: