Framework Engine is a small automation orchestration core. It reads one execution config, resolves a framework adapter plus backend driver, starts the configured execution backend, and converts the outcome into a common result shape.
The first implementation focuses on the architecture from the attached spec:
- one shared
webframework with driver adapters for Playwright and Selenium - Docker as the initial execution backend
- framework/driver/runtime/browser/environment separated in the config model
- normalized test results and artifact references
- a CLI that CI can call
npm test
npm run typecheck
npm start -- list-executors
npm start -- run --config examples/playwright.yaml --dry-runDry runs do not start Docker. They show the command that would be executed and return a normalized skipped result.
The source is TypeScript and runs locally through Node 22's type-stripping support. npm run typecheck runs the real TypeScript compiler with strict checks.
project: productive-login
framework: web
driver: playwright
environment: staging
browser:
name: chromium
tags:
- "@smoke"
workers: 5
runtime:
language: typescript
version: 22
executor:
type: docker
container:
image: automation/playwright:latest
reporting:
- jsonOlder configs that use framework: playwright or framework: selenium are accepted as compatibility aliases. They normalize to framework: web with driver: playwright or driver: selenium.
npm start -- run --config examples/playwright.yaml
npm start -- run --config examples/selenium.yaml
npm start -- run --config examples/selenium.yaml --dry-run --json
npm start -- list-executorsThe package exposes a library entrypoint as well as the CLI. Build the package first when importing it by package name from this repo:
npm run buildimport { createDefaultEngine, loadExecutionConfig, runExecutionConfigFile } from "framework-engine";
const engine = createDefaultEngine();
const config = await loadExecutionConfig("examples/playwright.yaml");
const result = await engine.run(config, { dryRun: true });
console.log(result.summary);
const sameResult = await runExecutionConfigFile("examples/playwright.yaml", { dryRun: true });
console.log(sameResult.exitCode);For a quick runnable example:
npm run example:libraryThe examples/playwright-project folder is a standalone web project executed through FrameworkEngine as a library with the Playwright driver. The runner imports framework-engine, loads that project's framework-engine.yaml, and calls the engine directly.
npm run example:playwright-project:dry-run
npm run example:playwright-project
npm run report:example-playwright:allure:serveThis is the pattern to copy into another web test repository: keep the shared locators, page objects, and tests local to that repo, add a FrameworkEngine config with framework: web and the desired driver, then call runExecutionConfigFile() from a small Node runner.
The poc/playwright folder contains a standalone web project with Productive login negative-path specs. The engine config at examples/playwright.yaml uses framework: web with driver: playwright, mounts that folder into the official Playwright Docker image, and runs it from /tests.
npm run poc:playwright:dry-run
npm run poc:playwright
npm --prefix poc/playwright run report:allure
npm --prefix poc/playwright run report:allure:open
npm run report:playwright:allure:serveAllure reporting is enabled in the Playwright-driver example via reporting: [json, allure]. The engine passes standard Allure paths into the container and reports the generated allure-results / allure-report artifact locations.
Open generated Allure reports through an HTTP server instead of opening index.html directly. Browsers block Allure's local JSON requests on file:// URLs.
The poc/selenium folder contains a Java Selenium runner with the same Productive login negative-path checks. The engine config at examples/selenium.yaml uses framework: web with driver: selenium, mounts that folder into the official Selenium standalone Chrome image, compiles the runner, writes a normalized results.json artifact, and generates an Allure report.
npm run poc:selenium:dry-run
npm run poc:selenium
npm run report:selenium:allure:serveThis is the first runnable slice, not the full platform. It provides a stable core contract and default Docker adapters for the shared web framework through Playwright and Selenium drivers, plus API suites. The next step is to add project-specific result adapters, queueing, persistent execution history, and real artifact storage.