QA SoftVision Team/Mobile/Robocop automation setup

< QA SoftVision Team‎ | Mobile
Revision as of 09:50, 6 September 2012 by AdrianT (talk | contribs) (Created page with "= Steps to setup enviroment and start running tests= Note: To make things easyer you can run '''$sudo su''' in the Terminal you use so that all commands are run in admin mode and...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Steps to setup enviroment and start running tests

Note: To make things easyer you can run $sudo su in the Terminal you use so that all commands are run in admin mode and you do not need to add sudo befoare each command but make sure you are carefull with what you run in the terminal as admin mode will allow you to make changes to core file system

  • Install Java and kDiff
  • Install Mercurial
  • Setup Mercurial
  • Clone sources twice
  • Install Android SDK and NDK
  • Build sources using .mozconfig files
  • Package the mobile build and install
  • Run tests

Detailed steps

Install Java and kDiff

  • kDiff3 is a merge tool that can verify the differences between the source codes allowing the user to download only the code that is different when updating the source files
  • The easiest way to install them is from the Ubuntu Software Manager

Install Mercurial

  • Here is a link to the detailed information about Installing and setting up mercurial
  • To install Mercurial run in a Terminal the following commands:
sudo apt-get install python-setuptools python-dev build-essential
sudo easy_install -U mercurial

Configuring Mercurial and downloading souces

  • All content of the configuration is general. Please update field where needed to work with your configuration

Mercurial configuration

  • Create the file .hgrc in your home directory – you can use $ sudo gedit and save the file with the name .hgrc
  • Add in $HOME/.hgrc
[ui]
username = Your Real Name <user@example.com>
merge = your-merge-program (or internal:merge)

[diff]
git = 1
showfunc = 1
unified = 8
[defaults]
commit = -v

Configure kDiff as merge tool

  • Setting kDiff as the merge tool for Mercuial
  • Add in .hgrc
[merge-tools]
kdiff3.args=--auto -L1 base --L2 local --L3 other $base $local $other -o $output
kdiff3.regkey=Software\KDiff3
kdiff3.regappend=\kdiff3.exe
kdiff3.fixeol=True
kdiff3.gui=True

Configure mq

  • Add in .hgrc
[extensions]
mq =
[defaults]
qnew = -U
[mq]
plain = True

Configure repository

  • Add in .hgrc
[paths]
try = ssh://hg.mozilla.org/try/

Download sources using Mercurial

  • Replace <src> with desired directory
  • Clone the sources twice: 1 for the mobile build and one for the automation build
hg clone http://hg.mozilla.org/mozilla-central/ <src> 

Update sources

  • run command in the source directory
hg pull -u