Configuration Guide

Complete configuration reference and interactive configuration generator

🚀 Interactive Configuration Generator

Create a custom configuration for your testing needs:

⚙️

Core Application Configuration

jsonFilePath
string
Path to the JSON file where test data will be stored during test execution.

Used by:

Data storage operations, variable management
{
  "jsonFilePath": "jsonFiles/test-data.json"
}
screenshotsPath
string
Directory path where screenshots will be saved when tests fail.

Used by:

Test failure handling, screenshot capture
{
  "screenshotsPath": "screenshots/"
}
credentials
object
Main application credentials and base URL configuration.
{
  "credentials": {
    "baseUrl": "https://example.com/",
    "username": "testuser",
    "password": "testpass"
  }
}
language
string (optional)
Language setting for multilingual test support.

Default:

"en"
{
  "language": "fr"
}
🌐

Browser Configuration

browserOptions
object
Puppeteer browser configuration options including arguments and viewport settings.
{
  "browserOptions": {
    "args": [
      "--no-sandbox",
      "--disable-setuid-sandbox",
      "--headless=new"
    ],
    "viewport": {
      "default": { "width": 1920, "height": 1080 },
      "mobile": { "width": 375, "height": 667 },
      "tablet": { "width": 768, "height": 1024 },
      "backstop": { "width": 1600, "height": 900 }
    }
  }
}
regionMap
object (optional)
Mapping of region names to CSS selectors for page regions.

Used by:

Region-specific step definitions, element interaction within regions
{
  "regionMap": {
    "Header": ".site-header",
    "MainContent": ".main-content",
    "Footer": ".site-footer",
    "Navigation": ".navbar"
  }
}
blockingCookie
string (optional)
CSS selector for cookie consent button to auto-click during page visits.
{
  "blockingCookie": ".cookie-consent-accept"
}
🌍

API Testing Configuration

api
object (optional)
Configuration for API testing capabilities including base URL and authentication.
{
  "api": {
    "baseApiUrl": "https://api.example.com/v1/",
    "x-api-key": "your-api-key-here",
    "Authorization": "Bearer your-token-here"
  }
}
basicAuth
object (optional)
HTTP Basic Authentication credentials for API requests.
{
  "basicAuth": {
    "authUser": "apiuser",
    "authPass": "apipassword"
  }
}
📱

Mobile Testing Configuration

appiumCapabilities
object
Appium capabilities for mobile testing configuration.

Used by:

Mobile step definitions, Appium session management
{
  "appiumCapabilities": {
    "platformName": "Android",
    "appium:automationName": "UiAutomator2",
    "appium:deviceName": "Android",
    "appium:disableIdLocatorAutocompletion": true,
    "appium:appPackage": "com.example.app",
    "appium:appActivity": ".MainActivity"
  }
}
🔧

Advanced Options

pa11yConfig
object (optional)
Configuration for Pa11y accessibility testing.
{
  "pa11yConfig": {
    "hideElements": ".ads, .tracking",
    "standard": "WCAG2AA",
    "runners": ["axe", "htmlcs"]
  }
}
skipSteps
string (optional)
Text value to conditionally skip certain test steps.

Used by:

Conditional step definitions (if visible steps)
{
  "skipSteps": "Skip in CI"
}
trimRegex
string (optional)
Custom regex pattern for trimming variable values.

Default:

/[?&@$#:,;]/
{
  "trimRegex": "[?&@$#:,;|]"
}
🌍

Environment-Specific Examples

Development Environment (config/development.json)

{
  "jsonFilePath": "jsonFiles/dev-data.json",
  "screenshotsPath": "screenshots/dev/",
  "credentials": {
    "baseUrl": "http://localhost:3000/",
    "username": "devuser",
    "password": "devpass"
  },
  "browserOptions": {
    "args": ["--no-sandbox"],
    "viewport": {
      "default": { "width": 1920, "height": 1080 }
    }
  }
}

Production Environment (config/production.json)

{
  "jsonFilePath": "jsonFiles/prod-data.json",
  "screenshotsPath": "screenshots/prod/",
  "credentials": {
    "baseUrl": "https://myapp.com/"
  },
  "browserOptions": {
    "args": [
      "--no-sandbox",
      "--disable-setuid-sandbox",
      "--headless=new"
    ],
    "viewport": {
      "default": { "width": 1920, "height": 1080 }
    }
  },
  "pa11yConfig": {
    "standard": "WCAG2AA",
    "runners": ["axe"]
  }
}