TESTEVERYTHING

Showing posts with label mobile automation. Show all posts
Showing posts with label mobile automation. Show all posts

Wednesday, 18 July 2018

Install Sauce Connect on Mac OSX and Run from local

   Install Sauce Connect on Mac OSX



Install the App

  1. Press Command+Space and type Terminal and press enter/return key.
  2. Run in Terminal app:
    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null ; brew install caskroom/cask/brew-cask 2> /dev/null
    and press enter/return key. 
    If the screen prompts you to enter a password, please enter your Mac's user password to continue. When you type the password, it won't be displayed on screen, but the system would accept it. So just type your password and press ENTER/RETURN key. Then wait for the command to finish.
  3. Run:
    brew cask install sauce-connect
  4. In terminal set all the required parameter
  5. export SAUCELABS_HOST="127.0.0.1"
    export SAUCELABS_PORT="4448"
    export SAUCELABS_USER_NAME="<YOUR USER ACCOUNT>"
    export SAUCELABS_KEY="<YOUR SAUCELABS LAB KEY>"
    export SAUCE_LAB_GULP_TASK="<TASK NAME>"
    export SAUCELABS_TUNNEL="Tunnel Name"
    export APPLICATION_ENVIRONMENT="ENVIRONMENT NAME"
  6. Execute below command once the parameter set in terminal
  7. sc --no-autodetect -u $SAUCELABS_USER_NAME -k $SAUCELABS_KEY -i $SAUCELABS_TUNNEL -l /tmp/sauce_connect.log --se-port 4448

Tuesday, 4 August 2015

How to use ADB (Android Debug Bridge) over WiFi | Android automation

Whenever we work with Android mobile app automation we have to connect the device using USB cable. We can connect the device over Wi-Fi. To get rid of from the USB there is a super simple way! All you need is a USB cable (for the initial setup) and have both devices in the same network. This will work for non-rooted devices also.

Precondition: 
  • Your system and device must be in the same network.
  • Android mobile must have developer option set to true.
  • ADB (Android debug bridge) must be configure
  • Android SDK installed.
Step 1. Attach mobile via USB

Step 2. Open then command terminal type adb devices and press enter

It will confirm that your device is connected and able to recognize by android sdk.




Step 3:   type:
adb tcpip 5555
Step 4:To find the mobile ip type:
adb shell ip -f inet addr show wlan0
Step 5: The ip address will be shown in second line like this:
inet 192.168.1.233/24 brd 192.168.1.255 scope global wlan0
where 192.168.1.233 is the ip address of your mobile.
Step 6:Remove USB cable and type:
   adb connect <mobile-ip>:5555

 like:
adb connect <192.168.1.233>:5555 

Note: 
  1. Make sure: that you do not have Android studio running before executing the - 'restart adb in tcpip mode' command
  2. If you have IDE running then adb may have been already started and you may need to restart it in some cases: adb kill-server; adb start-server

Monday, 22 September 2014

MOBILE WEB/APPLICATION AUTOMATION INSTALLATION GUIDE FOR IOS

1      Software Requirement

1.       Xcode 5.0 + (Mandatory for iOS 7)
2.       rvm
3.       Ruby 2.0.0
4.       Homebrew
5.       Java
6.       Maven
7.       Ant
8.       Cocoapods
Note: In mac machine, you must have admin rights.

1.1            Install Xcode

Download the latest Xcode from apple developer site

1.2            Install RVM

                           1. Open the terminal window on mac

                          $ \curl -sSL https://get.rvm.io | bash -s stable
                         
                           refer the below url for more info
                                http://rvm.io/rvm/install

1.3            Install RUBY

1.   Ruby is installed by default on Mac, just make sure it is using the version 2.0.0, ruby version can be checked using command;
                                          $ ruby -v
2.   To install ruby version 1.9.2 type below command in terminal
                                          $ rvm install 1.9.2

3.   Once the installation has completed, we need to tell RVM which version of Ruby we currently want to use:
       $ rvm use 1.9.2


                         4.    Make 1.9.2 the Default If you restart Terminal, and type ruby -v again, you'll likely find that it has defaulted back to the system version of Ruby: 1.8.7. That's no good! Let's be sure to make 1.9.2 the default.

rvm --default use 1.9.2

1.4            Install HomeBrew

1.        Homebrew, “the missing package manager for OS X,” allows you to easily install hundreds of open-source tools. The full instructions are available on the Homebrew Wiki, but you should only need to run the command that’s listed at the bottom of the Homebrew site:




                              2.       Once the installation is successful, run the following command:

$ brew doctor

1.5            Install Java, Maven & Ant

1.    Download java .dmg file from http://www.java.com/en/download/
2.    Double click .dmg file and install java
3.    Now download maven from http://www.interior-dsgn.com/apache/maven/maven-3/3.2.1/binaries/apache-maven-3.2.1-bin.tar.gz
4.    Extract maven to any directory
5.    Now to set the environment variables, in the terminal type
$ nano ~/.bash_profile
For Java enter;
      export JAVA_HOME= <path to your java directory >
For Maven enter;
      export M2_HOME= <path to your extracted maven directory>
      export M2=$M2_HOME/bin



Once done press ctrl+O and press enter, now press ctrl+x
6.    In the same terminal enter command
$ source ~/.bash_profile
7.    To install Ant use command
 $ brew install ant
8.    To verify the Maven installation, in terminal, issue the command mvn -version.

$ mvn -version

Apache Maven 3.0.3 (r1075438; 2011-03-01 01:31:09+0800)
Maven home: /usr/share/maven
Java version: 1.6.0_33, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.7.4", arch: "x86_64", family: "mac"
9.    To verify java installation, in terminal, issue the command mvn -version.


$ java -version

Which one is right ?

Translate







Tweet