MeeGo Fast Feedback Testing
MeeGo Fast Feedback Testing (MeeGo-FFT) intends for getting results of source code changing before it is submitted to be built on OBS or to be tested on target HW (e.g. Handset) on OTS.
MeeGo-FFT represents a specific fast reactions on changes in source code manager (e.g. GIT). Fast in this context refers to 2-10 minutes delay. After source code is committed or/and tagged, such actions can be performed:
- building project locally or/and remotely for Intel or/and ARM architectures and creating RPM packets,
- deploying and/or running application on device through SSH connection,
- running Testrunner-lite locally or in host-based mode for testing.
Commits and tags are different source code manager (SCM) states for MeeGo-FFT. It allows to execute different sets of actions with various parameters depending on new commit or new tag. For example, it's possible to build for Intel architecture when new commit appears and for ARM when sources are tagged. For more details see further information about execute condition.
MeeGo Fast Feedback Testing is realized as Hudson plugin, therefore Hudson is needed to be installed on developer workstation as well as QEMU, OSC and Testrunner-lite.
Below is placed instructions about Fast Feedback Testing environment setup for Ubuntu 10.04 and user manual for MeeGo-FFT Hudson plugin.
MeeGo-FFT environment setup
Adding meego tools repository to sources.list
~$ deb http://repo.meego.com/MeeGo/tools/repos/ubuntu/10.04/ /
Install needed keys:
~$ gpg --keyserver subkeys.pgp.net --recv 0BC7BEC479FC1F8A
~$ gpg --export --armor 0BC7BEC479FC1F8A | sudo apt-key add -
Update repository information:
~$ sudo apt-get update
Installing OSC and other needed packages
Run following command:
~$ sudo apt-get install osc meego-osc-plugins build qemu-arm-static
Setting up OSC
OSC is used for local and remote building by means of MeeGo OBS server using packages from specified OBS repository. So it's needed to create empty package in OBS home project.
After that checkout home project somewhere before using Hudson and choose “trust the server certificate permanently”:
~$ osc co home:<osc_username>
Then edit the ~/.oscrc file:
~$ gedit ~/.oscrc
and do these changes:
- uncomment su-wrapper line and specify it to use sudo
su-wrapper = sudo
- fill the "https://api.meego.com" section
user = <your_osc_username>
pass = <your_osc_password>
- mark Trunk:Testing as trusted by appending the following to the end of file
trusted_prj=Trunk:Testing
Disabling sudo password prompt for build
Append the following to the end of the sudoers config file (/etc/sudoers):
<your_username> ALL=NOPASSWD: /usr/bin/build
Remember to edit sudoers with root rights.
Installing Hudson
~$ wget -O /tmp/key http://hudson-ci.org/debian/hudson-ci.org.key
~$ sudo apt-key add /tmp/key
~$ wget -O /tmp/hudson.deb http://hudson-ci.org/latest/debian/hudson.deb
~$ sudo dpkg --install /tmp/hudson.deb
If hudson didn't installed because not all depended packages are installed you can use next commannd for resolve dependences.
~$ sudo apt-get -f install
Setting up Hudson
Stop the hudson server:
~$ sudo /etc/init.d/hudson stop
Change user for hudson:
~$ gedit /etc/default/hudson
change line: HUDSON_USER=<your_user_name>
Give access rights of hudson home directory to user. It can be done in two ways:
- By changing owner of hudson home directory (by default /var/lib/hudson)
~$ sudo chown <your_user_name> /var/lib/hudson/ -R
or
- By changing hudson home location:
~$ gedit /etc/default/hudson
change line: HUDSON_HOME=/home/<your_user_name>/hudson
Start the hudson server:
~$ sudo /etc/init.d/hudson start
Open Hudson in browser:
http://localhost:8080
Install needed plugins to Hudson (Manage Hudson -> Manage Plugins):
- Find GIT plugin in "Available" tab of Hudson Plugin Manager, choose it and press install button
- Meego Fast Feedback Testing
- Download feedback.hpi and upload it by Hudson Plugin Manager from its "Advanced" tab.
Create new job, choose free-style software project and configure:
- Specify local or remote repository with your project.
- Build triggers -> Poll SCM (Schedule for 1 minute polling interval: *****)
- Choose poll SCM only if you want to make Hudson checking repository periodically (minimal interval is 1 minute) for new commits. Note that Hudson doesn't detect tags itself. It's better to use Meego FFT for it.
- Meego FFT plugin can recognize commits and tags. But it needs to start building manually in Hudson UI by pressing "Build Now" button. See more details in MeeGo-FFT Hudson plugin manual.
MeeGo-FFT Hudson plugin
This plugin is made in the form of Hudson build step. It's possible to add several instances of Meego FFT. Description of plugin configure parameters can be found below.
Configure parameters
Execute condition
This condition defines the case when current MeeGo-FFT step is executed. If execute condition isn't matched, this MeeGo-FFT step does nothing. There are three possible conditions:
-
- Whenever build is started, current FFT step is also executed.
-
- Current MeeGo-FFT step will be executed if only new commit is detected in SCM.
-
- Current MeeGo-FFT step will be executed if only new tag is detected in SCM.
It's possible to add several MeeGo-FFT steps with different execute conditions and various build, deploy and test parameters.
Build parameters
These parameters intend for setup building on MeeGo OBS server. OBS allows to build for different architectures locally or remotely against various contents.
- OBS repository
- Specify name of repository on OBS server that contains needed content. The default is "Trunk_Testing".
- OBS package
- Specify name of empty auxiliary package on OBS server that will be used for building.
- Tar filename
- Specify name of tar archive for putting source files to it. This tarball will be used by OBS for building.
- Tar directory name
- Specify name of directory that will be created in tar archive. Source files from SCM repository will be put in this directory in tar archive.
- Spec file
- Specify name of spec-file that will be used by OBS for manage building and creating RPM packages.
- Build architecture
- Choose target build architecture: Intel (i586) or ARM (armv7el).
- Build location
- Choose location for building: locally on your desktop or remotely on MeeGo OBS server.
Deploy parameters
Setup of deploying and/or running application on device through SSH connection.
- Deploy and run application on the device.
- Choose to deploy application and run it on device.
- File to deploy
- Specify application RPM filename to deploy. This RPM will also be installed.
- Run command
- Specify command(s) that will be executed after deploying and installing RPM package on device. It's possible to specify several commands separated by semicolons.
Test parameters
Setup of running Testrunner-lite for testing.
- Run testing
- Choose to perform test cases by means of Testrunner-lite.
- Execute Testrunner-lite on the remote device
- In this mode Testrunner-lite is executed on the target device.
- Execute Testrunner-lite on the host-based mode
- In this mode Testrunner-lite is executed on the test control PC (host) side. This option isn't available if using password for SSH authentication is chosen.
- Test plan filename (XML)
- Specify path to test plan XML file. It's possible to set absolute path (example: "/home/user/plan.xml") or relative to workspace (example "plan.xml") if test plan is in SCM repository with other sources.
Connection parameters
These parameters intend for setting up SSH connection to the remote device or local host where application will be deployed and tested.
- Device IP address
- Specify IP address of the remote device. Also it can be IP address of local host for deploying and testing locally.
- SSH username
- Specify user name for SSH authentication.
- Use password for SSH authentication
- Choose using password if there is no SSH public-key authentication on target host. But in this case there is no possibility to use Testrunner-lite for testing in host-based mode.
- Password
- Specify password for SSH authentication.
Reports