Meego Wiki
Views

Quality/TestSuite/MCTS/Run MCTS/mcts-connman-tests

From MeeGo wiki
Jump to: navigation, search

Contents

mcts-connman-tests

Setup test environement

ConnMan deal with complex network environments. To test ConnMan, we have to setup test environment so that connman test suite can run on. Below diagram shows the ConnMan test environment:

Connman network.jpg

Different networks and connect to different networks

+ Currently there are four networks: Ethernet/WiFi/Bluetooth/3G data networks
+ dhcp enabled networks: All networks should be dhcp enabled so that test machine/server can get IP address. Basically your 3G/Wired network are dhcp enabled. And you need configure your WiFi/Bluetooth networks as dhcp enabled. You can set one of you WiFi AP as dhcp server. And we will discuss how to enable bluetooth server later
+ Test server wire connects to Ethernet and WiFi networks. Test server actually provide Bluetooth PANU service
+ Test machine wire connects to Ethernet. Test machine connects to WiFi/Bluetooth/3G networks through relative technologies

Test server configuration

This is one time configuration, and you can use this configuration for all of your connman testing
I use ubuntu 10.4 as test server in my environment this time
I assume that IP address of test server as 192.168.*.1, please change accordingly

1. Enable broadcast

# Edit /etc/sysctl.conf, replace/add the line
net.ipv4.icmp_echo_ignore_broadcasts = 0

2. Set up WiFi Aps with

WiFi Open AP : essid: "Guest" and open no security
WiFi WEP/PSK AP with essid and key that you defined.

3. Setup Bluetooth server. If your wired network does not have dhcp server yet, you also need setup one for Wired network

# Insert a bluetooth dongle
git clone http://git.gitorious.org/meego-quality-assurance/mcts.git
cp -r mcts/mct-bluez-tests/data/server /usr/local/bin/bluetooth
/usr/local/bin/bluetooth/server_startup.sh &
/usr/local/bin/bluetooth/bt_pan_server_setup.sh &
#
# Setup dhcp server
# edit /etc/default/dhcp3-server and add following line:
INTERFACES="pan1"
#
# edit /etc/dhcp3/dhcpd.conf and add following section:
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option routers 192.168.0.1;
option domain-name-servers 192.168.0.1, 192.168.0.2;
option domain-name "connman.org";
#
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.10 192.168.0.200;
}

Following steps are for data transfer cases 1. Setup a file for data transfer

mkdir -p /usr/share/mcts-connman-tests
cd /usr/share/mcts-connman-tests
dd bs=1M count=10 if=/dev/zero of=10M

2. Setup ssh trust for client. Refer to test machine setup on how to create a ssh key. Get test machine's public key and:

cat id_rsa.pub >> /root/.ssh/authorized_keys

Following steps are for WiFiFeature cases 1. We need an AP that supports automatic setting. Now we have apset script for Cisco AP. We tested the script with Cisco 1252. If you're not sure about it, please skip WiFiFeature cases 2. Install apset script

git clone http://git.gitorious.org/meego-quality-assurance/mcts.git
tar zxf mcts/mcts-connman-tests/data/apset.tgz  -C /usr/local/bin

Run in test machine

testrunner-lite -a -l '-testset=WiFiFeture' -f /usr/share/mcts-connman-tests/tests.xml -o results.xml
Personal tools