(→Setting up Hudson) |
(→Contact: IRC channel changed) |
||
| (27 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 | + | 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 | + | 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 | + | 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 | + | 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 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 = < | + | user = <your_obs_username> |
| - | pass = < | + | 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_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=< | + | 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/< | + | change line: HUDSON_HOME=/home/<your_linux_user_name>/hudson |
Start the hudson server: | Start the hudson server: | ||
| Line 89: | Line 107: | ||
<nowiki>http://localhost:8080</nowiki> | <nowiki>http://localhost:8080</nowiki> | ||
| + | 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): [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 |
| - | + | * Upload MeeGo-FFT plugin (feedback.hpi) by Hudson Plugin Manager from its "Advanced" tab | |
| - | + | ||
| - | : | + | |
| - | * | + | |
| - | + | ||
| - | = MeeGo-FFT Hudson | + | == 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 <nowiki>(Schedule for 1 minute polling interval: *****)</nowiki> | ||
| + | : 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 | |
| + | : 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 === | === Execute condition === | ||
| Line 124: | Line 151: | ||
[[File:exec_cond_tag.png]] | [[File: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'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 === | === Build parameters === | ||
| 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 202: | Line 229: | ||
: Specify password for SSH authentication. | : 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: | ||
| + | |||
| + | [[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: | ||
| + | |||
| + | [[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]]. | ||
| + | |||
| + | == 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] | ||
Contents |
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:
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.
~$ 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
Run following command:
~$ sudo apt-get install osc meego-osc-plugins build qemu-arm-static
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:
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:
su-wrapper = sudo
user = <your_obs_username> pass = <your_obs_password>
trusted_prj=Trunk:Testing
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.
~$ 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
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:
~$ sudo chown <your_user_name> /var/lib/hudson/ -R
or
~$ 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
Create new job in Hudson UI, choose free-style software project and configure:
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:
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.
These parameters intend for setup building on MeeGo OBS server. OBS allows to build for different architectures locally or remotely against various contents.
Setup of deploying and/or running application on device through SSH connection.
Setup of running Testrunner-lite for testing.
These parameters intend for setting up SSH connection to the remote device or local host where application will be deployed and tested.
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:
Meego Fast Feedback Testing web page contains list of created RPM packages in "Build result" section and test results in "Test-runner output" section:
These test results are generated by Testrunner-lite depending on test plan.
In addition, you can check our Youtube demo videos about installing, configuring and running MeeGo-FFT plugin:
Fast Feedback Testing is developed by QA tools team. You can contact us and contribute via the following channels: