MonkeyTalk is a free and open source mobile app testing tool that allows users to write automated tests for native, mobile, and hybrid iOS and Android apps. It works with both real devices and emulators. Tests are written using a simple domain-specific language and can range from simple smoke tests to complex data-driven test suites. MonkeyTalk provides an IDE with features like a component tree, test editor, and results console. It supports cross-platform testing through either installing agents in each app or using a Java API to write tests as standard JUnit tests. While it cannot use XPath or CSS selectors, MonkeyTalk is able to locate and interact with UI elements using component IDs.
2. Overview
MonkeyTalk is mobile app testing
tool. A free, open source, simple-to-use
tool, have DSL. Automates tests for native,
mobile, and hybrid iOS and Android apps everything from simple "smoke tests" to
sophisticated data-driven test suites. Work
with real devices and emulators.
3. Monkey TalkIDE
•
•
•
•
Toolbar - Contains controls for connecting, recording and playing.
Editor - Displays and edits recorded scripts.
Files - Shows scripts, suites, and data files that can be run or edited.
Console - Reports status and test results from running scripts.
4. Component Tree
The entries in the
Tree show information
about MonkeyTalk's view
of your UI. The elements
of each entry are:
MonkeyTalkComponentNa
me Ordinal (MonkeyID)
[alternate Monkey IDs]
nativeComponentClassNa
me visible/hidden
5. Component Tree elements
description
•
•
•
•
•
•
MonkeyTalkComponentName: The name of the MonkeyTalk Component
Typewhich corresponds to the UI element.
Ordinal: For Components which can be automated, a number wll be shown as #n,
where n is the "Index Number MonkeyID"
MonkeyID - in parentheses () - this is the "default" MonkeyID which will be
recorded when the component is used
alternate Monkey ID(s) - in square brackets [] this is a list of alternate
MonkeyIDswhich can be used in your scripts - for instance, the acessibilityLabel or
acessibilityIdentifier on iOS, or the contentDescriptor on Android. You can use any
of thexe MonkeyIDs (if they are present) as an alternative to the "default"
MonkeyID
nativeComponentClassName - the name of the native platform class for the
Component
visible/hidden - an idicator of whether or not the component is visible. This
corresponds to the underlying platform's property for the component; even if the
component is scrtolled off the screen ("clipp[ed") this may show "visible".
6. MonkeyTalk Agents
You'll need to install the MonkeyTalk
Agent in your iOS app or Android app or
both for cross-platform testing.
7. Java API
The MonkeyTalk Java API is a new
MonkeyTalk feature available starting with
release v1.0.58. The Java API gives you the
ability to write MonkeyTalk tests as
standard pure-Java JUnit tests.
11. Maven dependencies
Since MonkeyTalk is not yet in Maven Central, you need to install the jar into
your local repository manually like this:
mvn install:install-file -Dfile=/path/to/monkeytalk-java-1.0.58-all-in-one.jar
12. Results
Advantages:
• Open Source
• One test for both platforms(iOS & Android)
• Java API
• Good guide
Disadvantages:
• Use Agent
• Problem with some hybrid application
• Can't use Xpath and CSS selectors
13. Summary
Monkey Talk looks like good tool. Have
good sides like cross-platform tests, API, open
source license. And disadvantages not critical.
We can use Monkey ID instead Xpath and
problem only with hybrid apps where autogenerated ID and other web attributes.