Meego Wiki
Views

Quality/TestSuite/oFono Modem API Test Specification

From MeeGo wiki
< Quality | TestSuite(Difference between revisions)
Jump to: navigation, search
(Change History)
m (Running test cases)
 
(7 intermediate revisions not shown)
Line 1: Line 1:
== Introduction ==
== Introduction ==
-
Blts-ofono package (0.1.14) is meant to test oFono framework. Currently testing is done over D-Bus as well as those test coming with oFono. Difference is that these are written with C.  
+
Blts-ofono package (0.1.17) is meant to test oFono framework. Currently testing is done over D-Bus as well as those test coming with oFono. Difference is that these are written with C.  
-
Currently supported version of oFono is 0.33.
+
Currently supported version of oFono is 0.36.
== Test Coverage ==
== Test Coverage ==
Line 56: Line 56:
* oFono - Multiparty call test: Test multiparty call case
* oFono - Multiparty call test: Test multiparty call case
* oFono - Private call test: Tests creation of private chat out of multiparty call  
* oFono - Private call test: Tests creation of private chat out of multiparty call  
 +
* oFono - Change Radio Access Technology
===  Software Coverage ===  
===  Software Coverage ===  
Current D-Bus API coverage for oFono tests:
Current D-Bus API coverage for oFono tests:
-
* [[http://gitorious.org/qa-tools/mcts-coverage/blobs/master/oFono-dbus-coverage.ods oFono-coverage-dbus.ods]]  
+
* [[http://meego.gitorious.org/meego-quality-assurance/mcts-coverage/blobs/master/oFono-dbus-coverage.ods oFono-coverage-dbus.ods]]
-
 
+
-
Current oFono AT modem API coverage for oFono tests:
+
-
* oFono-coverage-at-modem.ods
+
===  Hardware Coverage ===  
===  Hardware Coverage ===  
Line 73: Line 71:
=== Future Improvements ===
=== Future Improvements ===
-
More coverage with tests for oFono.  
+
More coverage with tests for oFono.
== Running the tests ==
== Running the tests ==
Line 209: Line 207:
NOTE: Running cases always (if --dontcleanup switch is not used) resets call forwardings and call barrings with each test case use -o switch to give blts-ofono access to do so or use configuration file. If no pin code is given then default 3579 will be used.
NOTE: Running cases always (if --dontcleanup switch is not used) resets call forwardings and call barrings with each test case use -o switch to give blts-ofono access to do so or use configuration file. If no pin code is given then default 3579 will be used.
 +
 +
NOTE: PIN codes in SIM card and values given in configuration file must match or cases may fail.
Test cases marked with '''bold''' are able to be executed with variable data. See Test cases with variables.  
Test cases marked with '''bold''' are able to be executed with variable data. See Test cases with variables.  
Line 315: Line 315:
|| oFono - Multiparty call test  ||   
|| oFono - Multiparty call test  ||   
|-
|-
-
||  oFono - Private call test  ||   
+
||  oFono - Private call test   ||
 +
|-
 +
||  oFono - Change Radio Access Technology   ||   
|}
|}
Line 385: Line 387:
|-
|-
|| 0.3 || 17-Dec-2010 || [mailto:kari.laakso@digia.com Kari Laakso] || Draft || Updates to document format and improved instructions
|| 0.3 || 17-Dec-2010 || [mailto:kari.laakso@digia.com Kari Laakso] || Draft || Updates to document format and improved instructions
-
|}
+
|-
|| 0.4 || 21-Jan-2011 || [mailto:kari.laakso@digia.com Kari Laakso] || Draft || Updates to argument switches
|| 0.4 || 21-Jan-2011 || [mailto:kari.laakso@digia.com Kari Laakso] || Draft || Updates to argument switches
 +
|-
 +
|| 0.5 || 03-Feb-2011 || [mailto:kari.laakso@digia.com Kari Laakso] || Draft || Updated version numbers and removed obsolete at modem coverage
|}
|}

Latest revision as of 13:41, 10 March 2011

Contents

Introduction

Blts-ofono package (0.1.17) is meant to test oFono framework. Currently testing is done over D-Bus as well as those test coming with oFono. Difference is that these are written with C.

Currently supported version of oFono is 0.36.

Test Coverage

The test cases are:

  • oFono - Information Query: Tries specific interfaces from modem. Phonebook, network and modem interface.
  • oFono - Register to network: Registers device in network
  • oFono - De-register from network: De-registers device from network
  • oFono - Enable modems: Enables as in powers up all modems in device
  • oFono - Set modems online: Makes modems go Online, aka turn off Flight mode
  • oFono - Set modems offline: Makes modems go Offline, aka turn on Flight mode
  • oFono - Create voicecall with hidden caller ID: Tests if call can be made with hidden ID
  • oFono - Create voicecall: Call creation test
  • oFono - Answer to voicecall and hangup: Voicecall answer test
  • oFono - Answer to voicecall and hangup all: Tests hangup all functionality
  • oFono - Answer to voicecall and wait another call: Voicecall answer and waiting state test
  • oFono - Answer to voicecall and deflect: Deflect incoming call
  • oFono - Answer to voicecall and remote hang up: Tests that remote hangup works
  • oFono - Cancel voicecall: Cancels incoming voicecall
  • oFono - Transfer: To see that you can join two calls together and leave out yourself
  • oFono - Swap: Putting calls on hold and back to active state
  • oFono - Release and answer: Answer to incoming call and disconnecting other active call
  • oFono - Hold and answer: Answer to incoming call while other call active
  • oFono - Call and send DTMF: Sends DMTF tones
  • oFono - Disable forwardings: Disables forward rules
  • oFono - Unconditional forwarding: Sets unconditional forwarding
  • oFono - Forward if busy: Sets forward rule when busy
  • oFono - Forward if no reply: Sets forward rule when no reply
  • oFono - Forward if not reachable: Sets forward rule if not reachable
  • oFono - Send SMS: Sending SMS message
  • oFono - Receive SMS: Receiving SMS
  • oFono - Change PIN: Changes SIM pin codes (pin, pin2,...)
  • oFono - Enter PIN: Enters PIN code and enables SIM if not done
  • oFono - Reset PIN: Uses PUK code to reset PIN code
  • oFono - Lock PIN: Lock specific PIN code
  • oFono - Unlock PIN: Unlocks specific PIN code
  • oFono - Set microphone volume: Microphone volume change in middle of call
  • oFono - Set speaker volume: Speaker volume change in middle of call
  • oFono - Set muted: Sets call muted in middle of call
  • oFono - Call meters read: Read call meters status
  • oFono - Call meters set: Sets call meters unit conversion, currency code and call meter maximum
  • oFono - Call meters reset: Resets all call meters to zero
  • oFono - Call meters near max warning: Creates call and waits if call meter maximum warning signal is received
  • oFono - Check barring properties: Show current barring settings
  • oFono - Disable barrings: Disables barring rules
  • oFono - Disable incoming barrings: Disables barring from incoming calls
  • oFono - Disable outgoing barrings: Disables barring from outgoing calls
  • oFono - Change password for barrings: Changes PIN code for barrings
  • oFono - Call barrings test: Tests different barring rules setting
  • oFono - List all properties: Goes thought all possible interfaces and properties that oFono has
  • oFono - Propose scan: Ask networks statuses
  • oFono - SMSC number test: Test proper SMSC number validation
  • oFono - Multiparty call test: Test multiparty call case
  • oFono - Private call test: Tests creation of private chat out of multiparty call
  • oFono - Change Radio Access Technology

Software Coverage

Current D-Bus API coverage for oFono tests:

Hardware Coverage

Blts-ofono tests oFono framework more than it tests actual hardware. Different hardware may have different modems and you must specify which modem to use with oFono by setting up oFono correctly.

Limitations

Test suite functionality depends on implementation of used modem driver in oFono. Some test cases may fail if driver implementation does not support such behaviour.

NOTE: All following installation and execution instructions for oFono and phonesim are for reference only. Later releases may work differently and it is advised to follow the installation and usage guidelines provided with both software packages as baseline for all testing.

Future Improvements

More coverage with tests for oFono.

Running the tests

Hardware setup and test environment

Setting up oFono

If test environment or device comes with oFono pre-installed, this section can be skipped.

In case oFono is not available, it is possible to either install binaries from repositories (if supported by test environment) or by downloading and building source codes from oFono.org.

To build oFono, follow these steps (replace /directory with the directory where make install should put the files):

$ ./configure --prefix=/directory
$ make
$ make install

Edit /directory/etc/ofono/modem.conf and add suitable configuration according to the DUT modem HW. The following example is for N900.

[isimodem]
Driver=isimodem

NOTE: You can also try to uncomment and enable oFono to use AT command based generic driver.

Prepare DUT:

  1. Copy everything from /directory to device root
  2. Copy all tests from test/ directory to device
  3. Copy src/ofono.conf to device /etc/dbus-1/system.d/
  4. Start oFono daemon (use -n and -d parameters for debug information):
$ ofonod -n -d

Setting up phonesim

If there is no suitable HW available for test execution or there is a need for verifying test case functionality, it is possible to run virtually all the test cases with phonesim. Phonesim basically emulates a modem device and network operation. It includes a GUI for testing for example creating voice calls and sending sms messages.

NOTE: Phonesim requires at least kernel version 2.6.28 with phonet support.

To use phonesim with oFono, follow the instructions below:

  • Download and install oFono from source packages as described above with following differences
  • Edit /etc/ofono/modem.conf and uncomment following lines
[phonesim]
Driver=phonesim
Address=127.0.0.1
Port=12345
  • Copy modem.conf to /usr/local/etc/ofono/ (this depends on your configure --prefix settings)
  • Do not run oFono yet!
  • Download phonesim source package from ofono.org
  • Build phonesim (You will need g++ and Qt packages, download and install as needed)
$ ./configure
$ make
  • Run phonesim directly from src/ (terminal session will freeze and nothing visible happens)
$ ./phonesim -p 12345 -gui default.xml
  • Run oFono directly from src/ with debugging mode (terminal session will freeze)
$ ./ofonod -n -d
  • poke phonesim virtual modem to powered state via dbus:
$ dbus-send --system --print-reply --type=method_call --dest=org.ofono /phonesim org.ofono.Modem.SetProperty string:"Powered" variant:boolean:true

or alternatively you may try to enable modem with oFono python script available with oFono source package

$ ./enable-modem

Phonesim GUI should now pop into screen. Tests can be executed as usual and you can make incoming calls and messages using phonesim GUI.

Building the test asset

The build environment must have the following packages installed:

  • libbltscommon1-devel
  • dbus-devel
  • dbus-glib-devel
  • glib2-devel

The source package includes the pack.sh script, which is used for building RPM and Debian packages and source tar packages. To build an RPM package with the script, execute this command in the top level source directory of asset:

./pack.sh -r

To get help about the packaging script, execute

./pack.sh -h

The asset can also be built manually by executing:

./autogen.sh
./configure
make

Test asset specific instructions

The test package can be installed in the device with a command:

rpm -ivh blts-ofono-tests_{version}.rpm 

Test case arguments

Arguments:

General Switch Function
-l Used log file
-e Execute single or multiple selected tests, for example -e 1,4,5.
-en Execute test by name, for example -en "My test X"
-s Show list of all tests
-C Used configuration file
-? Help message
-xml, -axml Create result XML. -axml appends results to an existing XML file.
-auto Silent logging for test automation. Only the results are printed to stdout.
-v Verbose logging (default)
-vv Even more verbose logging
Optional Switch Function
-r Recipient address / phone number for voice call/SMS
-m SMS center address for SMS send
-f Number to forward calls in forward cases
-h Hangup timeout
-n New PIN code
-o Old (current) PIN code
-y PIN code type ("pin", "pin2", "puk", ..)
-V Call volume for Microphone/Speaker (0-100%)
-a Accumulated Call Meter maximum value
-p Price Per Unit conversion value
-c Three character currency code
-t Set timeout for test case execution (Not supported in test cases 1-6, 27-31, 45 and 46.)
--cleanup Clean up call state before/after tests

Running test cases

Test cases must be run with root priviliges.

NOTE: Running cases always (if --dontcleanup switch is not used) resets call forwardings and call barrings with each test case use -o switch to give blts-ofono access to do so or use configuration file. If no pin code is given then default 3579 will be used.

NOTE: PIN codes in SIM card and values given in configuration file must match or cases may fail.

Test cases marked with bold are able to be executed with variable data. See Test cases with variables.

Test case execution notices:

Case name Notice
oFono - Information Query
oFono - Register to network
oFono - De-register from network
oFono - Enable modems
oFono - Set modems online
oFono - Set modems offline
oFono - Create voicecall -r <number> chooses recipient
oFono - Create voicecall with hidden caller ID -r <number> : Use <number> as call receiver
oFono - Answer to voicecall and hangup when "Start listening calls" is printed, call to DUT
oFono - Answer to voicecall and hangup all when "Start listening calls" is printed, call to DUT
oFono - Answer to voicecall and wait another call when "Start listening calls" is printed, call to DUT
oFono - Answer to voicecall and deflect when "Start listening calls" is printed, call to DUT
oFono - Answer to voicecall and remote hangup when "Start listening calls" is printed, call to DUT, wait a moment and hang up
oFono - Cancel voicecall when "Start listening calls" is printed, call to DUT
oFono - Transfer when "Start listening calls" is printed, call to DUT from two different number
oFono - Swap when "Start listening calls" is printed, call to DUT from two different number
oFono - Release and answer when "Start listening calls" is printed, call to DUT from two different number
oFono - Hold and answer when "Start listening calls" is printed, call to DUT from two different number
oFono - Call and send DTMF -r <number> : Use <number> as deflect call receiver, -t <timeout> : Use <timeout> how long call is active.
oFono - Disable forwardings Disable all forwardings. Run this after any other forwarding case
oFono - Unconditional forwarding Forward all incoming calls, -f <number> chooses recipient
oFono - Forward if busy DUT makes call to given number, verify functionality by calling to DUT. -f <number> chooses recipient
oFono - Forward if no reply Forwards calls if not call is not replied, -f <number> chooses recipient
oFono - Forward if not reachable Forward call when DUT not reachable, -f <number> chooses recipient
oFono - Send SMS -r <number> chooses recipient , -m <number> chooses service centre (optional on NTN)
oFono - Receive SMS When "Waiting for message..." is printed, send SMS to DUT
oFono - Change PIN -n <code> : New PIN, -o <code> : Old PIN, -y <type> : Password type (pin, pin2,...)
oFono - Enter PIN -o <code> : PIN code, -y <type> : Password type (pin, pin2,...)
oFono - Reset PIN -n <code> : PIN, -o <code> : PUK, -y <type> : Password type (pin, pin2,...)
oFono - Lock PIN -o <code> : PIN code, -y <type> : Password type (pin, pin2,...)
oFono - Unlock PIN -o <code> : Old PIN code, -y <type> : Password type (pin, pin2,...)
oFono - Set microphone volume -r <number> : Use <number> as call receiver, -v <volume> : Use <volume> as volume percent
oFono - Set speaker volume -r <number> : Use <number> as call receiver, -v <volume> : Use <volume> as volume percent.
oFono - Set muted -r <number> : Use <number> as call receiver
oFono - Call meters read -r <number> : Use <number> as call receiver
oFono - Call meters set -r <number> : Use <number> as call receiver, -o <code> : Old (current) PIN, -a <value> : Use <value> as accumulated call meter maximum - optional, -p <value> : Use <value> as price per unit conversion - optional, -c <code> : Use <code> as three character currency code - optional
oFono - Call meters reset -r <number> : Use <number> as call receiver, -o <code> : Old (current) PIN
oFono - Call meters near max warning -r <number> : Use <number> as call receiver, -o <code> : Old (current) PIN
oFono - Check barring properties
oFono - Disable barrings
oFono - Disable incoming barrings
oFono - Disable outgoing barrings
oFono - Disable barrings
oFono - Change password for barrings -n <code> : New PIN, -o <code> : Old PIN
oFono - Call barrings test Tries to set barrings. It would be wise to execute "disable barrings" after this.
oFono - List all properties
oFono - Propose scan
oFono - SMSC number test
oFono - Multiparty call test
oFono - Private call test
oFono - Change Radio Access Technology

Configuration file examples

To run test case with variable data you need to specify where configuration file is located. You can edit the configuration file yourself.

NOTE: Test tries to load configuration file from /etc/blts/ by default if no specific path is given.

To run "oFono - Call and send DTMF" case you can use:

blts-ofono -C /usr/share/blts-ofono-tests/blts-ofono.cnf -l /var/log/tests/oFono%20-%20Call%20and%20send%20DTMF.log -en "oFono - Call and send DTMF" -r 123456

Example of DTMF case variation:

##############
# DTMF cases #
##############

[parameter]
   name dtmf_length
   const 1 5
[end_parameter]

[parameter]
   name dtmf_chars
   const "1" "2" "3" "4" "5" "6" "7" "8" "9" "0" "*" "#"
[end_parameter]

[parameter]
   name dtmf_negative_chars
   const "A" "B" "C" "D" "E" "F"
[end_parameter]

[parameter]
   name dtmf_tones
   generate dtmf_generator dtmf_chars dtmf_length
[end_parameter]

[test]
   name "oFono - Call and send DTMF"
   params remote_address dtmf_tones
[end_test]

Module Design and Architecture

The test module can be compiled to self-sufficient command line program. Both Debian and RPM packaging is also provided.

Architecture diagram

References

oFono.org oFono website]

Change History

Version Date Handled By Status Comments
0.1 22-sep-2010 Iekku Huttunen Draft Page created
0.2 18-Nov-2010 Aki Nyman Draft Test case list and argument switches updated
0.3 17-Dec-2010 Kari Laakso Draft Updates to document format and improved instructions
0.4 21-Jan-2011 Kari Laakso Draft Updates to argument switches
0.5 03-Feb-2011 Kari Laakso Draft Updated version numbers and removed obsolete at modem coverage
Personal tools