Description

This is a test plan for network-manager as used by Ubuntu Touch. It does not cover scenarios and/or test cases for network-manager as installed on the desktop. Please see https://wiki.ubuntu.com/NetworkManager/DistroTesting.

Basic Tests

These tests should be run for every upload, as they cover the basic functionality that ofono provides. They should be performed with a single valid ( ie. active data plan ), non-roaming, unlocked SIM card.

Note - make sure to check /var/crash to ensure that the new version of network-manager hasn't crashed and/or triggered other component crashes.

           <3>CTRL-EVENT-SCAN-STARTED
           <3>CTRL-EVENT-SCAN-RESULTS

Hotspot

These tests ensure that Hotspot functions correctly on supported devices. These tests should be performed with a SIM present that has an active/working data plan, and the mobile data enabled on the device.

Preferred APNs

These tests ensure that Network`Manager will only attempt to activate ofono GPRS contexts which have a Preferred=true property. Clearing the property should have no immediate effect, although after doing so, the next time the connection is disconnected, NM will try all available contexts for a particular SIM in round-robin fashion. Lastly, setting Preferred=true on a context when another context is already activated for mobile data will cause NM to disconnect from the current context and attempt to activate the preferred context. If this fails, NM will not retry any other contexts.

Note - APN and context are used interchangeably below.

To test, you need to ensure that ofono has multiple gprs contexts defined for the SIM being used to test. The ofono script list-contexts can be used to examine the current SIM's provisioned contexts. This script and the other ofono scripts can be found in /usr/share/ofono/scripts. It's best if more than one of these contexts are working contexts ( ie. they can be used to provide an active data call ). If the SIM you're using only provisions a single context, it's possible to add additional contexts with the same required properties, and a different Name in order to simulate an operator that provides multiple APNs for Internet. This can be done by using the ofono create-internet-context, or by stopping ofono and editing the correct SIM-specific gprs settings file ( /var/lib/ofono/<IMSI>/gprs ) directly, and then restarting ofono.

The only other script needed to exercise these test cases is the ofono set-context-property script:

set-context-property [modem] [context_number] Preferred true|false

VPN Testing

These tests ensure functioning VPN support. These tests are valid on any Touch device with a WiFi adapter. A valid SIM is not required to test VPN.

        DEVICE   TYPE      STATE                 CONNECTION                
        tun0     tun       connected             tun0                      
        wlan0    wifi      connected             hyperion                  

Enterprise WiFi

Add test cases for enterprise WiFi.

Dual SIM Tests

We assume that the initial situation is cellular data using SIM1 enabled, SIM1 owns 3G capabilities, and no WiFi.

Statistics Interface Testing

This tests are for testing the statistics interface, which sends signals about network traffic. Steps for testing are:

1. Identify modem and WiFi object paths. This can be done using

dbus-send --system --print-reply --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.DBus.Properties.Get string:"org.freedesktop.NetworkManager" string:Devices

and then, for each device

dbus-send --system --print-reply --dest=org.freedesktop.NetworkManager /org/freedesktop/NetworkManager/Devices/<N> org.freedesktop.DBus.Properties.Get string:"org.freedesktop.NetworkManager.Device" string:DeviceType

(see https://developer.gnome.org/NetworkManager/unstable/nm-dbus-types.html#NMDeviceType for types).

2. Activate statistics for modem and WiFi.

Statistics can be activated with a maximum reporting rate of <milliseconds> by doing:

dbus-send --system --print-reply --dest=org.freedesktop.NetworkManager <device_object_path> org.freedesktop.DBus.Properties.Set string:"org.freedesktop.NetworkManager.Device.Statistics" string:RefreshRateMs variant:uint32:<milliseconds>

After that, PropertiesChanged signals will be emitted if the given statistics change. We should see the signals by monitoring the system bus with

dbus-monitor --system

The current statistics implemented in org.freedesktop.NetworkManager.Device.Statistics are TxBytes and RxBytes.

An example of what be should see is:

signal sender=:1.13 -> dest=(null destination) serial=1404 path=/org/freedesktop/NetworkManager/Devices/6; interface=org.freedesktop.NetworkManager.Device.Statistics; member=PropertiesChanged

3. Stop reporting.

To stop reporting, we must set RefreshRateMs to 0:

dbus-send --system --print-reply --dest=org.freedesktop.NetworkManager <device_object_path> org.freedesktop.DBus.Properties.Set string:"org.freedesktop.NetworkManager.Device.Statistics" string:RefreshRateMs variant:uint32:0

Process/Merges/TestPlans/network-manager (last edited 2016-06-06 07:48:28 by alfonsosanchezbeato)