Generating the build.xml File for Docker
To generate the build.xml file for Docker, we recommend using Run Under ANT on a machine with Provar installed; then, you can customize the file to run inside the Docker integration container.
Ensure you have installed Java 1.8 or later and ANT 1.9.0 or later before completing the steps above.
Refer to the sample file below for an example of a build.xml file configured for Docker without Automation installed.
<project default="runtests"> <property environment="env"/> <property name="provar.home" value="${env.PROVAR_HOME}"/> <property name="testproject.home" value="${env.WORKSPACE}"/> <property name="testproject.results" value="${env.WORKSPACE}/ANT/Results"/> <property name="secrets.password" value="${env.ProvarSecretsPassword}"/> <property name="testenvironment.secretspassword" value="${env.ProvarSecretsPassword_EnvName}"/> <taskdef name="Provar-Compile" classname="com.provar.testrunner.ant.CompileTask" classpath="${provar.home}/ant/ant-provar.jar"/> <taskdef name="Run-Test-Case" classname="com.provar.testrunner.ant.RunnerTask" classpath="${provar.home}/ant/ant-provar.jar;${provar.home}/ant/ant-provar-bundled.jar;${provar.home}/ant/ant-provar-sf.jar"/> <taskdef name="Test-Cycle-Report" classname="com.provar.testrunner.ant.TestCycleReportTask" classpath="${provar.home}/ant/ant-provar.jar;${provar.home}/ant/ant-provar-bundled.jar;${provar.home}/ant/ant-provar-sf.jar"/> <target name="runtests"> <Provar-Compile provarHome="${provar.home}" projectPath="${testproject.home}"/> <Run-Test-Case provarHome="${provar.home}" projectPath="${testproject.home}" resultsPath="${testproject.results}" resultsPathDisposition="Increment" testEnvironment="" webBrowser="Chrome_Headless" webBrowserConfiguration="Full Screen" webBrowserProviderName="Desktop" webBrowserDeviceName="Full Screen" excludeCallableTestCases="false" salesforceMetadataCache="Reload" projectCachePath="${testproject.home}/../.provarCaches" testOutputlevel="WARNING" pluginOutputlevel="WARNING" stopTestRunOnError="false" secretsPassword="${secrets.password}" testEnvironmentSecretsPassword="${testenvironment.secretspassword}" invokeTestRunMonitor="true" > <fileset dir="${testproject.home}/tests"/> </Run-Test-Case> </target> </project>
The three main property tags that need to be reconfigured are provar.home, testproject.home and testproject.results:
- provar.home contains the location where the Automation installation was unzipped to.
- Since we use a Docker container, this value must be set to ${env.PROJECT_HOME}
- testproject.home is the folder that contains the Test Project .testproject file.
- This value must be set to ${env.WORKSPACE}
- testproject.results is where the test run’s results should be written.
- This value must be set to ${env.WORKSPACE}/ANT/Results
Documentation library
- Provar Automation
- Installing Provar Automation
- Updating Provar Automation
- Using Provar Automation
- API Testing
- Behavior-Driven Development
- Creating and Importing Projects
- Creating Test Cases
- Custom Table Mapping
- Functions
- Debugging Tests
- Defining a Namespace Prefix on a Connection
- Defining Proxy Settings
- Environment Management
- Exporting Test Cases into a PDF
- Exporting Test Projects
- Override Auto-Retry for Test Step
- Managing Test Steps
- Namespace Org Testing
- NitroX
- Provar Desktop
- Provar Test Builder
- Refresh and Recompile
- Reintroduction of CLI License Check
- Reload Org Cache
- Reporting
- Running Tests
- Searching Provar with Find Usages
- Secrets Management and Encryption
- Setup and Teardown Test Cases
- Tags and Service Level Agreements (SLAs)
- Test Cycles
- Test Plans
- Testing Browser Options
- Tooltip Testing
- Using the Test Palette
- Using Custom APIs
- Callable Tests
- Data-Driven Testing
- Page Objects
- Block Locator Strategies
- Introduction to XPaths
- Creating an XPath
- JavaScript Locator Support
- Label Locator Strategies
- Maintaining Page Objects
- Mapping Non-Salesforce fields
- Page Object Operations
- ProvarX™
- Refresh and Reselect Field Locators in Test Builder
- Using Java Method Annotations for Custom Objects
- Applications Testing
- Provar Manager
- DevOps
- Introduction to Test Scheduling
- Apache Ant
- Configuration for Sending Emails via the Automation Command Line Interface
- Continuous Integration
- AutoRABIT Salesforce DevOps in Provar Test
- Azure DevOps
- Running a Provar CI Task in Azure DevOps Pipelines
- Configuring the Automation secrets password in Microsoft Azure Pipelines
- Parallel Execution in Microsoft Azure Pipelines using Multiple build.xml Files
- Parallel Execution in Microsoft Azure Pipelines using Targets
- Parallel execution in Microsoft Azure Pipelines using Test Plans
- Bitbucket Pipelines
- CircleCI
- Copado
- Docker
- Flosum
- Gearset DevOps CI/CD
- GitHub Actions
- Integrating GitHub Actions CI to Run Automation CI Task
- Remote Trigger in GitHub Actions
- Parameterization using Environment Variables in GitHub Actions
- Parallel Execution in GitHub Actions using Multiple build.xml Files
- Parallel Execution in GitHub Actions using Targets
- Parallel Execution in GitHub Actions using Test Plan
- Parallel Execution in GitHub Actions using Job Matrix
- GitLab Continuous Integration
- Travis CI
- Jenkins
- Execution Environment Security Configuration
- Provar Jenkins Plugin
- Parallel Execution
- Running Provar on Linux
- Reporting
- Salesforce DX
- Git
- Team Foundation Server
- Version Control
- Salesforce Testing
- Best Practices
- Troubleshooting
- Release Notes