Meego Wiki
Views

Quality/QA-tools/MeeGo Fast Feedback Testing

From MeeGo wiki
< Quality | QA-tools(Difference between revisions)
Jump to: navigation, search
(Viewing FFT results)
(Contact: IRC channel changed)
 
(21 intermediate revisions not shown)
Line 1: Line 1:
= MeeGo Fast Feedback Testing =
= 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 Fast Feedback Testing ('''MeeGo-FFT''') intends for automatically testing of source code changes on the target device running MeeGo and getting results of it before these changes will be integrated.
-
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:
+
MeeGo-FFT represents a specific fast reactions on changes in version control system (now only GIT is supported). 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,
+
* building project against different contents locally or/and remotely for Intel or/and ARM architectures and creating RPM packets,
-
* deploying and/or running application on device through SSH connection,
+
* deploying and/or running application on the target device through SSH connection,
* running [[Quality/QA-tools/Testrunner-lite|Testrunner-lite]] locally or in host-based mode for testing.
* running [[Quality/QA-tools/Testrunner-lite|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 [[Quality/QA-tools/MeeGo_Fast_Feedback_Testing#Execute_condition|execute condition]].
+
Results of these actions can be viewed in web browser.
 +
 
 +
Commits and tags are different version control system 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 [[Quality/QA-tools/MeeGo_Fast_Feedback_Testing#Execute_condition|execute condition]].
MeeGo Fast Feedback Testing is realized as [http://hudson-ci.org/ Hudson] plugin, therefore Hudson is needed to be installed on developer workstation as well as QEMU, OSC and [[Quality/QA-tools/Testrunner-lite|Testrunner-lite]].
MeeGo Fast Feedback Testing is realized as [http://hudson-ci.org/ Hudson] plugin, therefore Hudson is needed to be installed on developer workstation as well as QEMU, OSC and [[Quality/QA-tools/Testrunner-lite|Testrunner-lite]].
Line 30: Line 32:
== Setting up OSC ==
== Setting up OSC ==
-
OSC is used for local and remote building by means of [http://build.meego.com/ MeeGo OBS server] using packages from specified OBS repository. So it's needed to create empty package in OBS home project.
+
OSC is used for local and remote building by means of [http://build.meego.com/ MeeGo OBS server] using specified OBS repository that represents needed content. Usually '''Trunk:Testing''' is used as default OBS repository for MeeGo-FFT.
 +
 
 +
So add needed repository to your OBS home project:
 +
Build Service -> Projects -> home:<your_obs_username> -> Repositories -> Add repositories ->
 +
MeeGo distributions -> MeeGo Trunk:Testing
 +
 
 +
Now new "Trunk_Testing" item appears in Repository Configuration section:
 +
 
 +
[[File:fft_obs_repository.png]]
 +
 
 +
If you already have had needed OBS repository in this section, it can be possible to use it instead, but don't forget to change default name in configuring of [[Quality/QA-tools/MeeGo_Fast_Feedback_Testing#Build_parameters|MeeGo-FFT plugin build parameters]].
 +
 +
Also it's needed to create empty auxiliary package in OBS home project:
 +
Build Service -> Projects -> home:<your_obs_username> -> Packages -> Add a new package
 +
 
 +
Names of specified OBS repository and empty auxiliary OBS package will be needed during setting up of [[Quality/QA-tools/MeeGo_Fast_Feedback_Testing#Build_parameters|MeeGo-FFT plugin build parameters]].  
 +
 
After that checkout home project somewhere before using Hudson and choose “trust the server certificate permanently”:
After that checkout home project somewhere before using Hudson and choose “trust the server certificate permanently”:
-
  ~$ osc co home:<osc_username>
+
  ~$ osc co home:<your_obs_username>
Then edit the ~/.oscrc file:
Then edit the ~/.oscrc file:
Line 43: Line 61:
* fill the <nowiki>"https://api.meego.com"</nowiki> section
* fill the <nowiki>"https://api.meego.com"</nowiki> section
-
  user = <your_osc_username>
+
  user = <your_obs_username>
-
  pass = <your_osc_password>
+
  pass = <your_obs_password>
-
* mark Trunk:Testing as trusted by appending the following to the end of file
+
* mark chosen OBS repository ('''Trunk:Testing''') as trusted by appending the following to the end of file
  trusted_prj=Trunk:Testing
  trusted_prj=Trunk:Testing
Line 52: Line 70:
Append the following to the end of the sudoers config file (/etc/sudoers):
Append the following to the end of the sudoers config file (/etc/sudoers):
-
  <your_username>    ALL=NOPASSWD: /usr/bin/build
+
  <your_linux_username>    ALL=NOPASSWD: /usr/bin/build
Remember to edit sudoers with root rights.
Remember to edit sudoers with root rights.
Line 73: Line 91:
Change user for hudson:
Change user for hudson:
  ~$ gedit /etc/default/hudson
  ~$ gedit /etc/default/hudson
-
  change line: HUDSON_USER=<your_user_name>
+
  change line: HUDSON_USER=<your_linux_user_name>
Give access rights of hudson home directory to user. It can be done in two ways:
Give access rights of hudson home directory to user. It can be done in two ways:
Line 81: Line 99:
* By changing hudson home location:
* By changing hudson home location:
   ~$ gedit /etc/default/hudson
   ~$ gedit /etc/default/hudson
-
   change line: HUDSON_HOME=/home/<your_user_name>/hudson
+
   change line: HUDSON_HOME=/home/<your_linux_user_name>/hudson
Start the hudson server:
Start the hudson server:
Line 90: Line 108:
Install GIT plugin to Hudson:
Install GIT plugin to Hudson:
-
  Go to Manage Hudson -> Manage Plugins menu, find GIT plugin in "Available" tab of Hudson Plugin Manager, choose it and press install button
+
  Go to Manage Hudson -> Manage Plugins menu,
 +
find GIT plugin in "Available" tab of Hudson Plugin Manager,
 +
choose it and press install button
= MeeGo-FFT Hudson plugin =
= MeeGo-FFT Hudson plugin =
Line 96: Line 116:
== Installing ==
== Installing ==
-
* Download plugin file: [http://meego.gitorious.org/meego-quality-assurance/meego-testing-hudson-plugin/blobs/master/hudson/binaries/latest/feedback.hpi feedback.hpi]
+
* Download plugin (version 1.2): [http://meego.gitorious.org/meego-quality-assurance/meego-testing-hudson-plugin/blobs/master/hudson/binaries/version_1_2/feedback.hpi feedback.hpi]
* Go to Hudson Plugin Manager in Hudson UI (web page): Manage Hudson -> Manage Plugins
* Go to Hudson Plugin Manager in Hudson UI (web page): Manage Hudson -> Manage Plugins
* Upload MeeGo-FFT plugin (feedback.hpi) by Hudson Plugin Manager from its "Advanced" tab
* Upload MeeGo-FFT plugin (feedback.hpi) by Hudson Plugin Manager from its "Advanced" tab
Line 104: Line 124:
Create new job in Hudson UI, choose free-style software project and configure:
Create new job in Hudson UI, choose free-style software project and configure:
*; GIT repository URL
*; GIT repository URL
-
: Specify local or remote repository with your project.
+
: Specify local or remote repository with your project. It's possible to set path to ".git" directory of your local repository.
*; Build triggers -> Poll SCM <nowiki>(Schedule for 1 minute polling interval: *****)</nowiki>
*; Build triggers -> Poll SCM <nowiki>(Schedule for 1 minute polling interval: *****)</nowiki>
-
: Choose poll SCM only if you want to make Hudson checking repository periodically (minimal interval is 1 minute) for new commits. Note that Hudson can't detect SCM changes like new tags and trigger any action in this case. But MeeGo-FFT can recognize new commits and new tags. So it's also possible to trigger building manually in Hudson UI by pressing "Build Now" button and to let MeeGo-FFT check new tags and commits. See more details in description of [[Quality/QA-tools/MeeGo_Fast_Feedback_Testing#Execute_condition|execute condition]].
+
: Choose poll SCM (source code manager - version control system) only if you want to make Hudson checking repository periodically (minimal interval is 1 minute) for new commits.
 +
: Also if you have access to the project ".git" directory, there is another possibility to trigger build automatically and immediately on new commit by adding post-commit hook to your GIT repository:
 +
:: 1. Open ''<path_to_git_repository>/.git/hooks/post-commit.sample'' file
 +
::    and replace '': Nothing'' string
 +
::    by ''<nowiki>wget http://localhost:8080/job/<hudson_job_name>/build</nowiki>'' command
 +
:: 2. Rename this ''post-commit.sample'' file to ''post-commit''
 +
: Note that Hudson can't detect new tags and trigger any action in these cases (Poll SCM & hooks). But MeeGo-FFT can recognize new commits and new tags. So it's also possible to trigger building manually in Hudson UI by pressing "Build Now" button and to let MeeGo-FFT check new tags and commits. In this way "Poll SCM" and "post-commit" hook are not needed. See more details in description of [[Quality/QA-tools/MeeGo_Fast_Feedback_Testing#Execute_condition|execute condition]].
 +
 
*; Build -> Add build step -> Meego FFT
*; Build -> Add build step -> Meego FFT
: This plugin is made in the form of Hudson build step. It's possible to add several instances of Meego FFT during configuring Hudson job. Description of plugin configure parameters can be found below.
: This plugin is made in the form of Hudson build step. It's possible to add several instances of Meego FFT during configuring Hudson job. Description of plugin configure parameters can be found below.
Line 133: Line 160:
; OBS repository
; OBS repository
-
: Specify name of repository on OBS server that contains needed content. The default is "Trunk_Testing".
+
: Specify name of repository on OBS server that contains needed content. The default name is "Trunk_Testing" for MeeGo Trunk:Testing repository. Note if you want to use another repository, don't forget to change this default name to one in your "Repository Configuration" section of [http://build.meego.com MeeGo OBS server]. See [[Quality/QA-tools/MeeGo_Fast_Feedback_Testing#Setting_up_OSC|OSC setup]] for information about adding OBS repository to your project.
; OBS package
; OBS package
-
: Specify name of empty auxiliary package on OBS server that will be used for building.
+
: Specify name of empty auxiliary package on OBS server that will be used for building. See [[Quality/QA-tools/MeeGo_Fast_Feedback_Testing#Setting_up_OSC|OSC setup]] for information about adding this package.
; Tar filename
; Tar filename
Line 182: Line 209:
; Test plan filename (XML)
; 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.
+
: Specify path to [[Quality/QA-tools/Test_plan|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 ===
=== Connection parameters ===
Line 210: Line 237:
[[File:fft_build_result.png]]
[[File:fft_build_result.png]]
-
Meego Fast Feedback Testing web page contains list of created RPM packages in "Build result" section and test results in "Test-runner output" section.
+
Meego Fast Feedback Testing web page contains list of created RPM packages in "Build result" section and test results in "Test-runner output" section:
[[File:fft_testrunner_result.png]]
[[File:fft_testrunner_result.png]]
These test results are generated by [[Quality/QA-tools/Testrunner-lite|Testrunner-lite]] depending on [[Quality/QA-tools/Test_plan|test plan]].
These test results are generated by [[Quality/QA-tools/Testrunner-lite|Testrunner-lite]] depending on [[Quality/QA-tools/Test_plan|test plan]].
 +
 +
== Demo videos ==
 +
 +
In addition, you can check our Youtube demo videos about installing, configuring and running MeeGo-FFT plugin:
 +
* [http://www.youtube.com/watch?v=OnGHFry75Do Demo of version 1.1]
 +
 +
= Contact =
 +
 +
Fast Feedback Testing is developed by [[Quality/QA-tools | QA tools team]]. You can contact us and contribute via the following channels:
 +
* [http://webchat.freenode.net/?channels=meego-qa #meego-qa IRC channel on irc.freenode.net]
 +
* [http://bugs.meego.com/enter_bug.cgi?product=MeeGo%20Quality%20Assurance File new bugs or improvement ideas to Bugzilla]
 +
* [http://lists.meego.com/listinfo/meego-qa meego-qa@lists.meego.com mailing list]

Latest revision as of 08:00, 24 March 2011

Contents

MeeGo Fast Feedback Testing

MeeGo Fast Feedback Testing (MeeGo-FFT) intends for automatically testing of source code changes on the target device running MeeGo and getting results of it before these changes will be integrated.

MeeGo-FFT represents a specific fast reactions on changes in version control system (now only GIT is supported). 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 against different contents locally or/and remotely for Intel or/and ARM architectures and creating RPM packets,
  • deploying and/or running application on the target device through SSH connection,
  • running Testrunner-lite locally or in host-based mode for testing.

Results of these actions can be viewed in web browser.

Commits and tags are different version control system 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 specified OBS repository that represents needed content. Usually Trunk:Testing is used as default OBS repository for MeeGo-FFT.

So add needed repository to your OBS home project:

Build Service -> Projects -> home:<your_obs_username> -> Repositories -> Add repositories ->
MeeGo distributions -> MeeGo Trunk:Testing

Now new "Trunk_Testing" item appears in Repository Configuration section:

Fft obs repository.png

If you already have had needed OBS repository in this section, it can be possible to use it instead, but don't forget to change default name in configuring of MeeGo-FFT plugin build parameters.

Also it's needed to create empty auxiliary package in OBS home project:

Build Service -> Projects -> home:<your_obs_username> -> Packages -> Add a new package

Names of specified OBS repository and empty auxiliary OBS package will be needed during setting up of MeeGo-FFT plugin build parameters.


After that checkout home project somewhere before using Hudson and choose “trust the server certificate permanently”:

~$ osc co home:<your_obs_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_obs_username>
pass = <your_obs_password>
  • mark chosen OBS repository (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_linux_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_linux_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_linux_user_name>/hudson

Start the hudson server:

~$ sudo /etc/init.d/hudson start

Open Hudson in browser:

http://localhost:8080

Install GIT plugin to Hudson:

Go to Manage Hudson -> Manage Plugins menu,
find GIT plugin in "Available" tab of Hudson Plugin Manager,
choose it and press install button

MeeGo-FFT Hudson plugin

Installing

  • Download plugin (version 1.2): feedback.hpi
  • Go to Hudson Plugin Manager in Hudson UI (web page): Manage Hudson -> Manage Plugins
  • Upload MeeGo-FFT plugin (feedback.hpi) by Hudson Plugin Manager from its "Advanced" tab

Configuring

Create new job in Hudson UI, choose free-style software project and configure:

  • GIT repository URL
Specify local or remote repository with your project. It's possible to set path to ".git" directory of your local repository.
  • Build triggers -> Poll SCM (Schedule for 1 minute polling interval: *****)
Choose poll SCM (source code manager - version control system) only if you want to make Hudson checking repository periodically (minimal interval is 1 minute) for new commits.
Also if you have access to the project ".git" directory, there is another possibility to trigger build automatically and immediately on new commit by adding post-commit hook to your GIT repository:
1. Open <path_to_git_repository>/.git/hooks/post-commit.sample file
and replace : Nothing string
by wget http://localhost:8080/job/<hudson_job_name>/build command
2. Rename this post-commit.sample file to post-commit
Note that Hudson can't detect new tags and trigger any action in these cases (Poll SCM & hooks). But MeeGo-FFT can recognize new commits and new tags. So it's also possible to trigger building manually in Hudson UI by pressing "Build Now" button and to let MeeGo-FFT check new tags and commits. In this way "Poll SCM" and "post-commit" hook are not needed. See more details in description of execute condition.
  • Build -> Add build step -> Meego FFT
This plugin is made in the form of Hudson build step. It's possible to add several instances of Meego FFT during configuring Hudson job. Description of plugin configure parameters can be found below.


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:

  • Always
Whenever build is started, current FFT step is also executed.

Exec cond always.png

  • On new commit
Current MeeGo-FFT step will be executed if only new commit is detected in SCM.

Exec cond commit.png

  • On new tag
Current MeeGo-FFT step will be executed if only new tag is detected in SCM.

Exec cond tag.png

It's possible to add several MeeGo-FFT steps with different execute conditions and various build, deploy and test parameters. It will allow perform different actions for new commits, new tags and in both cases.

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.

Fft build parameters.png

OBS repository
Specify name of repository on OBS server that contains needed content. The default name is "Trunk_Testing" for MeeGo Trunk:Testing repository. Note if you want to use another repository, don't forget to change this default name to one in your "Repository Configuration" section of MeeGo OBS server. See OSC setup for information about adding OBS repository to your project.
OBS package
Specify name of empty auxiliary package on OBS server that will be used for building. See OSC setup for information about adding this package.
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.

Fft deploy parameters.png

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.

Fft test parameters.png

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.

Fft connection parameters.png

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.

Viewing FFT results

Log of MeeGo-FFT processing can be found at "Console Output" Hudson web page that can be reached from certain build status Hudson web page.

Only if build has been succeeded, link to "Meego Fast Feedback Testing" special web page will appear at the build status web page:

Fft build result.png

Meego Fast Feedback Testing web page contains list of created RPM packages in "Build result" section and test results in "Test-runner output" section:

Fft testrunner result.png

These test results are generated by Testrunner-lite depending on test plan.

Demo videos

In addition, you can check our Youtube demo videos about installing, configuring and running MeeGo-FFT plugin:

Contact

Fast Feedback Testing is developed by QA tools team. You can contact us and contribute via the following channels:

Personal tools