Splunk
TestFairy can integrate with Splunk to provide better insights into your mobile apps. This document explains how to export the app logs from TestFairy and import them into your Splunk installation.
Exporting Logs
Use the TestFairy Fetch Session Tool tool to download log files for a specific project.
npm install -g --link git+https://github.com/testfairy/testfairy-fetch-sessions.git
testfairy-fetch-sessions --endpoint "acme.testfairy.com" --user "john@example.com" --api-key "0123456789abcdef" --project-id=1000 --logs
The logs are downloaded to a folder named testfairy-sessions
with a directory structure as follows.
The directory which contains the session.log
file is also the session identifier. You can use this value to set the Host
value later.
Importing Logs Into Splunk
-
Under Settings, select Add Data in your Splunk forwarder.
-
Select Monitor.
-
Select Files & Directories.
-
Browse to the directory where the log files are downloaded. It's best to point to the top-level
testfairy-sessions
if you have multiple projects you'd like to monitor. -
After clicking Next, on the Input Settings page, set the Host using the Segment in path. Use the directory segment which contains the
session.log
file.It helps you search and create queries based on a specific session.
-
Create a query where the
host=<session id>
to see logs related to a given session.