/**************************************************************************** ** ** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Mobility Components. ** ** $QT_BEGIN_LICENSE:LGPL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and Digia. For licensing terms and ** conditions see http://qt.digia.com/licensing. For further information ** use the contact form at http://qt.digia.com/contact-us. ** ** GNU Lesser General Public License Usage ** Alternatively, this file may be used under the terms of the GNU Lesser ** General Public License version 2.1 as published by the Free Software ** Foundation and appearing in the file LICENSE.LGPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU Lesser General Public License version 2.1 requirements ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. ** ** In addition, as a special exception, Digia gives you certain additional ** rights. These rights are described in the Digia Qt LGPL Exception ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 3.0 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. Please review the following information to ** ensure the GNU General Public License version 3.0 requirements will be ** met: http://www.gnu.org/copyleft/gpl.html. ** ** ** $QT_END_LICENSE$ ** ****************************************************************************/ //TESTED_COMPONENT=src/sensors testcase = { // The user opens a list of available sensor types and then selects one sensor. MTMW-98 - QML API: Sensor instance item available_sensor_types : function() { // Test meta data testTitle = "Sensors - Available sensor type"; testBinary = ""; testGoal = "Verify that list of sensor types and open one sensor"; testPreconditions = "None"; testGroups = " "; testRequirements = ""; // Test steps skip('Not implimented yet', SkipAll); }, // The user chooses a sensor and views available data. // MTMW-96 - QML API: xReading class // MTMW-95 - QML API: meta-data // MTMW-97 - QML API: reading properties wiew_sensor_data : function() { // Test meta data testTitle = "Sensors - View sensor data"; testBinary = ""; testGoal = "Verify that available data can be viewed"; testPreconditions = "None"; testGroups = " "; testRequirements = ""; // Test steps skip('Not implimented yet', SkipAll); }, // The user changes the values of the sensors such as sample rate etc. // MTMW-73 - C++ API: sensor control stuff change_sensor_values : function() { // Test meta data testTitle = "Sensors - Change sensor values"; testBinary = ""; testGoal = "Verify that sensor values can be changed"; testPreconditions = "None"; testGroups = " "; testRequirements = ""; // Test steps skip('Not implimented yet', SkipAll); }, // The user uses a QML sensor application which accepts sensor data at 100 samples per second // and a QML refresh rate of 60 Hz without noticing any UI stutter. // MTMW-93 - QML API: buffering sensor_performance : function() { // Test meta data testTitle = "Sensors - Sensor performance"; testBinary = ""; testGoal = "Verify sensor buffering"; testPreconditions = "None"; testGroups = " "; testRequirements = ""; // Test steps skip('Not implimented yet', SkipAll); }, // The user changes the orientation of the device and the application under test retains the correct // proportions and correct x, y and z orientation relative to the device. // MTMW-72 - C++ API: Sensor alignment sensor_alignment : function() { // Test meta data testTitle = "Sensors - Sensor alignment"; testBinary = ""; testGoal = "Verify sensor values align with orientation of the device"; testPreconditions = "None"; testGroups = " "; testRequirements = ""; // Test steps skip('Not implimented yet', SkipAll); }, // The user un-registers a sensor which is currently in use, the user will then receive an alert dialog confirming this. // MTMW-31 - Handle unregistering a sensor that is in use unregister_sensor : function() { // Test meta data testTitle = "Sensors - Unregister Sensor"; testBinary = ""; testGoal = "Verify unregistering a sensor which is in use"; testPreconditions = "None"; testGroups = " "; testRequirements = ""; // Test steps skip('Not implimented yet', SkipAll); }, // The user changes the sensor sample rate from the default to some other arbitrary rate. // MTMW-33 - Down-sample sensor data in the API down_sample_sensor_data : function() { // Test meta data testTitle = "Sensors - Down Sample Sensor Data"; testBinary = ""; testGoal = "Verify Down-sampling of sensor data"; testPreconditions = "None"; testGroups = " "; testRequirements = ""; // Test steps skip('Not implimented yet', SkipAll); }, // The user opens several sensors and is able to synchronize the sampling rate from the open sensors. // MTMW-32 - Synchronized sensors synchronized_sensors : function() { // Test meta data testTitle = "Sensors - Synchronized_Sensors"; testBinary = ""; testGoal = "Verify synchronization of data from several sensors"; testPreconditions = "None"; testGroups = " "; testRequirements = ""; // Test steps skip('Not implimented yet', SkipAll); }, // The user receives errors for failures in the sensor operation. // MTMW-77 - C++ API: Return error codes sensor_error_codes : function() { // Test meta data testTitle = "Sensors - Sensor Error Codes"; testBinary = ""; testGoal = "Verify display of sensor error codes"; testPreconditions = "None"; testGroups = " "; testRequirements = ""; // Test steps skip('Not implimented yet', SkipAll); }, generic_rotation: function() { // Test meta data testTitle = "Sensor - Generic Rotation"; testBinary = "Sensor Explorer"; testSource = "$MOBILITYDIR/examples/sensors/sensor_explore"; testGoal = "Verify Generic Rotation values"; testPreconditions = "None"; testGroups = " "; testRequirements = ""; // Test Steps prompt(twiki("---+++ " + testTitle + "

*Goal:* " + testGoal + "
*Pre-Requisites:* " + testPreconditions + "
*Tested Binary:* " + testBinary + "
*Requirements:* " + testRequirements + "
| *Step* | *Verification* | | Launch " + testBinary + " | Test application started successfully | | Select *generic.rotation* from the sensors list | | | In *Sensor Properties* click *Start* | | | Position device flat on its back with screen showing upwards | Verify that values for x, y and z gravitate around zero* | | Rotate device on x axis toward user | Verify that x axis value increases from 0 all the way to 90 when held straight up | | Keep rotating device past vertical position | Verify that x axis value decrees from 90 down towards to 0 when held upside down (screen towards ground) | | Return device flat on its back with screen showing upwards | Verify that value for x has returned to zero** | | Rotate device on y axis to right side | Verify that y axis value increases from 0 all the way to 90 when held straight up | | Keep rotating device past vertical position | Verify that y axis value keeps increasing from 90 towards 180 | | Rotate device on y axis until upside down - screen towards ground | Verify that y axis value gravitates around and switches between 180/-180 | | Keep rotating device on y axis past inverted horizontal | Verify that y axis value rises from -180 towards 0 | | | In this test, z values will always be 0
Small variations in value due to sensor sensitivity and large precision employed
On some Maemo5 devices, due to camera housing, device is not flat when resting on hard surface, so small variation will be present | ")); }, sym_rotation : function() { // Test meta data testTitle = "Sensor - Sym Rotation"; testBinary = "Sensor Explorer"; testSource = "$MOBILITYDIR/examples/sensors/sensor_explore"; testGoal = "Verify Sym Rotation values"; testPreconditions = "None"; testGroups = " "; testRequirements = ""; // Test Steps prompt(twiki("---+++ " + testTitle + "

*Goal:* " + testGoal + "
*Pre-Requisites:* " + testPreconditions + "
*Tested Binary:* " + testBinary + "
*Requirements:* " + testRequirements + "
| *Step* | *Verification* | | Launch " + testBinary + " | Test application started successfully | | Select *sym.rotation* from the sensors list | | | In *Sensor Properties* click *Start* | | | Position device flat on its back with screen showing upwards | Verify that values for x, y and z gravitate around zero* | | Rotate device on x axis toward user | Verify that x axis value increases from 0 all the way to 90 when held straight up | | Keep rotating device past vertical position | Verify that x axis value decrees from 90 down towards to 0 when held upside down (screen towards ground) | | Return device flat on its back with screen showing upwards | Verify that value for x has returned to zero** | | Rotate device on y axis to right side | Verify that y axis value increases from 0 all the way to 90 when held straight up | | Keep rotating device past vertical position | Verify that y axis value keeps increasing from 90 towards 180 | | Rotate device on y axis until upside down - screen towards ground | Verify that y axis value gravitates around and switches between 180/-180 | | Keep rotating device on y axis past inverted horizontal | Verify that y axis value rises from -180 towards 0 | | | In this test, z values will always be 0
Small variations in value due to sensor sensitivity and large precision employed
On some Maemo5 devices, due to camera housing, device is not flat when resting on hard surface, so small variation will be present | ")); }, sym_proximity_values: function() { // Test meta data testTitle = "Sensor - Sym Proximity"; testBinary = "Sensor Explorer"; testSource = "$MOBILITYDIR/examples/sensors/sensor_explore"; testGoal = "Verify Sym Proximity values"; testPreconditions = "None"; testGroups = " "; testRequirements = ""; // Test Steps prompt(twiki("---+++ " + testTitle + "

*Goal:* " + testGoal + "
*Pre-Requisites:* " + testPreconditions + "
*Tested Binary:* " + testBinary + "
*Requirements:* " + testRequirements + "
| *Step* | *Verification* | | Launch " + testBinary + " | Test application started successfully | | Select *sym.proximity* from the sensors list | | | In *Sensor Properties* click *Start* | Verify that the value of Index 0 is False | | With an open palm of the hand, approach the device where the proximity sensor is located | Verify that the value of Index 0 changes to True once close enough to the device | | Move hand away from device | Verify that the value of Index 0 changes to False once again one far enough from device | ")); }, sym_accelerometer: function() { // Test meta data testTitle = "Sensor - Sym Accelerometer"; testBinary = "Sensor Explorer"; testSource = "$MOBILITYDIR/examples/sensors/sensor_explore"; testGoal = "Verify Sym Accelerometer"; testPreconditions = "None"; testGroups = " "; testRequirements = ""; // Test Steps prompt(twiki("---+++ " + testTitle + "

*Goal:* " + testGoal + "
*Pre-Requisites:* " + testPreconditions + "
*Tested Binary:* " + testBinary + "
*Requirements:* " + testRequirements + "
| *Step* | *Verification* | | Launch " + testBinary + " | Test application started successfully | | Select *sym.accelerometer* from the sensors list | | | Position device flat on a suffice | | | In *Sensor Properties* click *Start* | Verify that the reading for x and y values are gravitating around zero and that z is around 9.8 | | Lift device on to its x axis | Verify that the value of x changes 0 to 9.8, and that z changes from 9.8 to 0 while y remains 0 | | Lift device on to its y axis | Verify that the value of y changes to 9.8, x changes to 0, while z remains 0 | ")); }, sym_ambient_light: function() { // Test meta data testTitle = "Sensor - Sym Ambient Light Sensor"; testBinary = "Sensor Explorer"; testSource = "$MOBILITYDIR/examples/sensors/sensor_explore"; testGoal = "Verify Sym Ambient Light Sensor"; testPreconditions = "
Hand held torch or other light source required for this test
Light sensor located at the top-left of the device"; testGroups = " "; testRequirements = ""; // Test Steps prompt(twiki("---+++ " + testTitle + "

*Goal:* " + testGoal + "
*Pre-Requisites:* " + testPreconditions + "
*Tested Binary:* " + testBinary + "
*Requirements:* " + testRequirements + "
| *Step* | *Verification* | | Launch " + testBinary + " | Test application started successfully | | Select *sym.ambientlight* from the sensors list | | | In *Sensor Properties* click *Start* | Verify that the reading for Light Level is Light | | With the thumb of the left hand, cover the light sensor on the device* | Verify that the value of Index 0 changes from Light through Twilight to Dark | | Move hand away from device | Verify that the value of Light Level changes from Dark through Twilight to Light | | Take torch and point at face of device | Verify that the value of Light Level changes from Light to Bright | | Move torch in on the light sensor | Verify that the value of Light Level changes from Bright to Sunny | | Move torch away from device | Verify that the value of Light Level changes from Sunny back to Light | ")); }, freefall_detection : function() { // Test meta data testTitle = "Sensors - Freefall Detection"; testBinary = "Small Sensors"; testSource = "$MOBILITYDIR/demos/small_screen_sensors"; testGoal = "Verify Free Fall Detection"; testPreconditions = "None"; testGroups = " "; testRequirements = ""; // Test Steps prompt(twiki("---+++ " + testTitle + "

*Goal:* " + testGoal + "
*Pre-Requisites:* " + testPreconditions + "
*Tested Binary:* " + testBinary + "
*Requirements:* " + testRequirements + "
| *Step* | *Verification* | | Launch " + testBinary + " | Test application started successfully | | Select *Free Fall* from menu | | | Click on *Setup free fall trigger* | | | Drop device from arbitrary hight (Notes:catch device before it hits the ground to preserve device integrity.) | Verify that the value of Free fall time and Hight reflect the the actual test parameters | ")); }, small_sensor_orientation : function() { // Test meta data testTitle = "Sensors - Small Sensor Orientation"; testBinary = "Small Sensors"; testSource = "$MOBILITYDIR/demos/small_screen_sensors"; testGoal = "Verify Sensor Orientation"; testPreconditions = "None"; testGroups = "BAT_MOBILITY"; testRequirements = ""; // Test Steps prompt(twiki("---+++ " + testTitle + "

*Goal:* " + testGoal + "
*Pre-Requisites:* " + testPreconditions + "
*Tested Binary:* " + testBinary + "
*Requirements:* " + testRequirements + "
| *Step* | *Verification* | | Launch " + testBinary + " | Test application started successfully | | Select *Orientation* from menu | | | Position device flat down on surface | Verify that device recognizes that it is *Face Up*, all sliders should be in middle position | | Lift device on x axis to vertical | Verify that device recognizes that it is *Top Up*, x slider should be in right position and x = 90 | | Return device to the starting position | Verify that device recognizes that it is *Face Up*, all sliders should return to the middle position and all values gravitate towards 0 | | Lift device on y axis to vertical | Verify that device recognizes that it is *Left Up*, y slider should be in right position and y = 90 | | Invert device on x axis to vertical | Verify that device recognizes that it is *Top Down*, x slider should be in left position and x = -90 | | Invert device on y axis to vertical | Verify that device recognizes that it is *Right Up*, y slider should be in left position and y = -90 | | Turn device upside down (face down) | Verify that device recognizes that it is *Face Down*, y slider should be changing from extreme right to extreme left, and y = -180/+ 180 | | Return device to the starting position | Verify that device recognizes that it is *Face Up*, all sliders should be in middle position | | | On Harmattan/Meggo devices, z will not change during this test given there is hardware support, this does not apply to Symbian devices and N900 | ")); }, small_sensor_acceleration : function() { // Test meta data testTitle = "Sensors - Small Sensor Acceleration"; testGoal = "Verify Sensor Acceleration"; testBinary = "Small Sensors"; testSource = "$MOBILITYDIR/demos/small_screen_sensors"; testPreconditions = "None"; testGroups = " "; testRequirements = ""; // Test Steps prompt(twiki("---+++ " + testTitle + "

*Goal:* " + testGoal + "
*Pre-Requisites:* " + testPreconditions + "
*Tested Binary:* " + testBinary + "
*Requirements:* " + testRequirements + "
| *Step* | *Verification* | | Launch " + testBinary + " | Test application started successfully | | Select *Acceleration* from menu | | | Position device flat on working surface | Verify the values displayed are close to: x=0, y=0, z=9.8 | | Position device flat on its y axis | Verify the values displayed are close to: x=0, y=9.8, z=0 | | Position device flat on its x axis | Verify the values displayed are close to: x=9.8, y=0, z=0 | | Position device flat on its z axis | Verify the values displayed are close to: x=0, y=0, z=9.8 | ")); }, sym_tap : function() { // Test meta data testTitle = "Sensors - Sym Tap"; testBinary = "testQtSensors"; testSource = "$MOBILITYDIR/tests/applications/sensors"; testGoal = "Verify Sym Tap Sensor"; testPreconditions = "None"; testGroups = " "; testRequirements = ""; // Test Steps prompt(twiki("---+++ " + testTitle + "

*Goal:* " + testGoal + "
*Pre-Requisites:* " + testPreconditions + "
*Tested Binary:* " + testBinary + "
*Requirements:* " + testRequirements + "
| *Step* | *Verification* | | Launch " + testBinary + " | Test application started successfully | | Click on *Sensor Browser* | | | Select *sym.tap* as sensor type || | Click on *start* button || | Select *reading properties* tab || | Double tap on the device | Verify the values displayed are changed | ")); }, sym_orientation : function() { // Test meta data testTitle = "Sensors - Sym Orientation"; testBinary = "testQtSensors"; testSource = "$MOBILITYDIR/tests/applications/sensors"; testGoal = "Verify that sym orientation"; testPreconditions = "None"; testGroups = " "; testRequirements = ""; // Test Steps prompt(twiki("---+++ " + testTitle + "

*Goal:* " + testGoal + "
*Pre-Requisites:* " + testPreconditions + "
*Tested Binary:* " + testBinary + "
*Requirements:* " + testRequirements + "
| *Step* | *Verification* | | Launch " + testBinary + " | Test application started successfully | | Click on *Sensor Browser* | | | Select *sym.orientation* as sensor type | | | Click on *start* button | | | Select *reading properties* tab | | | Slowly rotate the device | Verify the values displayed are changed accordingly | ")); }, sym_magnetoMeter : function() { // Test meta data testTitle = "sensors - sym magnetoMeter"; testBinary = "testQtSensors"; testSource = "$MOBILITYDIR/tests/applications/sensors"; testGoal = "Verify sym magnetometer sensor"; testPreconditions = "None"; testGroups = " "; testRequirements = ""; // Test Steps prompt(twiki("---+++ " + testTitle + "

*Goal:* " + testGoal + "
*Pre-Requisites:* " + testPreconditions + "
*Tested Binary:* " + testBinary + "
*Requirements:* " + testRequirements + "
| *Step* | *Verification* | | Launch " + testBinary + " | Test application started successfully | | Click on *Sensor Browser* | | | Select *sym.magnetometer* as sensor type | | | Click on *start* button | | | Select *reading properties* tab | | | Put the device closer to a iron or steel object | Verify the values displayed are changed accordingly | ")); }, sym_compass : function() { // Test meta data testTitle = "sensors - sym compass"; testBinary = "testQtSensors"; testSource = "$MOBILITYDIR/tests/applications/sensors"; testGoal = "Verify sym compass sensor"; testPreconditions = "None"; testGroups = " "; testRequirements = ""; // Test Steps prompt(twiki("---+++ " + testTitle + "

*Goal:* " + testGoal + "
*Pre-Requisites:* " + testPreconditions + "
*Tested Binary:* " + testBinary + "
*Requirements:* " + testRequirements + "
| *Step* | *Verification* | | Launch " + testBinary + " | Test application started successfully | | Click on *Sensor Browser* | | | Select *sym.compass* as sensor type | | | Click on *start* button | | | Select *reading properties* tab | | | Slowly turn the device around | Verify the values displayed are changed accordingly | ")); }, sym_lux : function() { // Test meta data testTitle = "sensors - sym lux"; testBinary = "testQtSensors"; testSource = "$MOBILITYDIR/tests/applications/sensors"; testGoal = "Verify sym lux sensor"; testPreconditions = "None"; testGroups = " "; testRequirements = ""; // Test Steps prompt(twiki("---+++ " + testTitle + "

*Goal:* " + testGoal + "
*Pre-Requisites:* " + testPreconditions + "
*Tested Binary:* " + testBinary + "
*Requirements:* " + testRequirements + "
| *Step* | *Verification* | | Launch " + testBinary + " | Test application started successfully | | Click on *Sensor Browser* | | | select *sym.luxsensor* as sensor type || | click on *start* button || | select *reading properties* tab || | change the luminance value around the device | Verify the values displayed are changed accordingly | ")); }, sym_dynamic : function() { // Test meta data testTitle = "sensors - sym dynamic"; testBinary = "testQtSensors"; testSource = "$MOBILITYDIR/tests/applications/sensors"; testGoal = "Verify sym dynamic sensor"; testPreconditions = "None"; testGroups = " "; testRequirements = ""; // Test Steps prompt(twiki("---+++ " + testTitle + "

*Goal:* " + testGoal + "
*Pre-Requisites:* " + testPreconditions + "
*Tested Binary:* " + testBinary + "
*Requirements:* " + testRequirements + "
| *Step* | *Verification* | | Register a dynamic sensor device | | | Launch " + testBinary + " | Test application started successfully | | Click on *Sensor Browser* | Verify the dynamic sensor appears in the sensor list | | Click on *start* button | | | Select *reading properties* tab | | | Change the sensor value depends on the sensor type | Verify the values displayed are changed accordingly | ")); }, sym_gyroscope : function() { // Test meta data testTitle = "sensors - sym gyroscope"; testBinary = "testQtSensors"; testSource = "$MOBILITYDIR/tests/applications/sensors"; testGoal = "Verify sym gyroscope sensor"; testPreconditions = "None"; testGroups = " "; testRequirements = ""; // Test Steps prompt(twiki("---+++ " + testTitle + "

*Goal:* " + testGoal + "
*Pre-Requisites:* " + testPreconditions + "
*Tested Binary:* " + testBinary + "
*Requirements:* " + testRequirements + "
| *Step* | *Verification* | | Launch " + testBinary + " | Test application started successfully | | Click on *Sensor Browser* | | | Select *sym.gyroscope* as sensor type | | | Click on *start* button | | | Select *reading properties* tab | | | Slowly turn and move the device around | Verify the values displayed are changed accordingly | ")); } }