This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

automated testing master control panel

I want to use the automated test function of the master control panel.

I want to test the device information service and wrote this xml script to connect to the target device and run a discovery service.

Unfortunately the script does not seem to work.

In the command prompt "waiting for result" is displayed and nothing happens.

Can you find a mistake in my xml script?

Starting test service...OK
Test started...OK
Waiting for the result...
 <test-suite description="Device Information Service">
	<!-- 
		Tests MAY be parametrized. To define a variable use the 'set' element.
		You may also inject variables from the command line with -E KEY VALUE, f.e. 'test -E EXTRA_ADDRESS 00:11:22:33:44:55 example.xml'.
	-->
	<set name="DEVICE_INFORMATION_SERVICE_UUID" value="0000180A-0000-1000-8000-00805f9b34fb" />
	<set name="MANUFACTURER_CHAR_UUID" value="00002A29-0000-1000-8000-00805f9b34fb" />
	<set name="MODEL_CHAR_UUID" value="00002A24-0000-1000-8000-00805f9b34fb" />
	<set name="HW_CHAR_UUID" value="00002A27-0000-1000-8000-00805f9b34fb" />
	<set name="FW_CHAR_UUID" value="00002A26-0000-1000-8000-00805f9b34fb" />
	<!-- <set name="EXTRA_ADDRESS" value="C5:7F:B0:8E:AA:91"	/>

	<!-- 
		Define devices to test. A Target MAY have a 'name' attribute with a user friendly name and MUST have the 'address' definition with the Bluetooth Smart device address.
		You MAY specify more than one target but at least one MUST be specified. 
	-->
	<target id="devkit_1" name="Dev Kit 1" address="${EXTRA_ADDRESS}" />
	
	<!-- 
		Define tests. Test MUST contain at least one operation elements. Each operation will be performed in order from top to bottom and a result will be logged in the output file.
		Each test and operation MAY have a 'description' attribute and a target reference. Target may be specified for the test (as a default one for every included operation) and
		for each operation inside, so you may connect to more than one device in a single test.
		All operations in the test, except Assert-Services and "DFU" may have a timeout specified using 'timeout' attribute (in milliseconds). The default timeout is 5000 milliseconds.
	-->
	<test id="basics" description="Check basic connectivity of ${EXTRA_ADDRESS}" target="devkit_1">

	
		<!-- 
			First let's connect to the device. The 'description' attribute has been omitted. The tag name will be used as the description. 
			By setting the 'timeout' attribute to 4000 ms we ensure that the connection attempt will take no longer than that.
			The 'connect' operation is followed by 1 second break to give Android some time before the next operation.
		-->
		<connect timeout="4000" />

		<!-- 
			Before we discover services let's make sure that the cache is clear. The services might have changed on the device. The 'refresh' operation must be called after the 
			device has been connected at least once (a BluetoothGatt object has been created using connectGatt(...) method).
			Actually there is not need to refresh services in this sample as the 'dfu' operation in the DFU Test (check the next test definition), which is being run prior to this, 
			does it automatically when completed.
			The 'refresh' operation is followed by 1 second break to give Android some time before the next operation as it will cause the Android-internal service discovery.
		-->
		<refresh />
		
		<!-- 
			In order to read or write something we have to discover available services. 
			The 'target' is set, but as it is the same as for the test, it could have been omitted.
			The 'description' has not been specified and therefore it's set to a default value - "Discover-Services".
		-->
		<discover-services target="devkit_1" timeout="10000" />
	</test>
	
	<run-test ref="basics" description="Basic tests for DIS">
		
	</run-test>	
</test-suite>
Related