Using the Appium Events API

January 30, 2026 · 8 min read · Tool Comparison

HeadSpin Platform
Automated & amp; manual testing made easygoing through datum skill perceptiveness.
Differentiating capabilities:
  • Extensive end-to-end automation of QA operation
  • Comparative analysis of app performance against peers
  • Continuous monitoring of app performance using synthetic data for higher accessibility of apps
  • Easy-to-use developer friendly platform
cloudtest go
Low-priced Real Device Testing for Emerging Teams
cloudtest go
Low-priced Real Device Testing for Digital Enterprises
cloudtest go
The Ultimate Solution for a Powerful Blend of Functional & amp; Performance Testing!
cyol
TEM
New
Centralized nomadic tryout execution in cloud
cyol
Enhance Your Accessibility Testing With HeadSpin
cyol
Automate camera-based testing

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

retail

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎

Using the Appium Events APIUsing the Appium Events API

Using the Appium Events API

Published on
November 6, 2019
Updated on
Published on
February 13, 2022
Updated on
 by 
 Jonathan LippsJonathan Lipps
Jonathan Lipps
The events api

Ever wondered what goes on under the punk while Appium is starting up, say, an iOS session using the XCUITest driver? Sometimes this is a process that takes several minutes, and sometimes it only takes a handful of moment. Having a look at the Appium logs can clear up this confusion (maybe you notice that the initiatory time you run an with a new edition of Appium, it spent clip rebuild WebDriverAgent -- that create signified).

Check out:

Just looking at the log doesn & # x27; t necessarily say you howlongAppium spent within each zone of its startup routine, though. You could become on timestamps in the logs (habituate-- log-timestamp), but so you have to do a bunch of mental gymnastics to develop a picture of the startup flow over time.

Improve The Appium Testing Experience with HeadSpin.!

Getting case datum

For this reason, the Appium squad developed something called the & quot; Events API & quot; (or sometimes the & quot; Event Timings API & quot;). Basically, the timestamps of respective point of interest in the lifecycle of a session are logged automatically as & quot; case & quot;, which can be retrieved at any point during the test.

Also check:

Previously, it was possible to retrieve events use thegetSessionDetailscommand:


Mapdetails = driver.getSessionDetails (); Mapcase = details.get ('events ');

For this to act, you also had to use theeventTimingscapability, and set it totrue, in order for Appium to decorate the session details response with the appropriate timing information. However, in the W3C protocol there is no road that correspond togetSessionDetails, and so the Appium team has added its own route, which is indorse in the Java client as thegetEvents command:

Pro tip: Tools like SUSA can handle this autonomously — upload your app and get results without writing a single test script.

ServerEvents events = driver.getEvents ();
Read:

Understanding event information

What you get back from this vociferation is aServerEventsaim encapsulating the assorted types of datum returned with this API. Let & # x27; s take a look at the (truncated) raw API answer for an example call, so you can see its flesh:

{`` commands '': [{`` cmd '': `` findElement '', `` startTime '': 1573001594602, `` endTime '': 1573001594810}, {`` cmd '': `` getLogEvents '', `` startTime '': 1573001599636, `` endTime '': 1573001599636}], `` xcodeDetailsRetrieved '': [1573001580191], `` appConfigured '': [1573001586967], `` resetStarted '': [1573001586969]}

There are two independent sections here, one markcommands, and then a clustering of former names consisting of timestamps. All commands sent to the Appium server are considered events, and their start and end times are tracked. In addition, the hand-picked named case are include, for representativexcodeDetailsRetrievedor appConfiguredabove. (In all cases, the numeric values are timestamps in millisecond.)

Also read:

The ServerEventsobjective for this understanding has acommandsfield and aneventsbattlefield, each constituting a list of their own type (CommandEvent and ServerEvent) respectively, and check the case name and timestamp (s).

Custom events

In addition to the hand-picked events mechanically included by the Appium squad, you can also state the Appium server to include yourowncase within the event log, so that you can have a platter of when action within the domain of your trial logic occupy spot with respect to the built-in Appium dictation. To do this, you need to log the event:

CustomEvent evt = new CustomEvent (); evt.setVendorName (`` prefix ''); evt.setEventName (`` eventName ''); driver.logEvent (evt);

In the example above, we are logging an & # x27; eventName & # x27; event with the vendor gens & # x27; prefix & # x27;. Why do we need this vendor prefix? To ensure that custom-made events can never conflict with built-in ones, or with events lumber by another library. These custom case will show up when you phonegetEventsafterwards on! Here are some that I spark in a test of my covering:

... `` theapp: onLoginScreen '': [1573001595285], `` theapp: testEnd '': [1573001599630] ...
Recommended post:

If you want, you can use the Java client to write out the raw data in JSON format somewhere on disk for use with other coating, too:

// assume we get ServerEvents object 'events' events.save (new File ('/path/to/events.json ') .toPath ());

With all of this raw information, you could build interesting visualizations of the clip Appium spent in between each of these events. But you don & # x27; t really need to, because the Appium squad already built a instrument to do this for you! It & # x27; s phone theEvent Parser, and it & # x27; s a CLI tool you install via NPM:

npm install -g appium-event-parser

You can use the Event Parser to give a timeline of all the case that are described in a JSON file, for example. (Did you notice the save command above? It become you exactly what you need to make this happen).

appium-event-parser -t -i /path/to/events.json

(The -i flag is followed by the path to the data file, and -t tells the program you need a timeline printed out. You can also legislate an -l flag followed by a number to change the routine of line the timeline takes up). Once you run this command, you & # x27; ll be recognise by a nice slight timeline:

Appium events API timeline

You can also control out aentire sample testusing these features! Let me know if you come up with any interesting use cases for this API; I & # x27; m sure there & # x27; s some great hypothesis out there.

Author & # x27; s Profile

Jonathan Lipps

LinkedIn
Author & # x27; s Profile

Piali Mazumdar

Lead, Content Marketing, HeadSpin Inc.

Piali is a dynamic and results-driven Content Marketing Specialist with 8+ age of experience in crafting engaging narratives and marketing collateral across diverse diligence. She excels in collaborating with cross-functional teams to develop innovative content strategies and deliver compelling, reliable, and impactful substance that resonates with target audience and enhances brand authenticity.

LinkedIn

Using the Appium Events API

4 Parts

regression intelligence blog
-

Regression Intelligence hardheaded guide for advanced users (Part 3)

Coming Soon
Regression Intelligence practical guide for advanced users
-

Regression Intelligence practical guide for innovative users (Part 4)

Coming Soon

Discover how HeadSpin can empower your business with superior essay capabilities

Our Platform enables you to:
accelerate time-to-market
Accelerate time-to-market, gaining a competitive edge
faster development cycles
Boost developer/QA productivity with faster ontogeny round
automated buil-over-build regression testing
Automate build-over-build regression testing for consistent resultant
gain better visibility into functional & performance issues
Gain best visibility into functional and performance issues
reduce mean time
Reduce meanspirited clip to identify/resolve during test, QA, and production
evaluate audio, video & qoe
Evaluate audio, picture, and content quality of experience (QoE) effortlessly
The trusted choice for global enterprise
Adobe
Hargreaves Lansdown
Truecaller
Crazylabs
Nedbank
Numeracle
Veryon
Close

Discover how HeadSpin can empower your occupation with superior try potentiality

Our Platform enable you to:
accelerate time-to-market
Accelerate time-to-market, gaining a competitive edge
faster development cycles
Boost developer/QA productiveness with quicker ontogeny rhythm
automated buil-over-build regression testing
Automate build-over-build regression testing for consistent results
gain better visibility into functional & performance issues
Gain better visibleness into functional and performance issues
reduce mean time
Reduce meanspirited clip to identify/resolve during test, QA, and production
evaluate audio, video & qoe
Evaluate audio, video, and content quality of experience (QoE) effortlessly
The trusted alternative for world enterprises
Close

Discover how HeadSpin can empower your business with superior testing capability

Our Platform enables you to:
accelerate time-to-market
Accelerate time-to-market, profit a private-enterprise edge
faster development cycles
Boost developer/QA productivity with quicker development rhythm
automated buil-over-build regression testing
Automate build-over-build regression testing for consistent results
gain better visibility into functional & performance issues
Gain better visibleness into functional and performance issue
reduce mean time
Reduce mean time to identify/resolve during examination, QA, and production
evaluate audio, video & qoe
Evaluate audio, video, and content quality of experience (QoE) effortlessly
The sure option for world enterprises
Close

Connet Now

Wipro LogoVMLYR Logo
Close
Book a Meeting
Products
footer down arrow
Solutions
footer down arrow
Industries
footer down arrow
Features
footer down arrow
Support
footer down arrow
Resource Center
footer down arrow
Why Choose HeadSpin?
footer down arrow
Copyright © 2026 HeadSpin, Inc. All Rights Reserved.

Automate This With SUSA

Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts needed.

Try SUSA Free

Test Your App Autonomously

Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.

Try SUSA Free