Tuesday, October 10, 2017

Setting up Android studio and running a apk file in Emulator in Mac

These steps are for Mac machine.

Installing Android Studio

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/
export PATH=$PATH:$JAVA_HOME/bin/
Verify like this : $JAVA_HOME/bin/java -version

export GRADLE_USER_HOME=/scratch/skukkada/OMC_Softwares/gradle-2.14.1/
export PATH=$PATH:/scratch/skukkada/OMC_Softwares/gradle-2.14.1/bin

For Mac, download android-studio(which is a dmg file supported for mac)
open the dmg file and drag dmg into applications. it will show Android-Studio in “Finder” or "Launchpad"
open android studio, click next, select default sdk path click on next..
it would ask for proxy give the proxy details(if you are behind a proxy)

http, host='<proxy url>' port=<port> --proxy=http "platforms;android-25”
enable https also

Click next.. Downloading of the components will start.
It will take lot of time even after connecting to lan.

once the android studio opens, go to SDK manager and in Platform, select version from 7,6,5(all) and update. in SDK tools we need emulator. download these packages.

(Not Required) Setting path for Android home
   export ANDROID_HOME=/Applications/ADT/sdk
   export PATH=$PATH:$ANDROID_HOME/bin

For Mac
Android studio automatically sets Android_Home to : /Users/sriramkukkadapu/Library/Android/sdk

if it is not set you can run: export ANDROID_HOME=$HOME/Library/Android/sdk

Installation is done. Now we need to create a AVD(Android Virtual Device or Emulator)

AVD Manager (Or) Emulator

First set these env variables. In Terminal


Go to Android Studio-> AVD Manager -> create virtual device.
Click Next(device selection)
In the System image. install all the android version images(click download link in each of them and download the packages)
Install 8,7 versions

Once the device is ready, 
Open Emulator

we need to install the apk file of the application which you want to run in Emulator
In the mac terminal go to the path where .apk file is present and run this command.

adb install <testapp.apk>

This command will install the application in the emulator(which is currently running).

Sunday, October 8, 2017

Windows - Schedule Testng.xml to run automatically without Jenkins

1st create a batch file to run Testng.xml automatically.
For Maven project the batch file looks similar to below. If your project is not a maven project(you need to specify the path of the libs explicitly)

set projectLocation=<C:\SVN-IndirectWorkspace\...>
cd %projectLocation%
mvn clean test -DsuiteXmlFile=<Path of testng.xml>

Ex(Maven Project):

set projectLocation=C:\SVN-IndirectWorkspace\TestProj\
cd %projectLocation%
mvn clean test -DsuiteXmlFile=testng.xml

Ex(Normal Project):

set projectLocation=C:\GitRapo\MyProject
cd C:\GitRapo\MyProject
set classpath=C:\GitRapo\MyProject\bin;C:\GitRapo\MyProject\lib\*
java org.testng.TestNG C:\GitRapo\MyProject\testng.xml

Test the bat file once by executing it.

Now we can create a Windows Task to run this batch file on the desired time(Daily/weekly etc).

Follow the steps in this blog post:


Monday, September 18, 2017

Installing Maven in Mac

1. Download apache-maven-3.5.0-bin.tar.gz from Apache maven website.

2. extract the above file in any directory in your machine(lets refer as: <directory_maven>)

$ cd <directory_maven>
$ ls
(should list all contents)
$ export M2_HOME=/Users/<your username>/<directory_name>/apache-maven-3.5.0

Ex(in my machine): /Users/sriramkukkadapu/Downloads/apache-maven-3.5.0

Note : above path can also be something like /usr/local. provide accordingly.

$ export M2=$M2_HOME/bin

3. This is a important step. JAVA_HOME should be configured properly.
To check the current JDK home. go to the root folder in ur user(just do cd.. multiple times). 
Then go to /Library/Frameworks/JavaVM.framework/Versions/
here you will find current JDK version. Ex jdk1.8.0_144.jdk (in my machine)

Now form the below path with your JDK Version Replaced.

/System/Library/Frameworks/JavaVM.framework/Versions/<Your JDK Version>/home

Ex(My machine) : /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/home

Now Set JAVA_HOME Variable.

$ export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/home

4. Setting Path Variable to Java_Home/bin.

$ export PATH=$M2:$JAVA_HOME/bin:$PATH

5. Done, Now check maven version

$ mvn –version

Apache Maven 3.5.0 (ff8f5e7444045639af65f6095c62210b5713f426; 2017-04-04T01:09:06+05:30)
Maven home: /Users/sriramkukkadapu/Downloads/apache-maven-3.5.0
Java version: 1.8.0_144, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8

OS name: "mac os x", version: "10.11.6", arch: "x86_64", family: "mac"

Hope it is useful :)

Thursday, August 10, 2017

How to schedule a Batch File to run automatically in Windows 10/8/7

here are occasions where you might need to schedule to run a batch file automatically in your Windows. In this article I’ll suggest a tip on how to schedule a Batch file automatically using Task Scheduler.

Schedule a Batch File to run automatically

Step 1: Create a batch file you wish to run and place it under a folder where you have enough permissions. For example under C drive.
Step 2: Click on Start and under search, type in Task and click open Task Scheduler.

Step 3: Select Create Basic Task from the Action pane on the right of the window
                schedule a Batch File to run automatically

Step 4: Under Create Basic Task, type in the name you like and click Next.

Step 5: From the Trigger select the option you like and click Next.

I chose Daily and clicked Next, which brought me to this screen.

Step 6: Then click on Start a Program and click Next.

Step 7: Now click on Browser and select the batch file you like to run.

Step 8: Finally, click on Finish to create the Task.
Now that we have created a Task, we have to make sure it runs with the highest privilege. Since we have UAC settings we have to make sure that when you run the file it should not fail if it does not bypass the UAC settings.
So click on Task Scheduler Library.

Then double click on the Task you just created.
Step 8: Click on Run with Highest privilege then click OK.

Monday, April 17, 2017

Java Eclipse Console doesn't show whole output - How to resolve ?

What are the preferences for the console? Especially check the settings "Fixed width console" plus "Limit console output". Maybe your console simply can't hold that many characters in one line.

[EDIT] Now Eclipse eventually has to cut the data in the console since it doesn't have infinite amounts of memory. If the console is still cut off, you can use this trick: Open the "Run Configurations" dialog (Found in the drop down menu for the green "run" button).
The tab "Common" tab has options in the "Standard Input and Output" group at the bottom to save a copy of all output in a file. You can then use your OSs tools to examine this file.
Also note that very long lines can make Eclipse slow (i.e. it can hang for a couple of seconds). 

This is due to a bug in the regexp matching patterns for Exception stack traces. If that happens, limit the line length to 1000 characters or less.
This is especially a problem with Spring which sometimes creates exceptions that have 50'000 characters in the message.

If you have a similar problem with the CDT Global Build Console, see here: Eclipse CDT Build Console output not displaying entire compiler output

Output will be saved to the selected file. It worked for me. Hope it is useful for others too.

Friday, March 31, 2017

VIdeo on how to use Linkedin

Friends I made this video, to share my knowledge on how to use Linkedin.

Pls watch it. Very useful. Try to use LinkedIn in the way mentioned in video and try to get referrals for various companies.

Below Video is with LinkedIn Old UI. Just sharing this for reference, This is more in detail. You can try the same tricks in new UI.

Also share with your friends.


Hi Friends,

Today i am going to show how to use LinkedIn[New UI] to connect with people from various companies.

And some search techniques too.

1st of all you need to create your profile completely. I will show my profile for example.

See i have added all details, company, project, responsibilites etc
Education, finally Resume also you should upload.

So once your profile is created you can go ahead and add connections to your network

There are types of connections.

1st connections - Are the people who you are directly connected with. Lets see
So all these are my 1st connections.to whom i can send message directly

2nd connections - Are the connections of my connections similar like facebook - friend of my friend. For such connections you can send a request.

Let us search for ex : Infosys HR lets ee who are all my 1st connections

Right side we can see 3 buttons, in that select 1st connections

I have more than 100 1st connections to whom i can directly message. Sounds wow :)

Lets say i want to add more people from infosys, then deselect 1st connections and select 2nd connections

See you will get connect button enabled, so just send request thats it. If you open their profile. it wil show your invitation is pending.

Once people accepts your invitation, they will be part of your network.

In connections everything is listed here according to recently added date, so recent connection comes 1st, this will make things easy as you know who you added recently you can directly message them. Als you can filter your connections like this,

But i suggest to filter connections from search page itself, that is more accurate and you can directly 2nd connections in the same screen. This is the screen i spoke about.

Lets see how to do some filters. Lets say i want to add all Test Managers in infosys. Select current company as Infosys, this is because if they worked previously in infosys and now in some other company, still it will show in your result, but we need who is currently working in infosys so we need to select current company as infosys. Got it :)

So send request to all these. 

Like this you can search any profile. Lets say informatica domain i want to connect to managers in various companies, lets see how to search. 

Lets search for ABAP guys in all the companies

Ok now see we are getting connections from various location, lets filter only bangalore people.see we got only bangalore connections

So this is how we can use the new linked in which has the latest UI :)

We have already shared a video earlier on how to use linkedin[old UI] as LinkedIn has upgraded ;) we are sharing this new video.

Refer to old video as well, it has more(good) info like this. You can try those things here in new UI.

Pls share this video with all your friends.

All the best friends!!

Old video link you can see in description

Link to the Video - Youtube

Firefox - Selenium - Fire Path is not visible in Firebug - Solution

Steps to resolve this problem:

  1. Open firefox
  2. Type about:config in the explorer
  3. click on the I uderstand button
  4. Now in the search box enter "browser.tabs.remote.autostart.2" (without quotes) and hit enter
  5. Set the value as false ( you need to click the property to toggle the values)
  6. close the firefox and open again
  7. Launch firebug ...Now you should see your fire path and firefinder back