Skip to main content
Ask AI

Package Overview — Appium

@testrelic/appium-analytics is the SDK package for Appium mobile test analytics. It integrates into WebdriverIO as a service (data collection) and a reporter (report writing), capturing device logs, WebDriver commands, network traffic, screenshots, and video from your Android and iOS tests.

What does this package provide?

ExportImport pathWhat it does
TestRelicService@testrelic/appium-analytics/serviceWDIO service — runs alongside the live Appium session to collect data per test
TestRelicReporter@testrelic/appium-analyticsWDIO reporter — builds the JSON/HTML report after all tests complete
mergeReports()@testrelic/appium-analytics/mergeProgrammatic API to merge reports from multiple WDIO workers
testrelic-appiumCLI binarymerge, serve, and open report commands

How do I install it?

AI Prompt — Install and configure
Set up @testrelic/appium-analytics in this WebdriverIO project:

1. Run: npm install @testrelic/appium-analytics
2. Run: npm install --save-dev webdriverio @wdio/reporter
3. In wdio.conf.ts:
- Add TestRelicService (from '@testrelic/appium-analytics/service') to services with options:
includeDeviceLogs: true, screenshotOnEvery: 'failure'
- Add TestRelicReporter (from '@testrelic/appium-analytics') to reporters with options:
outputPath: './test-results/testrelic-timeline.json', openReport: true
- Add onComplete hook: await TestRelicReporter.finalize(process.cwd())
Show me the complete updated wdio.conf.ts.

Quick configuration

Add both plugins to wdio.conf.ts and call TestRelicReporter.finalize() in onComplete:

wdio.conf.ts
import { join } from 'node:path';
import { TestRelicService } from '@testrelic/appium-analytics/service';
import { TestRelicReporter } from '@testrelic/appium-analytics';

export const config = {
// ...capabilities, framework, specs...

services: [
[TestRelicService, {
includeDeviceLogs: true,
includeNetworkLogs: true,
screenshotOnEvery: 'failure',
}],
],

reporters: [
'spec',
[TestRelicReporter, {
outputPath: './test-results/testrelic-timeline.json',
openReport: true,
}],
],

async onComplete() {
await TestRelicReporter.finalize(process.cwd());
},
};

The service and reporter work together: the service captures raw data during each test; the reporter assembles and writes the final report after all tests finish.

What's next?


Using Playwright for browser testing?

For the @testrelic/playwright-analytics package, see the Playwright Package Overview.

Was this page helpful?
Last updated on by Srivishnu Ayyagari