skip to content

When your runner attaches to a browser already running remotely, what does it stop having to install?

level: juniorimportance: should knowfreq 57%

answer

  1. who started the engine
  2. it was running before you connected
  3. what fills the runner image
  4. the platform moves, the harness does not
  5. still need the address and the client

basics

~20 s

The browser build, and whatever on the runner had to be kept matching it, since the engine is already running on the far side. The runner still needs the client library, the endpoint address and everything the tests depend on.

solid answer

~40 s

Attaching joins an engine that is **already running** somewhere else, so nothing has to be started on your machine and nothing has to be downloaded to start it. The engine build leaves the runner image, and so does the installation step that kept the runner lined up with it. What stays is easy to under-count: the client library your tests call into, the endpoint address as configuration -- which on a hosted service commonly carries an account credential and is therefore a secret in its own right -- and every dependency the suite has of its own, from fixtures to the test framework. The two ends also still have to agree on a protocol they both speak. The useful one-line framing is that attaching moves the *platform* off your runner, not the *harness*.

go deeper

for a junior

Be able to say that the browser is already running on the far side, so the runner installs no engine build and starts no browser, and that the client library and the address are still yours to provide.

for a middle

Be ready to explain what actually leaves the runner image and what does not, and why the engine's identity is settled before your connection rather than chosen by it.

for a senior

Expect follow-ups about what the two ends must still agree on -- a protocol they both speak, and tests written for whatever the engine actually is -- once the installation step is gone.

for a principal

Be ready to weigh a thinner runner and a faster setup against depending on a build you never install, and to say how that changes what your team must still be able to reproduce locally.

## What is actually on the runner A test runner that drives a browser on its own machine has to carry that browser: the engine build, and whatever else has to stay lined up with it. That is usually the largest and most fragile part of the runner's setup. It has to be installed, it has to be the right build, and it has to be reinstalled whenever the image is rebuilt. When the runner instead **attaches to an engine that is already running somewhere else**, that whole burden leaves. There is nothing to download, because nothing is being started -- the engine was running before your connection existed, and your connection joins it rather than causing it. ## Why there is nothing to fetch The distinction worth holding onto is between *starting* a browser and *joining* one. - Starting a browser means something, somewhere, has to have the build. If that something is your runner, the build is the runner's problem. - Joining a browser means the build is already where it needs to be. Your side supplies a way to talk to it and nothing else. An attachment is the second case taken to its conclusion: no engine build on the runner, no installation step in the setup, and no version of an engine for the runner's image to pin. ## What does not leave This is the half candidates skip, and it is where a good answer separates itself. - **The client library.** Your tests still call into something, and that something is still a dependency you install and update. - **The endpoint address.** It is configuration, it has to reach the runner, and on a hosted service it commonly carries an account credential -- which makes it a secret in its own right rather than a harmless setting. - **Your own test dependencies.** Fixtures, seed data, files the tests upload, the test framework itself: none of that moves anywhere. - **The agreement between the two ends.** The client library and the far side still have to speak a protocol they both understand, and your tests still have to be written for whatever the engine actually is. The one-line version: attaching moves the **platform** off your runner. It does not move the **harness**. ## The engine's identity was settled before you connected Because there is no new-session request in this shape, there is no moment at which your side describes the browser it wants and the far side matches it. The engine you reach was already running, with whatever build and whatever platform it had, before your connection existed. You choose which engine by choosing where to connect, not by describing what you want. The practical consequence for a junior is small but real: when someone asks "which browser did that run use?", the answer does not come from your configuration in the way it would when a session is created to order. It comes from what was running on the other end. ## A concrete picture A warehouse pick-and-pack console suite runs in CI. In its first form the pipeline installs a browser engine into the runner image, and a good share of every build is spent putting it there and keeping it current. Moved to an attachment against a hosted engine, the install step disappears entirely and the image gets noticeably thinner. What survives the move is everything the suite itself needs: the client library, the address (kept as a secret, because of what it carries), the fixtures that seed the console's stock data, and the test code. A reviewer looking at the change should see one dependency leave and none of the others pretend to. ## What to say in an interview Say the mechanism, then say the limit: 1. The browser is already running on the far side, so the runner installs no engine build and starts no browser. 2. The runner still needs the client library, the address and the suite's own dependencies. 3. The engine's identity was fixed before the connection, so it is chosen by where you connect rather than by what you request. That order matters. Leading with "the runner does not need anything" is the answer an interviewer is listening for as a mistake, because it confuses removing the platform with removing everything.

  • If the engine is not on your runner, what still has to match between the two sides?
    The client library and the far side have to speak a protocol they both understand, and the tests have to be written for whatever the engine actually is. Moving the build off the runner removes an installation step; it does not remove the need for the two ends to agree, and a mismatch there shows up as a connection that opens and then behaves oddly rather than as a missing file.
  • Does attaching mean the runner has no browser-related dependencies at all?
    No. The client library is still a dependency, the endpoint address is still configuration that has to reach the runner safely, and anything the tests need locally -- fixtures, seed data, files they upload -- is still yours to provide. What leaves is the engine itself and the work of keeping the runner matched to it.
  • How does your suite end up on one engine build rather than another in this arrangement?
    By where it connects. Because there is no new-session request describing what you want, there is no moment at which the far side matches a description against what it can offer. The engine was running, as whatever it was, before your connection existed, so the choice is expressed as an address rather than as a request.

Attaching is like dialling into a meeting that is already in progress: you need the number and a handset, not a room to book and furnish.

saying these in an interview costs you the question

  • Thinks attaching still downloads a matching engine build to the runner
  • Assumes the runner needs no dependencies at all any more
  • Believes the connection negotiates which browser build you get
  • Confuses removing the engine with removing the test harness
  • Treats the endpoint address as ordinary configuration rather than a secret