summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/systemtests/sys_SensorElements/sys_declarative-sensor-elements.qtt50
1 files changed, 38 insertions, 12 deletions
diff --git a/tests/systemtests/sys_SensorElements/sys_declarative-sensor-elements.qtt b/tests/systemtests/sys_SensorElements/sys_declarative-sensor-elements.qtt
index 0f60cf52..1594fbf0 100644
--- a/tests/systemtests/sys_SensorElements/sys_declarative-sensor-elements.qtt
+++ b/tests/systemtests/sys_SensorElements/sys_declarative-sensor-elements.qtt
@@ -38,22 +38,43 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+include("product.qtx")
+include("extrafunctions.qtt")
//TESTED_COMPONENT=src/sensors
testcase = {
+
+init: function() {
+ qtuitest.checkActiveWindow = false;
+ qtuitest.autoTerminate = false;
+ wait(500);
+ unlock();
+ wait(500);
+},
+
+
+cleanup: function() {
+ print("Cleanup test function");
+ unlock();
+ wait(500);
+ Gesture.swipe(Screen.leftCenter(), Screen.rightCenter()); //close applicatin
+ wait(500);
+},
+
// As a QML Application developer I need information about the position of the device (rotation angles from X and Y Axis)
Device_Rotational_Position: function()
{
// Test meta data
testApplication = "qmlsensors2";
- testBinary = "test binary name to be announced"; // Running QML using qmlrunner will insert test app binary name when compiled
+ testBinary = "Sensors2"; // Running QML using qmlrunner will insert test app binary name when compiled
testGoal = "Verify that the values of the X and Y axis are returned from the application and match those of the actual phone";
testPreconditions = "Nil.";
testGroups = "BAT";
- // Test steps
+ // Test steps
+ mouseClick(findByProperty("label", testBinary)); wait(500);
prompt(twiki("---+++ " + testApplication + "<br><br>
*Goal:* " + testGoal + "<br>
*Pre-Requisites:* " + testPreconditions + "<br>
@@ -61,6 +82,7 @@ testcase = {
| *Step* | *Verification* |
| Launch " + testBinary + " | App launches normally |
+ | Press the *Start* button for the accelerometer | The button now displays *running* and numeric values are displayed for X and Y Rotation |
| Hold the device with the screen facing up in portrait | Verfy the x, y rotation values are approximatly 0,0 |
| Rotate the device toward you along the x axis | Verify that the x rotation values increase from zero as the device is rotated and the y values remain at approximatly 0 |
| Return the device to the screen facing up in portrait position | Verfy the x, y rotation values are approximatly 0,0 |
@@ -69,7 +91,6 @@ testcase = {
| Rotate the device to the right along the y axis | Verify that the y rotation values increase from zero as the device is rotated and the x values remain at approximatly 0 |
| Return the device to the screen facing up in portrait position | Verfy the x, y rotation values are approximatly 0,0 |
| Rotate the device to the left along the y axis | Verify that the y rotation values decrease from zero (become negitive) as the device is rotated and the x values remain at approximatly 0 |
-
"));
},
@@ -78,12 +99,13 @@ testcase = {
{
// Test meta data
testApplication = "qmlsensors2";
- testBinary = "";
+ testBinary = "Sensors2";
testGoal = "Verify that the application can be set to read an X and Y value of zero for the current phone position";
testPreconditions = "Nil.";
testGroups = "BAT";
// Test steps
+ mouseClick(findByProperty("label", testBinary)); wait(500);
prompt(twiki("---+++ " + testApplication + "<br><br>
*Goal:* " + testGoal + "<br>
*Pre-Requisites:* " + testPreconditions + "<br>
@@ -91,6 +113,7 @@ testcase = {
| *Step* | *Verification* |
| Launch " + testBinary + " | App launches normally |
+ | Press the *Start* button for the accelerometer | The button now displays *running* and numeric values are displayed for X and Y Rotation |
| Select the *Facing Up* radio button | Verify that when the device is orientated with the screen facing up the x, y rotation shows approximatly 0,0 |
| Select the *Left Up* radio button | Verify that when the device is orientated with the left up up (starting from portrait) the x, y rotation shows approximatly 0,0 |
| Select the *Top Down* radio button | Verify that when the device is orientated with the top edge down (starting from portrait) the x, y rotation shows approximatly 0,0 |
@@ -105,12 +128,13 @@ testcase = {
{
// Test meta data
testApplication = "qmlsensors2";
- testBinary = "";
+ testBinary = "Sensors2";
testGoal = "Verify that all sensor types are shown by the application";
testPreconditions = "Nil.";
testGroups = "BAT";
// Test steps
+ mouseClick(findByProperty("label", testBinary)); wait(500);
prompt(twiki("---+++ " + testApplication + "<br><br>
*Goal:* " + testGoal + "<br>
*Pre-Requisites:* " + testPreconditions + "<br>
@@ -129,12 +153,13 @@ testcase = {
{
// Test meta data
testApplication = "qmlsensors2";
- testBinary = "";
+ testBinary = "Sensors2";
testGoal = "Verify that the read values for the X and Y axis can be displayed in radians and degrees";
testPreconditions = "Nil.";
testGroups = "BAT";
// Test steps
+ mouseClick(findByProperty("label", testBinary)); wait(500);
prompt(twiki("---+++ " + testApplication + "<br><br>
*Goal:* " + testGoal + "<br>
*Pre-Requisites:* " + testPreconditions + "<br>
@@ -142,6 +167,7 @@ testcase = {
| *Step* | *Verification* |
| Launch " + testBinary + " | App launches normally |
+ | Press the *Start* button for the accelerometer | The button now displays *running* and numeric values are displayed for X and Y Rotation |
| Hold the device in portrait face up horizontal | Verify the x, y rotation values display 0,0 |
| While holding the device in this position press the button marked *degree* | Verify the button now reads *radian* and the x, y rotation values display approximatly 0,0 |
| Still holding the device in portrait tilt the device at right angles toward you (screen facing you) | Verify the x, y rotation values display approximatly 1.57,0|
@@ -154,12 +180,13 @@ testcase = {
{
// Test meta data
testApplication = "qmlsensors2";
- testBinary = "";
+ testBinary = "Sensors2";
testGoal = "Verify that the ambient light values can be read";
testPreconditions = "Nil.";
testGroups = "BAT";
// Test steps
+ mouseClick(findByProperty("label", testBinary)); wait(500);
prompt(twiki("---+++ " + testApplication + "<br><br>
*Goal:* " + testGoal + "<br>
*Pre-Requisites:* " + testPreconditions + "<br>
@@ -167,7 +194,7 @@ testcase = {
| *Step* | *Verification* |
| Launch " + testBinary + " | App launches normally |
- | Confirm that the operational status of the Ambient Light display on the program is *Running* | |
+ | Press the *Start* button for the ambient light sensor | The button now displays *running* and a value is displayed for *Ambient Light* |
| Place the device under normal room lighting | Verify that the Ambient Light is reported as *Bright* |
| Place the light sensor element under a partial shadow, i.e. by holding your hand above the device | Verify that the Ambient Light is reported as *Light*, note that the amount of shadow may need to be adjusted by moving your hand to achieve this |
| Make the shadow darker by moving your hand closer to the sensor | Verify that the Ambient Light now reads *Twilight* |
@@ -181,24 +208,23 @@ testcase = {
{
// Test meta data
testApplication = "qmlsensors2";
- testBinary = "";
+ testBinary = "Sensors2";
testGoal = "Verify that the touch screen deactivates when the proximity of the user is less than a predefined value";
testPreconditions = "Nil.";
testGroups = "BAT";
// Test steps
+ mouseClick(findByProperty("label", testBinary)); wait(500);
prompt(twiki("---+++ " + testApplication + "<br><br>
*Goal:* " + testGoal + "<br>
*Pre-Requisites:* " + testPreconditions + "<br>
*Tested Binary:* " + testBinary + "<br>
-
| *Step* | *Verification* |
| Launch " + testBinary + " | App launches normally |
- | Confirm that the operational status of the Proximity sensor display on the program is *Running* | |
+ | Press the *Start* button for the *Proximity* | The button now displays *running* and a value is displayed for *Proximity* |
| Confirm that nothing is close to the proximity detector | Verify that the Proximity reads *false* |
| Bring your hand to within 1 cm of the proximity sensor | Verify that the Proximity now reads *true* |
| Move your hand away from the proximity sensor | Verify that the Proximity now reads *false* |
"));
},
-
}