# Pipeline Operation: Validate

The **Validate** operation simulates a deployment to confirm whether changes can be successfully applied. It runs checks and (optionally) executes tests, but no metadata is committed to the target org.

Validate is most useful when:

* Testing changes before a production deploy.
* Ensuring dependencies are met.
* Confirming Apex tests pass.

#### Creating a Validate Step

1. Go to **Pipelines** → create or edit a pipeline.
2. Click the **+** between Start and Stop.
3. In the configuration panel:
   * **Name**: e.g., *Validate to Sandbox*.
   * **Operation**: Select **Validate**.
   * **Target organization**: Choose a connected org (e.g., *Source–Sandbox*).
   * **Run tests:** Select test option (Default or custom).
   * **Next step:** Define behavior:
     * **On pass** → Stop or move to another step.
     * **On fail** → Stop, Rollback, or branch to another action.
4. Click **Save**.\\

**Example**: A Validate step created for *Source–Sandbox* with tests set to Default, and both On pass/On fail set to *Stop*.

<div data-with-frame="true"><figure><img src="https://599358484-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlcWbuZareqS9jci4Vs22%2Fuploads%2FsCUeGGpNa0EjiqcvvLcv%2Fimage.png?alt=media&#x26;token=27828401-7416-4493-be94-8d9891092d23" alt=""><figcaption></figcaption></figure></div>

#### Editing a Validate Step

* Open the pipeline containing the Validate step.
* Click the **Validate node** in the diagram.
* Select **Edit** to update details such as:
  * Target org.
  * Test execution options.
  * Pass/fail next steps.
* Save changes to update the pipeline.

Editing allows you to switch from a simple validation to a full test-validation flow without recreating the pipeline.\
\\

<div data-with-frame="true"><figure><img src="https://599358484-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlcWbuZareqS9jci4Vs22%2Fuploads%2FhpMePQDWdow3P9b1TKve%2Fimage.png?alt=media&#x26;token=00c5eb37-69a5-4943-b785-13e6624f16dc" alt=""><figcaption></figcaption></figure></div>

#### Running the Validate Pipeline

1. Click **Run pipeline.**
2. Revvy simulates the deployment against the target org.
3. Results are displayed in real time in the pipeline diagram.
   * Successful validation shows a green check on the Validate step.
   * Failures are flagged in red, and logs are available.

#### Viewing Validation Results

After execution, results are logged under Activities for the related branch:

* **Jobs** show:
  * Type: *Validate*.
  * Status: *Completed* or *Failed*.
  * Execution duration and timestamp.
* **Pipelines** show:
  * Pipeline name.
  * Status: *Completed*.
  * Total duration.
* **Logs** provide detailed messages:
  * Metadata retrieval.
  * Dependency checks.
  * Test outcomes.
  * Success/failure messages.

<div data-with-frame="true"><figure><img src="https://599358484-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlcWbuZareqS9jci4Vs22%2Fuploads%2FUpzxO5deA8Pgqyt9vW0W%2Fimage.png?alt=media&#x26;token=ad6080b7-7628-4f31-9272-3be56d272882" alt=""><figcaption></figcaption></figure></div>

\
**Example log entries:**\
\[Oct 8, 2025 4:58 PM] \[info] Retrieve Salesforce components started

\[Oct 8, 2025 4:59 PM] \[info] No local changes to validate

\[Oct 8, 2025 4:59 PM] \[info] Job completed

<div data-with-frame="true"><figure><img src="https://599358484-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FlcWbuZareqS9jci4Vs22%2Fuploads%2FgsFDaVpqwp2kJIV3KxvN%2Fimage.png?alt=media&#x26;token=ea3a6e2d-b083-4c6a-8b55-4d8a40a4d5a0" alt=""><figcaption></figcaption></figure></div>

#### Best Practices

* Always validate in lower environments before a production deployment.
* Configure “On fail → Rollback” for safer automation.
* Run full test suites in higher environments to catch Apex issues early.
* Review logs after each validation to confirm no missing dependencies.
