(→Test server configuration) |
(→Run in test machine) |
||
| Line 59: | Line 59: | ||
== Run in test machine == | == Run in test machine == | ||
| + | 1. Pair bluetooth to PANU server. You can use bluetooth panel or use simple_agent in bluez-test package | ||
| + | 2. Install mcts-connman-tests as descripted in general section of Run MCTS | ||
| + | 3. Run following commands as root for general testing | ||
testrunner-lite -a -l '-testset=WiFiFeture' -f /usr/share/mcts-connman-tests/tests.xml -o results.xml | testrunner-lite -a -l '-testset=WiFiFeture' -f /usr/share/mcts-connman-tests/tests.xml -o results.xml | ||
| + | 4. If you want to run data transfer cases (data transfer cases will be in seperated test set after 0.1.8), you need | ||
| + | 4.1 Generate ssh key by running ssh-keygen. Copy the public key to test server. You can backup the private/public keys to avoid re-configure ssh trust in test server. | ||
| + | 4.2 Add following line into /etc/ssh/ssh_config | ||
| + | echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config | ||
| + | 4.3 Change /opt/mcts-connman-tests/common/config.py to configure related parameters | ||
| + | 5. WiFiFeature test set contains test cases of many WiFi features. If you want to run these test cases, you need a Cisco 1252 AP as described in test server configuration section. You might change values of three parameters: | ||
| + | # The control server that connects to AP, so that test script can set AP parameters through apset script | ||
| + | cm_apset_server = "192.168.2.201" | ||
| + | # The full path of the apset script in control server | ||
| + | cm_apset_server_path= "/usr/local/bin/apset/cisco/apset" | ||
| + | # The essid of AP, this must be same as in apset script | ||
| + | cm_apset_ap_essid = "shz13-otc-cisco-cm" | ||
| + | 5.1 Run following commands as root for all automatic test cases: | ||
| + | testrunner-lite -a -f /usr/share/mcts-connman-tests/tests.xml -o results.xml | ||
Contents |
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:
+ 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
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
1. Pair bluetooth to PANU server. You can use bluetooth panel or use simple_agent in bluez-test package 2. Install mcts-connman-tests as descripted in general section of Run MCTS 3. Run following commands as root for general testing
testrunner-lite -a -l '-testset=WiFiFeture' -f /usr/share/mcts-connman-tests/tests.xml -o results.xml
4. If you want to run data transfer cases (data transfer cases will be in seperated test set after 0.1.8), you need 4.1 Generate ssh key by running ssh-keygen. Copy the public key to test server. You can backup the private/public keys to avoid re-configure ssh trust in test server. 4.2 Add following line into /etc/ssh/ssh_config
echo "StrictHostKeyChecking no" >> /etc/ssh/ssh_config
4.3 Change /opt/mcts-connman-tests/common/config.py to configure related parameters 5. WiFiFeature test set contains test cases of many WiFi features. If you want to run these test cases, you need a Cisco 1252 AP as described in test server configuration section. You might change values of three parameters:
# The control server that connects to AP, so that test script can set AP parameters through apset script cm_apset_server = "192.168.2.201" # The full path of the apset script in control server cm_apset_server_path= "/usr/local/bin/apset/cisco/apset" # The essid of AP, this must be same as in apset script cm_apset_ap_essid = "shz13-otc-cisco-cm"
5.1 Run following commands as root for all automatic test cases:
testrunner-lite -a -f /usr/share/mcts-connman-tests/tests.xml -o results.xml