An engine drives a user interface, such as a browser, a simulator, or a TV, for screen, app, and the agent. The runner drives every engine over the engine protocol: JSON-RPC messages, one per engine member. @e2e-dev/web and @e2e-dev/mobile are engines too.

flowchart LR
  R[e2e runner] -- engine protocol --> T{transport}
  T -- in process --> A[defineEngine: web, mobile, yours]
  T -- child process --> B[serveEngine, or a server in any language]
  T -- socket --> C[a server on another machine or device]

Choose how to write one

You wantWriteGuide
An engine in TypeScriptdefineEngine, set on a targetWriting an engine
A TypeScript engine in its own processdefineEngine, served with serveEngineEngine servers
An engine in another language, or on a deviceA server that answers the protocol’s messagesEngine servers

An engine from defineEngine runs in the runner’s process. Every call still crosses the protocol, so an engine that passes its suite needs nothing a server elsewhere couldn’t receive.

Next

Was this page helpful?