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 |