> For the complete CircleCI developer hub index, see [llms.txt](https://circleci.com/developer/llms.txt)

# provartesting/provar

Test Automation for Salesforce. The only code-free, integrated automation testing tool for Salesforce. Official Provar Orb for all your testing needs in CircleCI.


## Commands

### run_test_plans

Runs Provar test plans with parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `build_file` | string | build.xml | The name of the build file to execute. |
| `email_target` | string | noreply@test.com | The email to send the job results to. |
| `environment` | string |  | The name of the test environment to run the tests against. |
| `license_path` | string | /home/circleci/project/ProvarProject/.licenses | The path of your Provar Execution license folder on the machine |
| `project_name` | string | ProvarProject | The folder containing the Provar Automation Test Project. |
| `test_plan` | string | Regression | The name of the test plan to run. |

### setup_provar

Downloads and extracts provar Ant zip file

| Parameter | Type | Default | Description |
|---|---|---|---|
| `majorversion` | string | 2.15.1.2 | Major version of provar |
| `url` | string | download.provartesting.com | URL, minus https://, from which to download the specified version of the Provar CLI
 |

### store_provar_test_results

Stores Test Results from Test Run

| Parameter | Type | Default | Description |
|---|---|---|---|
| `project_name` | string | ProvarProject | The folder containing the Provar Automation Test Project. |

## Jobs

### run_provar

Checkout code from Git which contains a test project, execute test cases using Provar CLI, and publish report


| Parameter | Type | Default | Description |
|---|---|---|---|
| `build_file` | string | build.xml | The name of the build file to execute. |
| `email_target` | string | noreply@test.com | The email to send the job results to. |
| `environment` | string |  | The name of the test environment to run the tests against. |
| `executor` | executor | default | Executor to use for this job, defaults to this orb's default executor
 |
| `license_path` | string | /home/circleci/project/ProvarProject/.licenses | The path of your Provar Execution license folder on the machine |
| `majorversion` | string | 2.15.1.2 | Major version of provar |
| `project_name` | string | ProvarProject | The folder containing the Provar Automation Test Project. |
| `steps` | steps |  | Steps to execute |
| `test_plan` | string | Regression | The name of the test plan to run. |
| `url` | string | download.provartesting.com | URL, minus https://, from which to download the specified version of the Provar CLI
 |

## Executors

### default

Node-based Docker image with Java 11 and current browsers like Firefox, Chrome, Explorer

| Parameter | Type | Default | Description |
|---|---|---|---|
| `tag` | string | current-browsers | Specific variant of CircleCI's Selenium Node Image: https://hub.docker.com/r/cimg/node
 |
| `working-directory` | string | ~/project | Working directory for the job using this executor: https://circleci.com/docs/2.0/configuration-reference/#job_name
 |

## Examples

### run_provar_command

Checkout Code test cases from Git, run test cases and publish report


```yaml
version: '2.1'
orbs:
  browser-tools: circleci/browser-tools@1
  provar: provartesting/provar@2.20
jobs:
  build:
    executor:
      name: provar/default
      tag: current-browsers
    parameters:
      build_file:
        default: build.xml
        type: string
      email_target:
        default: michael.dailey@provartesting.com
        type: string
      environment:
        default: Dev
        type: string
      license_path:
        default: /home/circleci/project/ProvarProject/.licenses
        type: string
      project_name:
        default: DemoProject
        type: string
      test_plan:
        default: Regression
        type: string
    steps:
      - checkout
      - provar/setup_provar:
          majorversion: << parameters.majorversion >>
          url: << parameters.url >>
      - browser-tools/install-chrome
      - browser-tools/install-chromedriver
      - run:
          command: sudo apt-get update -y && sudo apt-get install -y ant
      - provar/run_test_plans:
          build_file: << parameters.build_file >>
          email_target: << parameters.email_target >>
          environment: << parameters.environment >>
          license_path: << parameters.license_path >>
          project_name: << parameters.project_name >>
          test_plan: << parameters.test_plan >>
      - provar/store_provar_test_results:
          project_name: << parameters.project_name >>
workflows: null
```

### use_provar_job

Run provar tests using job


```yaml
version: '2.1'
orbs:
  provar: provartesting/provar@2.19
workflows:
  run_all:
    jobs:
      - provar/run_provar:
          build_file: build.xml
          email_target: noreply@example.com
          environment: ''
          license_path: /home/circleci/project/ProvarProject/.licenses
          majorversion: 2.15.1.2
          name: Run Job that executes Provar tests
          project_name: DemoProject
          test_plan: Regression
          url: download.provartesting.com
  version: 2.1
```