Quality Testing

Quality is delighting customers

http://www.gorillalogic.com/book/export/html/2289

 IDE

  1. How do I record a test?
  2. Open the IDE
  3. Create a new test project (right-click > New > MonkeyTalk Project) if you haven’t already.
  4. Create a new test script (right-click > New > Test)
  5. Connect to the app
  6. Click the record button
  7. Use the app and watch recorded commands coming in...
  8. How do I connect to the Emulator/Simulator?
  9. Open the IDE
  10. Start up your Android or iOS emulator/simulator and load it with your MonkeyTalk enabled app.
  11. Click on the connection dropdown button on the tool bar (on initial start up it will be the green android icon).
  12. Choose "Android Emulator" or "iOS Simulator", depending on your platform of choice.
  13. If connection was successful, a message to that effect should appear in the console.
  14. How do I connect to a device?
  15. Open the IDE
  16. Start up your Android or iOS device, load it with your MonkeyTalk enabled app, and let it connect to your wireless network.
  17. Click on the connection dropdown button on the tool bar (on initial start up it will be the green android icon).
  18. Choose "Networked Android or iOS device...".
  19. Enter the IP address of the mobile device.
  20. If connection was successful, a message to that effect should appear in the console.
  21. I'm having device connection issues. Record doesn't work on a device. Help?

Connection issues are pretty common, so you're not alone. Here's a quick tip that everyone should follow to help resolve connection issues to real devices:

 

The PC running the MonkeyTalk IDE and the device running the app under test MUST be on the same wifi network.

This not really true, but unless you or your network engineer have a good understanding of subnets, routers, NATing, etc. it is probably easiest to just be on the same wifi network. Also, if you are having connectivity issues with devices, we recommend beginning your testing adventures in the Simulator/Emulator as it is a little easier to get started and the odds of connection issues are basically zero.

iOS Agent

  1. What versions of iOS are supported?

The MonkeyTalk Agent for iOS requires iOS 4.0 or greater. If you have a version of iOS that doesn’t work with MonkeyTalk, please let us know about it.

  1. How do I install the MonkeyTalk Agent in my iOS app?

See the MonkeyTalk Agent for iOS Installation Guide.

  1. Can I test on a tethered iOS device without Wi-Fi?

No. MonkeyTalk tests can only run over the network to real iOS devices, even if they are tethered. If you are in a location without Wi-Fi, you can only test on the Simulator.

  1. Do I need to put accessibilityLabel on all of my components?

No, but it is recommended. MonkeyTalk does it’s best to pick a understandable monkeyId when recording, but it's even better to set it to a known value.

  1. I'm seeing a crazy dyld: Library not loaded: /usr/lib/libc++abi.dylib error trying to run on the Simulator 4.3. What gives?

Apparently there's a missing library. We recommend downloading libc++abi.dylib found here and just copy it into/usr/lib.

  1. Can I test iOS app on Windows PC?

Yes. You must use Mac hardware to develop the app and compile it the MonkeyTalk Agent for iOS. But once that is done, you could use an over-the-air app distribution mechanism (like TestFlight) to publish the app to any iOS device. And the the testers could run the MonkeyTalk IDE on a Windows PC and connect to their iOS device over the network. Once connected, they could record and playback tests as usual -- all from a Windows PC.

Android Agent

  1. What versions of Android are supported?

The MonkeyTalk Agent for Android requires Android 2.2 (Froyo) or greater. If you have a version or vendor flavor of Android that doesn't work with MonkeyTalk, please let us know about it. New Android releases frequently include new UI components, and while we endeavor to support recording and playback on all standard UI components, we sometimes miss a few. So, please let us know about any stock components that don't work.

  1. How do I install the MonkeyTalk Agent in my Android app?

See the MonkeyTalk Agent for Android Installation Guide.

  1. Can I run MonkeyTalk tests against a debug version of the app under test? Why is Android playback so slow?

Yes, it can be very useful to run MonkeyTalk tests with breakpoints in the app under test. When running a debug version of the app under test in the Emulator, be aware that the app can appear extremely slow in some cases (10+ seconds per command). Since the slowdown appears to be Emulator and adb related, we highly recommend running on real hardware

  1. Can I test on a tethered Android device?

Yes. Sometimes just unplugging and re-pluging a tethered device will help it connect. You can not run tests on a tethered device while the Emulator is running or vice versa. Lastly, if testing on a tethered device is an issue, testing works great on a un-tethered device over the Wi-Fi network.

  1. Do I need to put contentDescription on all of my components?

No, but it is recommended. MonkeyTalk does it's best to pick a understandable monkeyId when recording, but it’s even better to set it to a known value.

  1. I can't get the MonkeyTalk Android demo to work! What's wrong?

These are the steps you should follow to get the MonkeyTalk Android demo working properly: 1) In Eclipse, File > Import... > choose Existing Projects into Workspace > Navigate to the Android project demo1. 2) Right click on project > Properties > check Enable project specific settings > pick Compiler compliance level: 1.6.

MonkeyTalk Scripts

  1. What is the MonkeyTalk functional testing language?

MonkeyTalk is a powerful functional testing language. MonkeyTalk is keyword-driven -- you can directly add new commands to the language. MonkeyTalk is data-driven -- any command can be looped with CSV data file. MonkeyTalk is readable -- commands are recorded at the highest level (tap a button, select a row from a table, check a checkbox). MonkeyTalk is maintainable -- scripts are readable so it's easy to update them when the app is updated.

  1. Can I see a brief example of a MonkeyTalk script?

Here’s a simple login script (enter credentials then click the button):

Input username EnterText joe
Input password EnterText "my secret password"
Button LOGIN Tap

Next, here's a parametrized version of the same script:

Vars * Define usr pwd
Input username EnterText ${usr}
Input password EnterText ${pwd}
Button LOGIN Tap

Here’s how to invoke the parameterized login script from another script:

Script login.mt Run joe "my secret password"

For many more examples, see the MonkeyTalk Spec.

  1. Do I have to use the MonkeyTalk IDE?

No. While the IDE contains many nice features for recording, playback, test debugging, test creation, etc., it's not strictly necessary. You can easily create MonkeyTalk scripts in your favorite text editor and play them back via the Ant runner or the Java runner. See MonkeyTalk Ant Runner or MonkeyTalk Java Runner for details.

  1. Can I convert MonkeyTalk test scripts into Javascript?

Yes. Furthermore, MonkeyTalk supports selective Javascript overrides at the individual script level, so you can have most of your tests in MonkeyTalk and just those that demand a full programming language in Javascript.

  1. Can I see a brief Javascript example?

Here's the relevant Javascript for the simple login script from above:

app.input("username").enterText("joe");
app.input("password").enterText("my secret password");
app.button("LOGIN").tap();

  1. What other language bindings does MonkeyTalk support?

Currently, MonkeyTalk test scripts can be converted to Javascript. No other language bindings are supported.

 

Views: 1524

Tags: Monkey, Talk, guide, install

Comment

You need to be a member of Quality Testing to add comments!

Join Quality Testing

TTWT Magazine

Welcome to Quality Testing!

Sachin Natu

 Manager QA at IdeaS Revenue Optimization

Advertisement

Submit A Job

Submit A Tool

Advertisement

Videos

  • Add Videos
  • View All

Badge

Loading…

© 2013   Created by Quality Testing.

Badges  |  Report an Issue  |  Terms of Service