QA SoftVision Team/Mobile/Robocop automation setup: Difference between revisions

 
(6 intermediate revisions by one other user not shown)
Line 1: Line 1:
= General Info =  
= General Info =  
* [June 2, 2017] This page seems outdated, and describes a manual procedure for setting up a Firefox for Android build and test environment. Currently, something like 'mach bootstrap && mach build && mach package && mach robocop' should replace all of this, under most circumstances. See https://wiki.mozilla.org/Mobile/Fennec/Android/Testing.
* This document will help you set up the enviroment and create the builds to test, create and run automated tests using Robocop
* This document will help you set up the enviroment and create the builds to test, create and run automated tests using Robocop
* In order to run the tests you will need one build to be installed on the device - the Firefox Mobile build - and a second desktop build to send the commands to device - the automation build.
* In order to run the tests you will need one build to be installed on the device - the Firefox Mobile build - and a second desktop build to send the commands to device - the automation build.
Line 18: Line 19:


= Detailed steps =
= Detailed steps =
== Install 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 kDiff3 is from the Ubuntu Software Manager


== Install Java ==
== Install Java ==
Line 41: Line 38:
  sudo apt-get install ccache
  sudo apt-get install ccache
* Add ccache to the PATH variable
* Add ccache to the PATH variable
sudo export PATH=/usr/lib/ccache:$PATH
**Enter root by running:
  sudo su
**Run export to set the PATH variable
  export PATH=/usr/lib/ccache:$PATH
* Extend the ccache to improve build time:
* Extend the ccache to improve build time:
  ccache --max-size 8G
  ccache --max-size 8G
Line 64: Line 64:
  [ui]
  [ui]
  username = Your Real Name <user@example.com>
  username = Your Real Name <user@example.com>
  merge = your-merge-program (or internal:merge)
  merge = internal:merge
   
   
  [diff]
  [diff]
Line 73: Line 73:
  [defaults]
  [defaults]
  commit = -v
  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 ===
=== Configure mq ===
Line 155: Line 145:
=== Install Android SDK ===
=== Install Android SDK ===
* Download the archive and unpack it
* Download the archive and unpack it
  wget http://dl.google.com/android/android-sdk_r15-linux.tgz
  wget http://dl.google.com/android/android-sdk_r22.0.5-linux.tgz
  tar -xzf android-sdk_r15-linux.tgz
  tar -xzf android-sdk_r22.0.5-linux.tgz


=== Update Android SDK ===
=== Update Android SDK ===
* run in the terminal from the home file
* You can run the update form the Android sdk manager. Just run the "android" script from android-sdk-dir/tools/. Current used version of Android SDK is 22.0.5
sudo ./android-sdk-linux/tools/android update sdk -u
* Make sure you have Android SDK platform-tools 18.0.1 and Android SDK build-tools 17 and 18.0.1
sudo ./android-sdk-linux/tools/android update adb
 
* it is also a good idea to add the lines in the .profile file found in /home the command to make android sdk available from anywhere
* it is also a good idea to add the lines in the .profile file found in /home the command to make android sdk available from anywhere
  export PATH=$PATH:/home/<user>/android-sdk-linux/platform-tools:/home/<user>/android-sdk-linux/tools
  export PATH=$PATH:/home/<user>/android-sdk-linux/platform-tools:/home/<user>/android-sdk-linux/tools
Confirmed users
1,759

edits