• Home
  • Contact Us
  • About Us
  • Search
VTUFORUM
  • Home
  • Portal
  • Member List
  • QuestionPapers


To access all the content of this forum/community Please:

Login                       OR Register




VTUFORUM / KnowledgeBase / Concepts and Tutorials v
1 2 3 4 5 Next »
/ Setup MonkeyTalk with Android Studio

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Setup MonkeyTalk with Android Studio
Author Message
Sandeep Offline
Sleepy Admin
*******

Posts: 731
Joined: Sep 2012
Reputation: 16
Post: #1
Setup MonkeyTalk with Android Studio
Hello friends, this is an article for those who are trying to perform the test automation using the monkeytalk and using Android studio for the Android application development. Following are the steps I followed

Instrument the Android App built using Android Studio IDE into MonkeyTalk compatible

1. Create a new Application on Android studio

2. Open the project in project mode in left panel(out of project, package and Android)

3. Create a new folder called “monkey-libs” in app folder

4. Copy “monkeytalk-agent-2.0.10.jar” from moknkeytalkpro -> agent -> android

5. Create a folder called “monkeytalk” in src folder

6. Create Androidmainfest.xml in “monkeytalk” folder and put the following content

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.tes4kor.testapplication" > //packagenameof your application
<uses-permission android:name="android.permission.GET_TASKS"/>
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>

7. Add the following permissions to main Androidmainfest.xml also

<uses-permission android:name="android.permission.GET_TASKS"/>
<uses-permission android:name="android.permission.INTERNET"/>

8. Some changes the gradle.build of module and gradle.build of application. You can these files from the following post

9. Once all these steps are done. Go to Build -> Clean Project. It should generate the gradlew file in the home directory

10. If gradlew is generated, open the file .idea -> workspace.xml, search for install keyword, in that XML tag find the value. Usually it is somewhat like “installDebug”

11. Open the terminal at the Android Studio. Keep home directory of your project pointed and execute
gradlew clean installDebug //the term "installDebug" - it depends on the application name, check .ideas/workspace.xml in the your project, search for keyword "install" its value represents what you should use

12. This will directly install the app into the device and the app is already instrumented, you can find the instrumented app in “application_name\app\build\outputs\apk”

13. Import into Monkeytalk IDE and record the application


In the following post I am pasting the gradle.build of module and the application, you can use them. Your system will identify the plugins and dependencies if its connected to Internet and working online or else make correct proxy settings..

Thank you, comment if you have any problems while performing these actions
(This post was last modified: 02-17-2015 09:38 AM by Sandeep.)
02-17-2015 09:29 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Sandeep Offline
Sleepy Admin
*******

Posts: 731
Joined: Sep 2012
Reputation: 16
Post: #2
RE: Setup MonkeyTalk with Android Studio
//gradle.build for the module

buildscript {
repositories {
mavenCentral()

}
dependencies {
classpath 'com.uphyca.gradle:gradle-android-aspectj-plugin:0.9.5'
classpath 'com.android.tools.build:gradle:1.0.0'

}
}

task wrapper(type: Wrapper) {
gradleVersion = '2.0'
}


apply plugin: 'com.android.application'
apply plugin: 'android-aspectj'


android {
compileSdkVersion 21
buildToolsVersion "21.1.2"

defaultConfig {
applicationId "com.example.tes4kor.testapplication"
minSdkVersion 15
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}


dependencies {
//compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
compile files("monkey-libs/monkeytalk-agent-2.0.10.jar")
}
02-17-2015 09:29 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Sandeep Offline
Sleepy Admin
*******

Posts: 731
Joined: Sep 2012
Reputation: 16
Post: #3
RE: Setup MonkeyTalk with Android Studio
//gradle.build for the application

buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
mavenCentral()
}
}
02-17-2015 09:30 AM
Visit this user's website Find all posts by this user Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


[-]
Share/Bookmark (Show All)
Facebook Linkedin Twitter MySpace

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  RxJava in Android example code Sandeep 0 1,866 10-07-2015 10:41 PM
Last Post: Sandeep
  Form validation made easy in Android with saripaar Sandeep 0 2,086 09-28-2015 10:03 AM
Last Post: Sandeep
  Develop Android Application using PhoneGap(Cordova) Sandeep 2 2,892 07-03-2015 01:56 PM
Last Post: Sandeep
  Run Android ADB commands from Java programs Sandeep 0 5,756 04-01-2015 07:16 PM
Last Post: Sandeep
  Dynamic Instrumentation of Android App using Monkeytalk Sandeep 0 1,555 03-27-2015 06:48 PM
Last Post: Sandeep
  Developing Android and iOS app using HTML5 with Visual studio Sandeep 6 5,496 09-24-2014 10:16 AM
Last Post: Sandeep

  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:


User(s) browsing this thread: 1 Guest(s)
Contact Us | VTUFORUM | Return to Top | Return to Content | Lite (Archive) Mode | RSS Syndication
Powered By MyBB, © 2002-2018 MyBB Group. Theme created by TopAdmin.Net
copyright © 2012 vtuforum.com