summaryrefslogtreecommitdiffstats
path: root/tests/systemtests/radio/sys_radio.qtt
blob: 81e911c2db9fa4fd39fdebfeef870ef6b354957b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies).
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:GPL-EXCEPT$
** 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 The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/

//TESTED_COMPONENT=src/multimedia

testcase = {

/* Notes
Ensure radio reception is available in testing area
Most tier 1 platforms require a radio module
A device specific headset is required to be connected to device for radio testing
*/

    initTestCase: function()
    {
    },

    play_a_radio_transmission: function()
    {
        // Test meta data
        testTitle = "Multimedia - Play Radio Transmission";
        testBinary = "radio";
        testSource ="qt5/qtmultimedia/examples/radio"
        testGoal = "Verify that radio stations can be played.";
        testPreconditions = "1. Radio reception should be available in the test area.<br>2. Device must have a suppported radio module.";
        testGroups = "BAT, 1.2";

        // Test steps
        prompt(twiki("---+++ " + testTitle + "<br><br>
            *Goal:* " + testGoal + "<br>
            *Pre-Requisites:* " + testPreconditions + "<br>
            *Tested Binary:* " + testBinary + "<br>

           | *Step* | *Verification* |
           | Launch " + testBinary + " | App launches normally |
           | | If not first time running application on image, verify that you are presented with a list of previously scanned radio stations |
           | Select a radio station from the list | Verify that the station is properly selected |
           | Select the power icon next to the station name | Verify that audio from the radio station is now heard through the headphones |
           | Deselect the power icon next to the station name | Verify that audio from the radio station is no longer heard through the headphones |
           | Exit the radio application | Verify that the radio application closes cleanly |
         "));
    },

    change_a_radio_station: function()
    {
        // Test meta data
        testTitle = "Multimedia - Radio: Change radio station";
        testBinary = "radio";
        testSource ="qt5/qtmultimedia/examples/radio"
        testGoal = "Verify that radio station can be changed from station playlist.";
        testPreconditions = "1. Radio reception should be available in the test area.<br>2. Wired headphones act as an antenna to the device and must be connected.";
        testGroups = "BAT, 1.2";

    // Test steps
        prompt(twiki("---+++ " + testTitle + "<br><br>
            *Goal:* " + testGoal + "<br>
            *Pre-Requisites:* " + testPreconditions + "<br>
            *Tested Binary:* " + testBinary + "<br>

           | *Step* | *Verification* |
           | Launch " + testBinary + " | App launches normally |
           | Select a radio station from the list | Verify that the station is heard through the headphones |
           | If in the visualization view, select the down icon to return to the station selection view | Verify that you are presented with the list of stations |
           | Select a different station | Verify that you are now listening to a different radio station |
           | Deselect the power icon next to the station name | Verify that audio from the radio station is no longer heard through the headphones |
           | Exit the radio application | Verify that the radio application closes cleanly |
         "));
    },

    manually_tune_radio_station: function()
    {
        // Test meta data
        testTitle = "Multimedia - Manually tune radio station";
        testBinary = "radio";
        testSource ="qt5/qtmultimedia/examples/radio"
        testGoal = "Verify that user can manually change radio station.";
        testPreconditions = "1. Radio reception should be available in the test area.<br>2. Wired headphones act as an antenna to the device and must be connected.";
        testGroups = "BAT, 1.2";

    // Test steps
        prompt(twiki("---+++ " + testTitle + "<br><br>
            *Goal:* " + testGoal + "<br>
            *Pre-Requisites:* " + testPreconditions + "<br>
            *Tested Binary:* " + testBinary + "<br>


           | *Step* | *Verification* |
           | Launch " + testBinary + " | App launches normally |
           | Select a radio station from the list | Verify that the station is heard through the headphones |
           | Select the up icon to be presented to the visualization view | |
           | Select the Plus icon on the menu bar | Verify that you are presented with the frequency dial |
           | Note the current selected frequency | |
           | Select the dot indicator on the frequency dial, and move finger to right | Verify that the frequency on the indicator is now rising and that the audio has gone off the previous station |
           | Keep moving selector until a radio station is heard | Verify that the frequency of the selected station is higher than the originally selected station |
           | | Verify that the station is playing properly |
           | Select to save the selected radio station frequency | Verify that the station is saved in the radio station playlist |
           | Exit the radio application | Verify that the radio application closes cleanly |
         "));
    },

    scan_up_and_down: function()
    {
        // Test meta data
        testTitle = "Multimedia - Scan up and down the frequency";
        testBinary = "radio";
        testSource ="qt5/qtmultimedia/examples/radio"
        testGoal = "Verify that radio can scan up and down the FM frequency.";
        testPreconditions = "1. Radio reception should be available in the test area.<br>2. Wired headphones act as an antenna to the device and must be connected.";
        testGroups = "BAT, 1.2";

    // Test steps
        prompt(twiki("---+++ " + testTitle + "<br><br>
            *Goal:* " + testGoal + "<br>
            *Pre-Requisites:* " + testPreconditions + "<br>
            *Tested Binary:* " + testBinary + "<br>

           | *Step* | *Verification* |
           | Launch " + testBinary + " | App launches normally |
           | Select a radio station from the list | Verify that the station is heard through the headphones |
           | Select the up icon to be presented to the visualization view | |
           | Select the Plus icon on the menu bar | Verify that you are presented with the frequency dial |
           | Note the current selected frequency | |
           | Select the Scan Up Frequency control | Verify that application has located a new station and that the frequency displayed is of the new station |
           | | Verify that the station is playing properly |
           | Select to save the selected radio station frequency | Verify that the station is saved in the radio station playlist |
           | Select the Scan Down Frequency control | Verify that application has located the original station and that the frequency displayed is of the original station |
           | | Verify that the station is playing properly |
           | Select to save the selected radio station frequency | Verify that the station is saved in the radio station playlist |
           | Exit the radio application | Verify that the radio application closes cleanly |
         "));
    },

    scan_for_multiple_radio_stations: function()
       {
        // Test meta data
        testTitle = "Multimedia - Radio: Scan for multiple radio station";
        testBinary = "radio";
        testSource ="qt5/qtmultimedia/examples/radio"
        testGoal = "Verify that radio can scan for multiple stations at once.";
        testPreconditions = "1. Radio reception should be available in the test area.<br>2. Wired headphones act as an antenna to the device and must be connected.";
        testGroups = "BAT, 1.2";

    // Test steps
        prompt(twiki("---+++ " + testTitle + "<br><br>
            *Goal:* " + testGoal + "<br>
            *Pre-Requisites:* " + testPreconditions + "<br>
            *Tested Binary:* " + testBinary + "<br>

           | *Step* | *Verification* |
           | Launch " + testBinary + " | App launches normally |
           | On the menu, select Find new station | In the Radio Dialog Scanning view, observe the number of stations found |
           | Exit the radio application | Verify that the radio application closes cleanly |
         "));
    },

    save_radio_station_list: function()
    {
        // Test meta data
        testTitle = "Multimedia - Radio: Save station playlist";
        testBinary = "radio";
        testSource ="qt5/qtmultimedia/examples/radio"
        testGoal = "Verify that radio can save station playlist.";
        testPreconditions = "1. Radio reception should be available in the test area.<br>2. Wired headphones act as an antenna to the device and must be connected.";
        testGroups = "BAT, 1.2";

    // Test steps
        prompt(twiki("---+++ " + testTitle + "<br><br>
            *Goal:* " + testGoal + "<br>
            *Pre-Requisites:* " + testPreconditions + "<br>
            *Tested Binary:* " + testBinary + "<br>

           | *Step* | *Verification* |
           | Launch " + testBinary + " | App launches normally |
           | Select to scan for multiple stations | Verify that multiple stations have been found |
           | Select to save station playlist | |
           | Close application | Verify that the application closes |
           | Reopen " + testBinary + " | Verify that the app launches normally |
           | Go to station playlist | Verify that the stations from the previous search are listed |
           | Select various stations from playlist | Verify that radio station play properly |
           | Close application | Verify that radio application closes properly |
           "));
    },


 radio_interrupted_by_system_notification: function()
    {
        // Test meta data
        testTitle = "Multimedia - Radio interrupted by System Notification";
        testBinary = "radio";
        testSource ="$QTDIR/qtmultimediakit/examples/Radio"
        testGoal = "Verify that radio can recover audio playback from various system notifications.";
        testPreconditions = "1. Radio reception should be available in the test area.<br>2. Wired headphones act as an antenna to the device and must be connected.";
        testGroups = "BAT, 1.2";

        // Test steps
        prompt(twiki("---+++ " + testTitle + "<br><br>
            *Goal:* " + testGoal + "<br>
            *Pre-Requisites:* " + testPreconditions + "<br>
            *Tested Binary:* " + testBinary + "<br>

           | *Step* | *Verification* |
           | Launch " + testBinary + " | App launches normally |
           | Locate a strong radio station signal by scanning up/down | |
           | While on a strong and audible radio signal, evoke a system notification on device (eg: alarm notification) | Verify that the radio has muted, and after the system notification has been delivered, the radio reverts to outputting the audio signal back through the headphones |
           | While on a strong and audible radio signal, call the device | Verify that the radio has been muted, and stays muted during the duration of the call, and resumes once the call has ended  |
           | Close application | Verify that radio application closes properly |
        "));
    },

    radio_volume_control: function()
    {
     // Test meta data
     testTitle = "Multimedia - Radio Volume Control";
     testBinary = "radio";
     testGoal = "Verify that the radio volume can be controlled via volume controls.";
     testPreconditions = "1. Radio reception should be available in the test area.<br>2. Wired headphones act as an antenna to the device and must be connected.";
     testGroups = "BAT, 1.2";

     // Test steps
     prompt(twiki("---+++ " + testTitle + "<br><br>
         *Goal:* " + testGoal + "<br>
         *Pre-Requisites:* " + testPreconditions + "<br>
         *Tested Binary:* " + testBinary + "<br>

        | *Step* | *Verification* |
        | Launch " + testBinary + " | App launches normally |
        | Locate a strong radio station signal by scanning up or down the frequency | |
        | While on a strong and audible radio signal, move volume slider to the right | Verify that the audio volume of the radio station is amplified |
        | Move volume slider to the left | Verify that the audio volume is lowered |
        | Move the volume slider all the way to the left | Verify that the sound is now completely muted |
        | Return the volume to a value above 50% and click the Mute/unmute command | Verify that the audio changes from being muted to unmuted and back |
       "));
    },

 display_radio_metadata: function()
    {
     // Test meta data
     testTitle = "Multimedia - Display Radio Meta data";
     testBinary = "radio";
     testGoal = "Verify that the radio API can display properly formatted meta data.";
     testPreconditions = "1. Radio reception should be available in the test area.<br>2. Wired headphones act as an antenna to the device and must be connected.";
     testGroups = "BAT, 1.2";

     // Test steps
     prompt(twiki("---+++ " + testTitle + "<br><br>
         *Goal:* " + testGoal + "<br>
         *Pre-Requisites:* " + testPreconditions + "<br>
         *Tested Binary:* " + testBinary + "<br>

        | *Step* | *Verification* |
        | Launch " + testBinary + " | App launches normally |
        | Locate a strong radio station signal by scanning up or down the frequency | Verify that the Frequency field is populated with the correct frequency for the given radio station |
        |  | Verify that the Volume field is displaying the proper volume % |
        | Click on the Mute/Unmute command | Verify that Muted field changes from 'false' to 'true' and back  |
        |  | If applicable, confirm that the Station Name field is properly displayed |
        |  | If applicable, confirm that the Station Id field is properly displayed |
        |  | If applicable, confirm that the Program Type field is properly displayed |
        |  | If applicable, confirm that the Radio Text field is properly displayed |
       "));
    },
}