# Ghost Inspector

> For AI agents: the complete documentation index is at https://buddy.works/llms.txt

Run Ghost Inspector automated browser tests.

## YAML parameters for Ghost Inspector

```typescript
interface YAMLParameters {
  /** Ghost Inspector integration for authentication. It refers to an integration in the workspace by its identifier, not by its display name. */
  integration: string;
  type: "GHOST_INSPECTOR";
  /** Unique identifier for the action within the pipeline. */
  action: string;
  /** Geo-location for test execution. The following options are available: `us-east-1`, `us-west-1`, `ca-central-1`, `eu-central-1`, `eu-west-1`, `eu-west-2`, `eu-west-3`, `eu-north-1`, `ap-northeast-1`, `ap-northeast-2`, `ap-southeast-1`, `ap-southeast-2`, `ap-south-1`, `sa-east-1` */
  region?: string;
  /** The ID of the folder to execute */
  folder?: string;
  /** The ID of the suite to execute */
  suite?: string;
  /** Alternate browser to use for this execution. The following options are available: `firefox` (default), `firefox-<version>` specific version of Firefox, for example `firefox-57`, `chrome` (paid plans only), `phantomjs` */
  browser?: string;
  /** Specify the Slack channel to notify for this suite run. Note that the value must be `myChannel` or `%23myChannel` and not `#myChannel` */
  channel?: string;
  /** The name to associate with the event */
  user?: string;
  /** The password to associate with the event */
  password?: string;
  /** Use to initiate the execution, then immediate return a response (without results) */
  immediate?: boolean;
  /** Use to disable all notifications for this execution only */
  disable_notification?: boolean;
  /** Alternate start URL to use for all tests in this execution only */
  start_url?: string;
  /** Alternate user agent to use for all tests in this execution only */
  user_agent?: string;
  /** Alternate screen size to use for all tests in this execution only. This should be a string formatted as `{width}x{height}`, for example `1024x768` */
  viewport?: string;
  /** A CSV file containing a row of variable values for each suite run. A POST request must be used when sending this file. When included, an array of suite results will be returned instead of an array of test result */
  data_file?: string;
  /** Specifies when the action should be executed. ON_SUCCESS actions run after every successful run, also one ended by an EARLY_EXIT action. */
  trigger_time?: "ON_EVERY_EXECUTION" | "ON_SUCCESS" | "ON_FAILURE" | "ON_BACK_TO_SUCCESS" | "ON_WARNING" | "ON_WAIT_FOR_APPROVE" | "ON_TERMINATE";
  /** The list of variables for dynamic action execution. The action runs once for each value. */
  loop?: string[];
  /** When true, the action runs only on the first failure instead of on each failure. Used only when trigger_time is ON_FAILURE. */
  run_only_on_first_failure?: boolean;
  /** When set to true the action is disabled. By default it is set to false. */
  disabled?: boolean;
  /** The timeout in seconds. It cannot exceed the action time limit of the workspace plan; a higher value is rejected. */
  timeout?: number;
  /** If set to true the execution will proceed, mark action as a warning and jump to the next action. Doesn't apply to deployment actions. */
  ignore_errors?: boolean;
  /** Delay time between auto retries in seconds. */
  retry_interval?: number;
  /** Number of retries if the action fails. */
  retry_count?: number;
  /** Defines whether the action should run in parallel with the next one. */
  run_next?: "WAIT_ON_SUCCESS" | "IN_SOFT_PARALLEL" | "IN_HARD_PARALLEL";
  /** The list of trigger conditions to meet so that the action can be triggered. */
  trigger_conditions?: TriggerConditionYaml[];
  /** The list of variables you can use in the action. */
  variables?: VariableYaml[];
}
```

## Type Definitions

```typescript
interface TriggerConditionYaml {
  /** The type of trigger condition. `ACTION_STATUS_IS` and `ACTION_STATUS_IS_NOT` are allowed only in an action's `trigger_conditions`. */
  trigger_condition: "ALWAYS" | "ON_CHANGE" | "ON_CHANGE_AT_PATH" | "VAR_IS" | "VAR_IS_NOT" | "VAR_CONTAINS" | "VAR_NOT_CONTAINS" | "DATETIME" | "SUCCESS_PIPELINE" | "DAY" | "HOUR" | "OR" | "VAR_LESS_THAN" | "VAR_LESS_THAN_OR_EQUAL" | "VAR_GREATER_THAN" | "VAR_GREATER_THAN_OR_EQUAL" | "ACTION_STATUS_IS" | "ACTION_STATUS_IS_NOT" | "TRIGGERING_USER_IS" | "TRIGGERING_USER_IS_NOT" | "TRIGGERING_USER_IS_IN_GROUP" | "TRIGGERING_USER_IS_NOT_IN_GROUP" | "ON_PAYLOAD" | "ON_PAYLOAD_AT_PATH";
  /** The value to compare the trigger variable against */
  trigger_variable_value?: string;
  /** The name of the variable to check in the trigger condition - an environment variable or a run variable (BUDDY_RUN_*), e.g. BUDDY_RUN_PR_DRAFT */
  trigger_variable_key?: string;
  /** The timezone for datetime trigger conditions (e.g., 'UTC', 'Europe/Warsaw') */
  timezone?: string;
  /** The hours when the datetime trigger should activate (0-23) */
  trigger_hours?: number[];
  /** The days when the datetime trigger should activate (1-7, where 1 is Monday) */
  trigger_days?: number[];
  /** The project name for cross-project pipeline triggers */
  project?: string;
  /** The pipeline name for cross-pipeline triggers */
  pipeline?: string;
  /** The username or email of the workspace member who can trigger the pipeline. The user must exist. */
  trigger_user?: string;
  /** The name of the workspace group that can trigger the pipeline. The group must exist. */
  trigger_group?: string;
  /** Paths for trigger_condition ON_CHANGE_AT_PATH (files that must change) and ON_PAYLOAD_AT_PATH (paths in the webhook payload); required for these two conditions and ignored by the others. */
  trigger_condition_paths?: string[];
  /** The action status to check for action status triggers */
  trigger_status?: "SUCCESSFUL" | "FAILED" | "SKIPPED" | "SUPPRESSED";
  /** The name of the action to check status for */
  trigger_action_name?: string;
  /** The list of nested trigger conditions combined with the OR operator. */
  trigger_operands?: TriggerConditionYaml[];
}

interface VariableYaml {
  /** The name of the variable */
  key: string;
  /** The value of the variable. With `encrypted: true` give the plain value - it is encrypted on import; an already encrypted value (`secure!...`, `!encrypted ...`) is accepted only in the workspace that encrypted it. For SSH_KEY give the whole private key - its format is validated and a variable reference is not accepted. For P12 give the base64-encoded PKCS12 keystore - it is opened with `password` on import. Masked to bare !encrypted without manage rights */
  value?: string;
  /** The type of the added variable */
  type?: "VAR" | "FILE" | "SSH_KEY" | "IOS_KEYCHAIN" | "IOS_PROVISION_PROFILES" | "SSH_PUBLIC_KEY" | "GPG_KEY" | "P12";
  /** If set to true the variable value will be encrypted and hidden */
  encrypted?: boolean;
  /** Initial path for the variable */
  init_path?: string;
  /** Default value for the variable */
  defaults?: string;
  /** Specifies where to copy the file on each run. Set if type is FILE, SSH_KEY, IOS_KEYCHAIN, or IOS_PROVISION_PROFILES. */
  file_path?: string;
  /** File permission set on copy to a container on each run. Set if type is FILE, SSH_KEY, IOS_KEYCHAIN, or IOS_PROVISION_PROFILES. */
  file_chmod?: string;
  /** Set if type is FILE, SSH_KEY, IOS_KEYCHAIN, or IOS_PROVISION_PROFILES. If it's NONE, the variable can be used as a parameter in an action. For CONTAINER, the given key is additionally copied to an action container on each run */
  file_place?: "NONE" | "CONTAINER";
  /** Password for certificates. Follows the same masking rules as value */
  password?: string;
  /** Passphrase for encrypted SSH keys. Follows the same masking rules as value */
  passphrase?: string;
  /** Key identifier for iOS certificates, provisioning profiles, or GPG keys */
  key_identifier?: string;
  /** Whether Buddy actions can set the variable value: DISABLED (default), ENABLED (the new value is kept for later runs) or RUN_ONLY (the new value applies to the current run only; not allowed for file, SSH key and SSH public key variables). Boolean `true` (unquoted) means ENABLED. */
  settable?: string;
  /** If set to true the variable is disabled and will not be injected anywhere */
  disabled?: boolean;
  /** Encoding of the variable value. Use `b64` for binary files (certificates, images, compiled blobs) where the value is already base64-encoded. Omit or set to `text` for plain text files (JSON, XML, config) — the system will handle encoding automatically. Only applies to non-encrypted asset variables (FILE, SSH_KEY, SSH_PUBLIC_KEY, IOS_KEYCHAIN, IOS_PROVISION_PROFILES). */
  encoding?: "text" | "b64";
  /** Note for this resource */
  note?: string;
  /** YAML note for AI agents operating on this resource */
  agent_note?: string;
}

```

## YAML examples for Ghost Inspector

### Run Ghost Inspector tests

```yaml
- action: "Run Ghost Inspector tests"
  type: "GHOST_INSPECTOR"
  trigger_time: "ON_EVERY_EXECUTION"
  integration: "my_ghost_inspector"
  suite: "my-test-suite"
  browser: "chrome"
  region: "us-east-1"
  start_url: "https://staging.example.com"
  viewport: "1920x1080"
  user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 17_0 like Mac OS X)"
  user: "tester"
  password: "$STAGING_HTTP_PASSWORD"
  data_file: "tests/ghost-inspector-data.csv"
  channel: "#qa"
  immediate: true
  disable_notification: false

```

### Run all tests in a Ghost Inspector folder

```yaml
- action: "Run Ghost Inspector folder"
  type: "GHOST_INSPECTOR"
  integration: "my_ghost_inspector"
  folder: "5f1c2d3e4a5b6c7d8e9f0a1b"

```


---
Original source: https://buddy.works/docs/yaml/yaml-actions/ghost-inspector