Titanium
The TiTestFairy Module extends the Appcelerator Titanium Mobile framework, with the TestFairy Android and iOS SDKs. The TestFairy SDK enables integration with TestFairy to give you a better understanding of how your app performs on real devices. It tells you when and how people are using your app, and provides you with any metric you may need to optimize your user experience and code.
Installation
- Simply add the following lines to your
tiapp.xml
file:
<modules>
<module platform="iphone">com.testfairy.titestfairy</module>
</modules>
Download the latest release.
- Be sure to either download either the Android (com.testfairy.titestfairy-android-2.1.3.zip) or the iOS (com.testfairy.titestfairy-iphone-2.1.3.zip) depending on the platform you're targeting.
Add the module to your Titanium Mobiles
- “Help” -> "Install Mobile Module..."
- or by unzipping the contents of the module zip file into your
Titanium/modules/iphone
orTitanium/modules/android
folders.
Include the module in your code and use it:
var TiTestFairy = require('com.testfairy.titestfairy');
TiTestFairy.begin("<APP TOKEN>");
NOTE: Replace 'APP TOKEN' with your token, which can be found in the user preferences page.
For more detailed code examples take a look at our example app.
Usage
Identifying your users
See the SDK Documentation for more information.
Session Attributes
See the SDK Documentation for more information.
Remote Logging
See the SDK Documentation for more information.
Reference
TiTestFairy.version;
- Returns the version of the TestFairy SDK.
TiTestFairy.setCorrelationId(correlationId)
- Sets an identifier that can be looked up through dashboard.
TiTestFairy.pushFeedbackController()
- Present a feedback dialog to the user.
TiTestFairy.sendUserFeedback(string)
- Send a feedback on behalf of the user. Call when using a in-house feedback view controller with a custom design and feel. Feedback will be associated with the current session.
TiTestFairy.updateLocation(locations)
- Mark geo location at this point (to be used with navigator.geolocation.getCurrentPosition
).
TiTestFairy.checkpoint(checkpointName)
- Mark a checkpoint in session.
TiTestFairy.pause()
- Pauses the current session until resume() is called.
TiTestFairy.resume()
- Resumes a paused session.
TiTestFairy.sessionUrl()
- Returns the address of the recorded session on TestFairy's developer portal. Will return nil if recording has not started yet.
TiTestFairy.takeScreenshot()
- Takes a screenshot.
Last updated on 2023-03-23