Synchronization Pipeline
Beginners: start with Settings first. This page explains the deeper pipeline behind the Sync dashboard and CLI reconciliation flow.
AppraiseJS maintains bidirectional parity between database entities and test artifacts.
The primary operator surface for this flow is the Settings -> Sync dashboard. It exposes pending-difference counts in the UI, while the same underlying sync tasks remain available through CLI scripts for maintenance and automation.
The locator creator is part of that model: live selector capture happens in the UI, but saved locators still flow back into synchronized filesystem artifacts.
Synchronization modes
Section titled “Synchronization modes”- The
Settings -> SyncUI compares filesystem state with database state and lets users trigger reconciliation from one place. - Entity sync scripts (
sync-modules,sync-test-suites, etc.) remain available for scripted workflows and maintenance. - Feature regeneration (
sync-features) performs DB <-> feature-file bidirectional sync. - Template step managers update step-definition files while preserving structure and JSDoc metadata.
UI-driven sync orchestration
Section titled “UI-driven sync orchestration”When a user starts a sync from the UI, Appraise can run prerequisite sync targets automatically before the requested target.
Sync All in the UI and npm run sync-all both follow the same dependency-aware order:
sync-modulessync-environmentssync-tagssync-template-step-groupssync-template-stepssync-locator-groupssync-locatorssync-test-suitessync-test-cases
Examples:
- Running
Sync Locatorstriggerssync-locator-groupsfirst. - Running
Sync Test Casesmay trigger suite, template-step, and tag sync prerequisites first.
Bidirectional feature sync
Section titled “Bidirectional feature sync”performBidirectionalSync() combines both directions in one pass:
- Filesystem -> DB: scans
.featurefiles and merges new suites/scenarios/steps/tags. - DB -> Filesystem: regenerates feature files from persisted suites/cases/steps.
performDryRunSync() previews intended changes without mutation.
Feature generation behavior
Section titled “Feature generation behavior”- Feature files are generated under module hierarchy paths.
- Scenario title format is
Scenario: [Test Case Title] description. - Gherkin step keywords are normalized (
Given/When/Then/And) from authored steps. - Suite and case tags are emitted with deduplication logic.
- Generated files include warning headers to prevent manual drift.
Why this architecture helps
Section titled “Why this architecture helps”- Supports visual-first authoring while keeping executable artifacts portable.
- Lets teams capture selectors from a live page without breaking source-controlled parity.
- Enables teams to reconcile DB and filesystem changes after merges from the UI or scripts.
- Reduces manual sync drift across locators, steps, suites, and features.