Skip to content

About

Automation Framework Engine

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Framework Engine

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 web framework 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

Quick Start

npm test
npm run typecheck
npm start -- list-executors
npm start -- run --config examples/playwright.yaml --dry-run

Dry 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.

Config Shape

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:
  - json

Older configs that use framework: playwright or framework: selenium are accepted as compatibility aliases. They normalize to framework: web with driver: playwright or driver: selenium.

CLI

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-executors

Library Usage

The 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 build
import { 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:library

Playwright Project Example

The 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:serve

This 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.

Web POC: Playwright Driver

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:serve

Allure 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.

Web POC: Selenium Driver

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:serve

Current Scope

This 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.

About

Automation Framework Engine

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages