m |
|||
| Line 1: | Line 1: | ||
== Introduction == | == Introduction == | ||
| - | Blts-ofono package 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.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. |
| + | |||
| + | Currently supported version of oFono is 0.33. | ||
== Test Coverage == | == Test Coverage == | ||
The test cases are: | The test cases are: | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
* oFono - Information Query: Tries specific interfaces from modem. Phonebook, network and modem interface. | * oFono - Information Query: Tries specific interfaces from modem. Phonebook, network and modem interface. | ||
| - | |||
* oFono - Register to network: Registers device in network | * oFono - Register to network: Registers device in network | ||
* oFono - De-register from network: De-registers device from network | * oFono - De-register from network: De-registers device from network | ||
| Line 49: | Line 13: | ||
* oFono - Set modems online: Makes modems go Online, aka turn off Flight mode | * 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 - 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 - Propose scan: Ask networks statuses | ||
* oFono - SMSC number test: Test proper SMSC number validation | * oFono - SMSC number test: Test proper SMSC number validation | ||
| Line 158: | Line 161: | ||
<u>Arguments: </u> | <u>Arguments: </u> | ||
| - | + | {|cellspacing="0" border="1" | |
| - | {| | + | !|Switch |
| - | ! | + | !|Function |
| - | ! | + | |
| + | |- | ||
| + | || -l || Used log file, Used log file, default blts_ofono_log | ||
| + | |- | ||
| + | || -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 and path, for example /usr/share/blts-ofono-tests/blts-ofono.cnf | ||
| + | |- | ||
| + | || -? || 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 | || -r || Recipient address / phone number for voice call/SMS | ||
| Line 169: | Line 195: | ||
|| -f || Number to forward calls in forward cases | || -f || Number to forward calls in forward cases | ||
|- | |- | ||
| - | || - | + | || -h || Hangup timeout |
|- | |- | ||
|| -n || New PIN code | || -n || New PIN code | ||
| Line 183: | Line 209: | ||
|| -p || Price Per Unit conversion value | || -p || Price Per Unit conversion value | ||
|- | |- | ||
| - | || -c || Three character currency code | + | || -c || Three character currency code |
| + | |- | ||
| + | || -t || Set timeout for test case execution | ||
| + | |- | ||
| + | || --dontcleanup || Don't clean up call state before/after tests | ||
|} | |} | ||
| Line 190: | Line 220: | ||
Test cases must be run with root priviliges. | Test cases must be run with root priviliges. | ||
| - | NOTE: Running cases always 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. |
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 200: | Line 230: | ||
|- | |- | ||
|| oFono - Information Query || | || oFono - Information Query || | ||
| - | |||
| - | |||
|- | |- | ||
|| oFono - Register to network || | || oFono - Register to network || | ||
| Line 220: | Line 248: | ||
|- | |- | ||
|| oFono - Answer to voicecall and hangup all || 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 deflect''' || when "Start listening calls" is printed, call to DUT | ||
| Line 288: | Line 318: | ||
|- | |- | ||
|| '''oFono - Call barrings test''' || Tries to set barrings. It would be wise to execute "disable barrings" after this. | || '''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 - Propose scan || | ||
| Line 342: | Line 374: | ||
== Module Design and Architecture == | == Module Design and Architecture == | ||
| - | The test module can be compiled to | + | The test module can be compiled to self-sufficient command line program. Both Debian and RPM packaging is also provided. |
=== Architecture diagram === | === Architecture diagram === | ||
| Line 362: | Line 394: | ||
|- | |- | ||
|| 0.1 || 22-sep-2010 || [mailto:ext-iekku.huttunen@nokia.com Iekku Huttunen] || Draft || Page created | || 0.1 || 22-sep-2010 || [mailto:ext-iekku.huttunen@nokia.com Iekku Huttunen] || Draft || Page created | ||
| + | |- | ||
| + | || 0.2 || 18-Nov-2010 || [mailto:aki.nyman@digia.com Aki Nyman] || Draft || Test case list and argument switches updated | ||
|} | |} | ||
Contents |
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.
Currently supported version of oFono is 0.33.
The test cases are:
Current D-Bus API coverage for oFono tests:
Current oFono AT modem API coverage for oFono tests:
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.
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.
More coverage with tests for 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 installEdit /directory/etc/ofono/modem.conf and add suitable configuration according to the DUT modem HW. The following example is for N900.
[isimodem]Driver=isimodemNOTE: You can also try to uncomment and enable oFono to use AT command based generic driver.
Prepare DUT:
$ ofonod -n -d
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:
/etc/ofono/modem.conf and uncomment following lines
[phonesim]Driver=phonesimAddress=127.0.0.1Port=12345$ ./configure$ make$ ./phonesim -p 12345 -gui default.xml$ ./ofonod -n -d $ 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-modemPhonesim GUI should now pop into screen. Tests can be executed as usual and you can make incoming calls and messages using phonesim GUI.
Compile blts-ofono-tests with corresponding environment
$ dpkg-buildpackge
and install package to DUT. You'll need to have SIM card in DUT with correct pin number entered. Now you can execute tests from command prompt Execute from host end command line:
$ blts-ofono
Arguments:
| Switch | Function |
|---|---|
| -l | Used log file, Used log file, default blts_ofono_log |
| -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 and path, for example /usr/share/blts-ofono-tests/blts-ofono.cnf |
| -? | 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 |
| --dontcleanup | Don't clean up call state before/after tests |
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.
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 |
To run test case with variable data you need to specify where configuration file is located. You can edit the configuration file yourself.
To run "oFono - Call and send DTMF" case you can use:
blts-ofono -l /var/log/tests/oFono%20-%20Call%20and%20send%20DTMF.log -en "oFono - Call and send DTMF" -r 123456 -C /usr/share/blts-ofono-tests/blts-ofono.cnf
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]
Before executing tests run kill-telepathy and after executing run enable-telepathy and boot device.
The test module can be compiled to self-sufficient command line program. Both Debian and RPM packaging is also provided.
| oFono.org | oFono website] |
| 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 |