Revyl
E2E.Revyl is a browser provider for the web engine. It ports the web part of upstream’s @e2e-dev/revyl (revylBrowsers(), docs/integrations/revyl.mdx). RevylBrowsers starts a Revyl web session for each test attempt and attaches the web engine to its Chrome over CDP, so web tests use the same App, Screen, Browser, and Expect APIs as on a local browser. Upstream’s mobile device provider, revyl(), is not ported.
Install and authenticate
Section titled “Install and authenticate”dotnet add package E2E.NUnit # or E2E.XUnit.V3, E2E.TUnitdotnet add package E2E.RevylSet REVYL_API_KEY in the environment that starts the tests. In CI, store it as a secret. Without it, the lease fails before any test starts. REVYL_API_URL reaches another Revyl backend.
Configure the engine
Section titled “Configure the engine”Create a Web app in Revyl, for example with revyl app create --name "My site" --platform web, and pass its id as App. Url is the page each session opens on; Revyl registers it as a build of the app and checks that it loads before the test starts. Set the engine’s Viewport to null and give the session’s size to RevylBrowsersOptions, since a Revyl browser keeps the size its session opened with.
using E2E.Engine;using E2E.Revyl;
var options = new WebEngineOptions{ Browser = new RevylBrowsers( new RevylBrowsersOptions { App = "<Revyl Web app id>", Url = "https://staging.example.com", Viewport = new WebViewport(1280, 800), } ), Viewport = null,};The reporter logs session <id>, watch at <link> for each session. The link opens the session in Revyl, live while the test runs, and needs a Revyl sign-in. With REVYL_API_URL set, it logs session <id> alone.
| Option | Default | Purpose |
|---|---|---|
App |
required | Id of the Revyl Web app the sessions run under. |
Url |
required | http(s) URL each session opens on, without credentials in it. Revyl must be able to load it. |
Viewport |
1280 by 800 |
Width and height in CSS pixels, 320 to 3840 by 240 to 2160. The browser keeps it for the whole session. |
IdleTimeoutSeconds |
600 |
Seconds without activity before Revyl ends a session the run left open, at least 60. |
A value out of range fails at construction with INVALID_CONFIG.
Limits
Section titled “Limits”- Every attempt, retries included, starts a new session, on the session’s one browser context and its first tab. Each test pays for a session start, and the limits of a per-attempt lease apply (see Browser).
- The web engine’s
Viewportmust benull. Revyl refuses to resize the browser:Browser.SetViewportAsyncfails at once, and a set engineViewportleaves the attempt waiting until the test times out. - The CDP URL works once. A dropped connection is not reattached, and the attempt fails; a retry starts a new session.
- An attempt that records video gets Revyl’s own recording of the session as
video/recording.mp4. Revyl publishes it only once the session ends, so stopping a recording ends the session. - Downloads are unavailable: Revyl’s browser refuses them.
- The site runs on Revyl’s network, so point
Urland the target’sApp.Urlat a deployed URL, notlocalhost. - When an attempt ends, on every exit path, the provider stops its session. When the run ends, it stops the session of any worker that died before it could. If the run itself dies, Revyl ends each session after
IdleTimeoutSecondswithout activity. - Not checked against a live Revyl account: the calls follow upstream’s client.