@scifeon/test
v0.0.1
Published
Scifeon Test CLI.
Downloads
4
Readme
@scifeon/test
A CLI and testing framework for running end-to-end tests against Scifeon instances using Playwright.
Installation
npm install --save-dev @scifeon/testPeer Dependencies
This package requires @playwright/test as a peer dependency:
npm install --save-dev @playwright/testBrowser Installation
After installing the package, install the Chromium browser required for tests:
npx scifeon-test installCLI Usage
The package provides the scifeon-test CLI binary.
Run Tests
scifeon-test run [testPath] [options]Arguments:
testPath- Path to test files or directory (defaults to current working directory)
Options:
--base-url <url>- Base URL for the Scifeon instance (default:http://localhost:5000)--test-run-id <id>- Test run identifier (auto-generated if not provided)--headed- Run browser in headed mode for debugging (default: headless)
Environment Variables:
SCIFEON_BASE_URL- Alternative to--base-urloptionSCIFEON_TEST_RUN_ID- Alternative to--test-run-idoption
Passing Arguments to Playwright:
Use -- to pass additional arguments directly to Playwright:
scifeon-test run ./tests --base-url http://localhost:5000 -- --grep "login"Examples:
# Run all tests in current directory against local instance
scifeon-test run
# Run tests from a specific directory
scifeon-test run ./e2e/tests
# Run against a remote instance with headed browser
scifeon-test run --base-url https://staging.example.com --headed
# Run specific tests using Playwright grep
scifeon-test run -- --grep "authentication"Install Browser
scifeon-test installInstalls the Chromium browser required for running tests.
