Test plan for component: https://wiki.ubuntu.com/Process/Merges/TestPlans/ofono
Component Checklist: https://wiki.ubuntu.com/Process/Merges/Checklists/Common
Trunk URL: https://github.com/rilmodem/ofono
Ubuntu Package URL (LP): http://launchpad.net/ubuntu/+source/ofono
The SIM test cases have been moved into our ofono git repository. For each of the test cases orginally described on this page ( except Phonebook ), a test script based on Python's unittest framework has been written. These test scripts perform verification of the test case criteria, and are self documenting. Please refer to the embedded pydoc comments, and/or use the pydoc tool to view the documentation.
SIM Functional Test Cases: https://github.com/rilmodem/ofono/tree/master/test/rilmodem/sim
The functional test scripts are currently run manually by developers before releasing new versions of ofono to the archive. Automation of these scripts is blocked by the following issues:
urfkill - currently will exit immediately when started on the emulator. This component is responsible for setting the modem online at boot time ( if FlightMode is disabled ). See the following bug for the details: https://bugs.launchpad.net/ubuntu/+source/urfkill/+bug/1338967
SIM Presence - the emulator currently always creates one or more valid SIM cards. To test the variations of SIM functional tests, the emulator will need new SIM commands to configure SIM presence, and trigger SIM insertion/removal events. Note - it's possible to use the console commands from scripts run in the emulator by use of the loopback device.
SIM Locking - PIN/PUK automated tests are hold as the emulator doesn’t support setting or clearing facility locks, so although the default SIM card in the emulator has both PIN ( 0000 ) and PUK ( 12345678 ) defined, the PIN lock isn’t active by default. So, in order to make this work we either need to add support for facility locks in both the reference-ril and qemu/telephony, or possibly add a console command for lock management that could be used when the modem is offline.
SIM Programmabilty -- for SIM functional tests which rely on specific contents of one or more SIM files, the existing console commands need to be enhanced to support writing to non-existent files. Note - this sort of approach may require ofono to be restarted in order to re-read the modified files. This should be possible to script using upstart commands.
Modem/SIM Properties - ofonon running on the emulator doesn't always export the same set of properties as a real device, which can cause excessive quirking of test verification logic. Some of the properties that haven't matched real devices include:
- Modem property Revision isn’t present
VoiceCallManager property EmergencyNumbers set to default ( ie. emulator doesn’t define EFECC )
Phonebook Import Tests
1. Test importing contacts from the SIM
This test case verifies that we can import successfully contacts stored in the SIM.
A SIM card with multiple contacts stored.
Output should consist of a list of contacts in vCard format.
Note - ofono only supports a single number and/or email per contact, so imported contacts will only include the first email address/phone number stored in the SIM contact.
If we decide to use some of these scripts for automated testing, one idea for verification would be to create a database which could be indexed by CardIdentifier(s), model/serial. This could help where the exported properties of a device differ from the norm ( eg. krillin vs. mako ).