Optimizing WebDriverAgent Startup Performance

June 15, 2026 · 10 min read · Performance Testing

HeadSpin Platform
Automated & amp; manual examination create easy through information skill insights.
Differentiating capabilities:
  • Extensive end-to-end automation of QA process
  • Comparative analysis of app execution against peers
  • Continuous monitoring of app performance using synthetic data for higher handiness of apps
  • Easy-to-use developer friendly platform
cloudtest go
Low-cost Real Device Testing for Emerging Teams
cloudtest go
Affordable Real Device Testing for Digital Enterprises
cloudtest go
The Ultimate Solution for a Powerful Blend of Functional & amp; Performance Testing!
cyol
TEM
New
Centralized mobile test executing in cloud
cyol
Enhance Your Accessibility Testing With HeadSpin
cyol
Automate camera-based testing

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

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

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

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

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

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

retail

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

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

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

Optimizing WebDriverAgent Startup PerformanceOptimizing WebDriverAgent Startup Performance

Optimizing WebDriverAgent Startup Performance

Published on
July 10, 2019
Updated on
Published on
March 14, 2022
Updated on
 by 
 Jonathan LippsJonathan Lipps
Jonathan Lipps

Some Appium users have asked me how to speed up their iOS exam, citing the length of clip it takes to start tests which use the WebDriverAgent library (all tryout utilise the XCUITest driver).

Most of the perceived speed of an can & # x27; t be meliorate due to the base speed of booting simulator or the UI actions themselves. The slowest part, which user were asking me how to avert, is the initial startup of a test: the time between direct the first POST /session command and the response indicating that your test script can begin sending bidding. We & # x27; ll telephone this time period the & quot; session conception & quot; time.

Let & # x27; s start with the most basic:

private String APP = `` https: //github.com/cloudgrey-io/the-app/releases/download/v1.9.0/TheApp-v1.9.0.app.zip ''; @ Before public nothingness setUp () drop IOException {DesiredCapabilities crest = new DesiredCapabilities (); caps.setCapability (`` platformName '', `` iOS ''); caps.setCapability (`` platformVersion '', `` 12.2 ''); caps.setCapability (`` deviceName '', `` iPhone Xs ''); caps.setCapability (`` automationName '', `` XCUITest ''); caps.setCapability (`` app '', APP); driver = new IOSDriver(new URL (`` http: //localhost:4723/wd/hub ''), detonator);} @ After public vacancy tearDown () {try {driver.quit ();} catch (Exception ign) {}} @ Test public void testA () {assertEquals (1,1);} @ Test public void testB () {assertEquals (1,1);} @ Test public void testC () {assertEquals (1,1);} @ Test public void testD () {assertEquals (1,1);} @ Test public nothingness testE () {assertEquals (1,1);} @ Test public void testF () {assertEquals (1,1);}

This is essentially the default template we use for an iOS test in theAppiumPro sample code repository. We have our sampling app hosted on a web Url for convenience, a @ Before step which create a fresh session for each trial, an @ After footstep to delete the session at the end of each test, postdate by six tests which do nothing.

Check:

Each of the six tests take12.8seconds on average. We can cut this down by two third!

There are desired capabilities we can specify to greatly trim the clip it lead to create a session. Appium is establish to cater to a large number of device, for use in many different situations, but we likewise require to get sure that it is easy to get started automating your first trial. When specifying desired capabilities, Appium will canvas the state of your system and choose default values for every desired capability which you don & # x27; t specify. By being more specific, we can have Appium skip the work it does to choose the nonremittal values.

Also check:

Our first improvement is to set the app location to a file already on the host device. Downloading an app from a remote source is add3.9second to each test in the suite.

private String APP = `` /Users/jonahss/Workspace/TheApp-v1.9.0.app.zip '';

Your test rooms probably already does things this way, but for our demo repository this really speeds thing up.

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

See:

Running the trial, it & # x27; s leisurely to notice that the app gets reinstalled on the simulator for each exam. This takes a lot of time and can be jump. You may have sure test which require a fresh install, or need all the app data cleaned, but those tests could be put into a separate suite, leaving the majority of tests to run faster by reusing the same app. Most user should be familiar with the noReset desired capability.

caps.setCapability (`` noReset '', true);

This salvage an additional2.9seconds per test.

Also see:

That was the easy material, giving us an average startup time of6minute per test, but we can shave off another2.1seconds, which is a 35 % improvement.

Appium uses the simctl commandline creature provided by Apple to match the deviceName desired capability to the udid of the simulator. We can skip this step by set the simulator udid ourselves. I looked through the logs of the previously run test and took the udid from there:

caps.setCapability (`` udid '', `` 009D8025-28AB-4A1B-A7C8-85A9F6FDBE95 '');

This saves0.4moment per test.

Read:

Appium likewise gets the bundle ID for your app by parsing the app & # x27; s plist. We can render the know bundle ID, again taking it from the logs of the last successful trial. This ends up saving us another0.1 seconds:

caps.setCapability (`` bundleId '', `` io.cloudgrey.the-app '');

When charge the WedDriverAgent server, Appium loads the file from wherever XCode saved it after compilation. This location is called the & quot; Derived Data Directory & quot; and Appium fulfill an xcodebuild bidding in order to get the locating. Again, we can look through the logarithm of the last test run and provision this value ourselves, allowing Appium to skip the employment of calculating it:

caps.setCapability (`` derivedDataPath '', `` /Users/jonahss/Library/Developer/Xcode/DerivedData/WebDriverAgent-apridxpigtzdjdecthgzpygcmdkp '');

This salvage a whopping1.4moment. While xcodebuild is useful, it hasn & # x27; t been optimized to supply this bit of information.

Also read:

The last optimisation is to specify the webDriverAgentUrl desired capability. If specified, Appium skips a step where it checks to do certain that there are no obsolete or abandoned WebDriverAgent processes however escape. The WebDriverAgent server needs to already be run at this position, so we can only use this desired capability after the first exam starts the host.

caps.setCapability (`` webDriverAgentUrl '', `` http: //localhost:8100 '');

So, what have we done? Using a local file and noReset reduced the fundament test clip from12.8seconds to6bit, making test startup53.3% faster.

On top of that, we performed some more obscure optimizations to improve test times another23.9%, shaving off another1.3 seconds.

Here & # x27; s a optic crack-up of what Appium spends its time doing during one of our trial:

Breakdown of an Appium test

& quot; Remaining test time & quot; and & quot; session shutdown & quot; are all that remain in our optimized test:

individual String APP = `` /Users/jonahss/Workspace/TheApp-v1.9.0.app.zip ''; individual IOSDriver driver; private static Boolean firstTest = true; @ Before public void frame-up () throws IOException {DesiredCapabilities caps = new DesiredCapabilities (); caps.setCapability (`` platformName '', `` iOS ''); caps.setCapability (`` platformVersion '', `` 12.2 ''); caps.setCapability (`` deviceName '', `` iPhone Xs ''); caps.setCapability (`` automationName '', `` XCUITest ''); caps.setCapability (`` app '', APP); caps.setCapability (`` noReset '', true); caps.setCapability (`` udid '', `` 009D8025-28AB-4A1B-A7C8-85A9F6FDBE95 ''); caps.setCapability (`` bundleId '', `` io.cloudgrey.the-app ''); caps.setCapability (`` derivedDataPath '', `` /Users/jonahss/Library/Developer/Xcode/DerivedData/WebDriverAgent-apridxpigtzdjdecthgzpygcmdkp ''); if (! firstTest) {caps.setCapability (`` webDriverAgentUrl '', `` http: //localhost:8100 '');} driver = new IOSDriver(new URL (`` http: //localhost:4723/wd/hub ''), caps);} @ After public vacuum tearDown () {firstTest = false; try {driver.quit ();} catch (Exception ign) {}} @ Test public void testA () {assertEquals (1,1);} // ... 5 more tests

For all these tests, I kept the same simulator running. Starting up a simulator for the first test takes some extra clip. I also observe that the first test of every suite always takes a little bit longer even when the simulator is already running. For the timing statistics in this article, I omitted the initiative test from each run. None of them were that much longer than the average test, and the goal is to reduce total tryout suite time. If you have 100 test, an extra second on the first one doesn & # x27; t touch the full suite time much.

Don ’ t Rely on iOS Emulators & amp; Android Simulators.

That state, all this is splitting hairs, since as soon as your tryout contain more than a few commands, the amount of clip drop on inauguration is insignificant compared to the measure of time spend finding elements, look for aliveness, and loading assets in your app.

Full example code locatedhere.

For situations where a CI waiter is run Appium tests for the first time, further optimizations can be made to reduce the time spent compiling WebDriverAgent for the first test. We & # x27; ll discuss these in a future edition!

Author & # x27; s Profile

Jonathan Lipps

LinkedIn
Author & # x27; s Profile

Piali Mazumdar

Lead, Content Marketing, HeadSpin Inc.

Piali is a active and results-driven Content Marketing Specialist with 8+ years of experience in crafting engaging tale and marketing collateral across various industries. She surpass in collaborating with cross-functional teams to develop innovative message strategy and deliver compelling, unquestionable, and impactful message that resonates with quarry hearing and enhances marque authenticity.

LinkedIn

Optimizing WebDriverAgent Startup Performance

4 Parts

regression intelligence blog
-

Regression Intelligence practical guide for advanced users (Part 3)

Coming Soon
Regression Intelligence practical guide for advanced users
-

Regression Intelligence practical guide for advanced users (Part 4)

Coming Soon

Discover how HeadSpin can empower your business with superior testing capabilities

Our Platform enable you to:
accelerate time-to-market
Accelerate time-to-market, benefit a competitive edge
faster development cycles
Boost developer/QA productiveness with faster development cycles
automated buil-over-build regression testing
Automate build-over-build fixation testing for coherent results
gain better visibility into functional & performance issues
Gain best visibility into functional and execution issue
reduce mean time
Reduce mean time to identify/resolve during test, QA, and production
evaluate audio, video & qoe
Evaluate sound, video, and content quality of experience (QoE) effortlessly
The sure choice for planetary enterprises
Adobe
Hargreaves Lansdown
Truecaller
Crazylabs
Nedbank
Numeracle
Veryon
Close

Discover how HeadSpin can empower your business with superior testing potentiality

Our Platform enables you to:
accelerate time-to-market
Accelerate time-to-market, win a competitive edge
faster development cycles
Boost developer/QA productivity with faster ontogeny cycles
automated buil-over-build regression testing
Automate build-over-build regression testing for consistent results
gain better visibility into functional & performance issues
Gain best visibility into functional and execution subject
reduce mean time
Reduce mean time to identify/resolve during test, QA, and production
evaluate audio, video & qoe
Evaluate sound, picture, and contented caliber of experience (QoE) effortlessly
The trusted choice for global endeavour
Close

Discover how HeadSpin can empower your business with superior testing capabilities

Our Platform enables you to:
accelerate time-to-market
Accelerate time-to-market, gaining a competitive edge
faster development cycles
Boost developer/QA productiveness with faster development round
automated buil-over-build regression testing
Automate build-over-build fixation testing for consistent results
gain better visibility into functional & performance issues
Gain better visibility into functional and performance topic
reduce mean time
Reduce base clip to identify/resolve during test, QA, and production
evaluate audio, video & qoe
Evaluate sound, video, and content character of experience (QoE) effortlessly
The trusted choice for planetary 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