Skip to main content


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+

testfairy-fetch-sessions --endpoint "" --user "" --api-key "0123456789abcdef" --project-id=1000 --logs

The logs are downloaded to a folder named testfairy-sessions with a directory structure as follows.

directory structure

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

  1. Under Settings, select Add Data in your Splunk forwarder.

    add data
  2. Select Monitor.

    select monitor
  3. Select Files & Directories.

    files and directories
  4. 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.

    browse directory
  5. 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.

    set the host

    It helps you search and create queries based on a specific session.

  6. Create a query where the host=<session id> to see logs related to a given session.