Package Overview
Overview of the @testrelic/appium-analytics package — what it provides, how to install it, and its exports.
@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?
| Export | Import path | What it does |
|---|---|---|
TestRelicService | @testrelic/appium-analytics/service | WDIO service — runs alongside the live Appium session to collect data per test |
TestRelicReporter | @testrelic/appium-analytics | WDIO reporter — builds the JSON/HTML report after all tests complete |
mergeReports() | @testrelic/appium-analytics/merge | Programmatic API to merge reports from multiple WDIO workers |
testrelic-appium | CLI binary | merge, serve, and open report commands |
How do I install it?
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:
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 overview.
TestRelic for Appium
Welcome to TestRelic for Appium — the AI-driven Testing Observability Platform that captures device logs, WebDriver commands, network traffic, and screenshots from your Appium mobile tests.
Get Started with Appium
Install @testrelic/appium-analytics in your WebdriverIO + Appium project and start capturing mobile test analytics in minutes.