The Mer Wiki now uses your Mer user account and password (create account on https://bugs.merproject.org/)


Quality/ExecuteTests

From Mer Wiki
< Quality(Difference between revisions)
Jump to: navigation, search
(New page: = Executing test cases in Mer SDK = == Add repositories and install tools == At the moment exeuction inside of the SDK! Add test exeuction tools repository sudo zypper ar http://repo.c...)
 
(MeeGo OBS shutting down - fix URLs)
 
(22 intermediate revisions by one user not shown)
Line 1: Line 1:
= Executing test cases in Mer SDK =
+
= Description =
  
== Add repositories and install tools ==
+
This HowTo describes how to execute test cases or test plans in a target device. In this HowTo we use Mer SDK as a host and Nemo virtual machine as a target, but this guide applies for all other devices too.
  
At the moment exeuction inside of the SDK!
+
= Preparation =
  
Add test exeuction tools repository
+
== SDK ==
sudo zypper ar http://repo.ci.merproject.org/repos/devel:/quality/Core_i486/ mer-testing-tools
+
  
Add tests repository
+
Add test exeuction tools repository
  sudo zypper ar http://repo.ci.merproject.org/repos/devel:/quality:/tests/devel_quality_Core_i486/ mer-testing-tests
+
  sudo zypper ar http://repo.merproject.org/obs/mer-tools:/stable/latest_i586/ mer-tools
  
Install tools
+
Install execution tools
 
  sudo zypper ref
 
  sudo zypper ref
  sudo zypper in testrunner-lite
+
  sudo zypper in testrunner-lite eat-host
 +
 
 +
Add SSH host to your system
 +
eat-install-host-key
 +
 
 +
== Target image ==
 +
 
 +
Get Nemo virtual image ks file from http://releases.nemomobile.org/snapshots/images/ (i586-vm)
 +
 
 +
Add new repo:
 +
repo --name=mer-tools --baseurl=http://repo.merproject.org/obs/mer-tools:/stable/latest_i586/ --save
 +
 
 +
Add eat-device to the %packages section:
 +
eat-device
 +
 
 +
Add SSH device keys for root and user
 +
su -c 'eat-add-device-key'
 +
su nemo -c 'eat-add-device-key'
 +
 
 +
Add needed tests to the image, look from [[Quality/Test_coverage | here]]
 +
 
 +
Create raw image for KVM:
 +
sudo mic create raw --record-pkgs=name --pkgmgr=yum --arch=i586 <ks file>
 +
 
 +
See [http://www.epeli.org/mer/ks/ mer-minimal-xorg] ks file.
 +
 
 +
== KVM ==
 +
 
 +
'''Note!''': This is not needed if you don't want to use KVM
 +
 
 +
Install KVM to your real host, not to the SDK but to the host host!
 +
 
 +
For Ubuntu:
 +
sudo apt-get install qemu-kvm kvm-pxe
 +
 
 +
Start Nemo image in KVM:
 +
kvm -m 512 -hda mer-minimal-xorg-sda.raw -smp 2 -net nic -net user,hostfwd=tcp::5555-:22
 +
 
 +
Parameters:
 +
* -m memory
 +
* -hda hard disk image
 +
* -smp number of processors
 +
* -net nic, should automatically setup the eth0 interface and IP address for it
 +
* -net user, network in user mode, hostfwd option maps host's port 5555 to target's 22 port (ssh -p 5555 root@localhost).
 +
 
 +
= Test execution =
 +
 
 +
Check that you have password-less access to the target:
 +
ssh -i ~/.ssh/id_eat_dsa root@target_ip
 +
 
 +
If you are using kvm, then
 +
ssh -i ~/.ssh/id_eat_dsa -p 5555 root@localhost
 +
 
 +
*Note* Add following settings to ~/.ssh/config (KVM settings, modify to match your target)
 +
Host localhost 127.0.0.1
 +
StrictHostKeyChecking no
 +
IdentityFile %d/.ssh/id_eat_dsa
 +
Port 5555
 +
 
 +
Use testrunner-lite or testrunner-ui to execute test plan or tests:
 +
testrunner-lite -f tests.xml -o result.xml -t root@target_ip -v
 +
 
 +
For KVM:
 +
testrunner-lite -f tests.xml -o result.xml -t root@localhost -v
 +
 
 +
Parameters:
 +
* -f path to the test plan
 +
* -o result output
 +
* -t remote execution
 +
* -k path to identification file
 +
* -v verbose
 +
 
 +
= Tests =
 +
 
 +
== Test plans ==
 +
 
 +
* [[Quality/Test_coverage]] will have test plans and settings for plans.
  
 
== Basic Layer tests (BLTS) ==
 
== Basic Layer tests (BLTS) ==
 +
 +
https://meego.gitorious.org/meego-quality-assurance/mcts/trees/master/mcts-blts
  
 
Install some tests
 
Install some tests
Line 27: Line 104:
  
 
== Middleware tests (MWTS) ==
 
== Middleware tests (MWTS) ==
 +
 +
https://meego.gitorious.org/meego-quality-assurance/mcts/trees/master/mcts-mwts
  
 
Install some tests
 
Install some tests
Line 43: Line 122:
 
  cat /var/log/tests/*.result
 
  cat /var/log/tests/*.result
  
== Issues ==
+
== Others ==
 +
 
 +
https://meego.gitorious.org/meego-quality-assurance/mcts/trees/master/
  
* Min doesn't work nicely when executing tests with testrunner-lite --chroot option
+
[[Category:QA]]
* How to execute tests in armv7 targets in chroot?
+
** BLTS tests are working with sb2
+

Latest revision as of 07:34, 29 May 2013

Contents

[edit] Description

This HowTo describes how to execute test cases or test plans in a target device. In this HowTo we use Mer SDK as a host and Nemo virtual machine as a target, but this guide applies for all other devices too.

[edit] Preparation

[edit] SDK

Add test exeuction tools repository

sudo zypper ar http://repo.merproject.org/obs/mer-tools:/stable/latest_i586/ mer-tools

Install execution tools

sudo zypper ref
sudo zypper in testrunner-lite eat-host

Add SSH host to your system

eat-install-host-key

[edit] Target image

Get Nemo virtual image ks file from http://releases.nemomobile.org/snapshots/images/ (i586-vm)

Add new repo:

repo --name=mer-tools --baseurl=http://repo.merproject.org/obs/mer-tools:/stable/latest_i586/ --save

Add eat-device to the %packages section:

eat-device

Add SSH device keys for root and user

su -c 'eat-add-device-key'
su nemo -c 'eat-add-device-key'

Add needed tests to the image, look from here

Create raw image for KVM:

sudo mic create raw --record-pkgs=name --pkgmgr=yum --arch=i586 <ks file>

See mer-minimal-xorg ks file.

[edit] KVM

Note!: This is not needed if you don't want to use KVM

Install KVM to your real host, not to the SDK but to the host host!

For Ubuntu:

sudo apt-get install qemu-kvm kvm-pxe

Start Nemo image in KVM:

kvm -m 512 -hda mer-minimal-xorg-sda.raw -smp 2 -net nic -net user,hostfwd=tcp::5555-:22

Parameters:

  • -m memory
  • -hda hard disk image
  • -smp number of processors
  • -net nic, should automatically setup the eth0 interface and IP address for it
  • -net user, network in user mode, hostfwd option maps host's port 5555 to target's 22 port (ssh -p 5555 root@localhost).

[edit] Test execution

Check that you have password-less access to the target:

ssh -i ~/.ssh/id_eat_dsa root@target_ip

If you are using kvm, then

ssh -i ~/.ssh/id_eat_dsa -p 5555 root@localhost
  • Note* Add following settings to ~/.ssh/config (KVM settings, modify to match your target)
Host localhost 127.0.0.1
StrictHostKeyChecking no
IdentityFile %d/.ssh/id_eat_dsa
Port 5555

Use testrunner-lite or testrunner-ui to execute test plan or tests:

testrunner-lite -f tests.xml -o result.xml -t root@target_ip -v

For KVM:

testrunner-lite -f tests.xml -o result.xml -t root@localhost -v

Parameters:

  • -f path to the test plan
  • -o result output
  • -t remote execution
  • -k path to identification file
  • -v verbose

[edit] Tests

[edit] Test plans

[edit] Basic Layer tests (BLTS)

https://meego.gitorious.org/meego-quality-assurance/mcts/trees/master/mcts-blts

Install some tests

sudo zypper in blts-bluetooth-tests

Execute tests from the command line

sudo blts-bluetooth -e 1

Execute tests with testrunner-lite

sudo testrunner-lite -f /usr/share/blts-bluetooth-tests/tests.xml -o /tmp/results.xml -v

[edit] Middleware tests (MWTS)

https://meego.gitorious.org/meego-quality-assurance/mcts/trees/master/mcts-mwts

Install some tests

sudo zypper in mwts-filesystem-generic-all

Execute tests with testrunner-lite:

testrunner-lite -f /usr/share/mwts-filesystem-generic-tests/tests.xml -o /tmp/result.xml -v 

Execute tests with min console UI:

min

Execute tests with min console:

min -c -r "TMP"

See detailed results:

cat /var/log/tests/*.result

[edit] Others

https://meego.gitorious.org/meego-quality-assurance/mcts/trees/master/

Personal tools