ANT Task Parameters
This page summarizes the various ANT task parameters available in the Build File and the Provar Runner and Provar Compile Task. This is intended to help you customize the file to your requirements.
Note that Provar can automatically generate the required Build File. Refer to Generating a Build File for more information.
If you are generating the Build File for use on another machine where Provar is not installed (e.g., a Linux machine), generate the Build File, then refer to Running Provar on Linux.
Build File Parameters
The main components of the Build File are as follows:
xmlns:Provar: Defines the provar:run task (see below)
provar.home: Contains the location where the Provar installation was unzipped. On Windows, this defaults to C:Program FilesProvar. This attribute is not required if a complete Provar installation in the default location or PROVAR_HOME Environment Variable is set
testproject.home: Defines the folder that contains the Test Project’s .testproject file
testproject.results: Defines the folder where the Test Run’s results should be written
taskdef: Defines the Run-Test-Case and Provar-Compile tasks together with the classpaths
provar:compile or Provar-Compile: Compiles the Test Project’s Custom Test APIs, Page Objects and Page Components so that they can be executed. This is necessary since Java .class files are not usually stored in Version Control and must be generated before executing Test Cases. Refer to the Provar Compile Task section below for more information
provar:run or Run-Test-Case: The Runner task executes your test cases and produces an execution report in HTML format. (Refer to the Provar Runner Task section below for more information)
Note that taskdef, Compile, and Run tasks differ depending on whether or not ANT Task parameters are running with Provar installed. This is demonstrated in the examples below.
Example build.xml
This is an example of a Build.xml with ANT task parameters.
<project default="runtests" xmlns_provar="antlib:com.provar.testrunner.ant"> <property environment="env"/> <property name="provar.home" value="<absolute path>"/> <property name="testproject.home" value="<absolute path>"/> <property name="testproject.results" value="<absolute path>"/> <target name="runtests"> <provar:compile provarHome="${provar.home}" projectPath="${testproject.home}" /> <provar:run provarHome="${provar.home}" projectPath="${testproject.home}" resultsPath="${testproject.results}" testEnvironment="UAT" webBrowserConfiguration="Full Screen" excludeCallableTestCases="False" salesforceMetadataCache="Reuse" projectCachePath="D:/runtime-Test-Provar/.provarCaches" > <pluginProperties plugin="sf" maxMemory="1024"/> <pluginProperties plugin="project" maxMemory="1024"/> <pluginProperties plugin="bundled" maxMemory="1024"/> <emailProperties sendEmail="true" primaryRecipients="name@gmail.com,name2@gmail.com"/> <fileset dir="${testproject.home}/tests" includes="**/*.*"/> </provar:run> </target> </project>
xmlns:provar= defines the provar:run task
provar.home contains the location where the Provar installation was unzipped to. On Windows, this defaults to C:ProgramFilesProvar
testproject.home is the folder that contains the Test Project .testproject file
maxMemory defines the maximum memory that the plug-in can use
testproject.results are where the test run’s results should be written
provar:run runs one or more Test Cases or Test Folders
provarHome is not required if there is a complete Provar installation in the default location or the PROVAR_HOME environment variable is set.
Note that if Provar is not installed on your machine, you should refer to Running Provar on Linux for the correct configuration of this file.
Provar Compile Task
The Compile task is a wrapper around ANT’s standard javac task and inherits these ANT task parameters. The Compile task sets the source, destination, and classpath properties for you from the supplied provarHome and projectPath values.
The Compile task properties are as follows.
provarHome
- Required: No
- Definition: The fully qualified path of your Provar installation directory
- Defaulted as follows:
- The PROVAR_HOME Environment Variable, if set
- Otherwise: C:\Program File\Provar on Windows
- Otherwise: /Applications/Provar on Mac
Note that you do not need to specify this attribute if you have a complete Provar installation in the default location or if the PROVAR_HOME Environment Variable is set.
projectPath
- Required: Yes
- Definition: The fully qualified path of the Test Project containing the tests to be run. This is the folder that contains the .testproject file
Provar Runner Task
- The Runner task properties are as follows:
provarHome
- As above
projectPath
- As above
resultsPath
- Required: Yes
- Definition: The fully qualified path of the folder to which Provar will write the test results
testEnvironment
- Required: No
- Definition: The name of the Test Environment that the test run should be executed against. Test Environments are defined in Test Settings
- Defaults to: The default test environment
webBrowser
- Required: No
- Definition: The web browser to be used for UI testing. Permissable values are:
- Chrome
- Firefox
- IE
- Defaults to: The web browser last selected in the Test Project
webBrowserConfiguration
- Required: No
- Definition: The web browser window size. Browser configurations are defined in Test Settings
- Defaults to: The web browser last selected in the Test Project
licensePath
- Required: No
- Definition: The fully qualified path to your Provar license file
- Behavior: If the path points to a file, then that file is used. If the path points to a folder, then the first activated license in the folder is used
- Defaults to: [user_home]Provar.license
testOutputLevel
- Required: No
- Definition: Controls the amount of test output logged to the ANT test log. Refer to the Logging Levels below for more information
- Defaults to: WARNING
pluginOutputLevel
- Required: No
- Definition: Controls the amount of plug-in output logged to the ANT test log. Refer to the Logging Levels below for more information
- Defaults to: WARNING
fileSet
- Required: Yes
- Definition: One or more ANT fileset elements defining the .testcase files to be run. You can specify individual Test Case files, folders containing Test Case files, or a combination of both. Refer to FileSet for details and examples
excludeCallableTestCases
- Required: No
- Definition: Indicates whether callable Test Cases should be omitted from execution (true) or included in execution (false)
- Defaults to: true
stopTestRunOnError
- Required: No
- Definition: Indicates whether the Test Run should abort automatically if any test failure is encountered.
- Defaults to: false
salesforceMetadataCache
- Required: No
- Definition: Controls the Salesforce Metadata usage. Options are:
- Reuse: reuses existing metadata
- Refresh: downloads only metadata changes
- Reload: deletes old metadata files and downloads fresh metadata
projectCachePath
- Required: No
- Definition: The fully qualified path of the folder that will be used for storing metadata
pluginProperties
- Required: No
- Definition: One or more pluginProperties elements defining settings for Provar’s test plug-ins. Refer to Plug-in Properties below for more information
emailProperties
- Required: No
- Definition: One or more emailProperties elements defining settings for sending email upon ANT execution completion. Refer to the Email Properties below for more information.
Plug-in Properties
- Plug-in Properties can be nested inside the Runner task to allow customization of the memory and debugging settings for Provar’s plug-ins.
An example of how to increase memory for the Salesforce plug-in:
<pluginProperties plugin="sf" maxMemory="512"/>
An example of how to debug the Project plug-in:
<pluginProperties plugin="project" debugPort="0" debugSuspend="false"/>
plug-in
- Required: Yes
- Options are:
- project: the Test Project’s custom Test APIs
- bundled: Provar’s bundled Test APIs (excluding UI APIs) and functions
- sf: Salesforce Test APIs, UI Test APIs, and the Test Project’s Page Objects
maxMemory
- Required: No
- Definition: The maximum amount of memory the plug-in can use in megabytes. It must be an integer value. Note that this translates the -Xms property for the Java process (where the unit is always ‘m’)
debugPort
- Required: No
- Definition: The port number for attaching a Java debugger to the plug-in’s Java process. If ‘0’, then a free port is automatically allocated and displayed in the ANT output
debugSuspend
- Required: No
- Definition: Indicates whether the Java process should wait for the Java debugger to connect at start-up. Valid values are ‘true’ and ‘false.’
Email properties
Email Properties can be nested inside the Runner task and allow the sending of emails after ANT execution is completed.
An example of how to send an email after execution:
<emailProperties sendEmail="true" primaryRecipients="UserEmailID" ccRecipients="" bccRecipients="" emailSubject="Provar test run report" attachExecutionReport="true" attachZip="false"/>
An example of how to send an email to multiple users using a comma-separated list:
<emailProperties sendEmail="true" primaryRecipients="UserEmailID,SecondEmailId" ccRecipients="" bccRecipients="" emailSubject="Provar test run report" attachExecutionReport="true" attachZip="false"/>
sendEmail
- Required: Yes
- Definition: Indicates whether an email should be sent after ANT execution
primaryRecipients
- Required: Yes
- Definition: The email addresses which should receive the email
ccRecipients
- Required: No
- Definition: The email addresses which should be CC’d in the email
bccRecipients
- Required: No
- Definition: The email addresses which should be BCC’d in the email
Logging levels
The Logging Level controls the amount of detail logged to the ANT log file during test execution. It applies to the testOutputLevel and pluginOutputLevel attributes (refer to Provar Runner Task above).
The options are as follows:
SEVERE: Only error messages are logged
WARNING: Error and warning messages are logged
INFO: Error, warning, and informational messages are logged
FINE: Error, warning, informational and high-level debug messages are logged
FINER: Error, warning, informational, and all debug messages are logged
FINEST: All messages are logged
- Provar Automation
- System Requirements
- Browser and Driver Recommendations
- Installing Provar Automation
- Updating Provar Automation
- Licensing Provar
- Granting Org Permissions to Provar Automation
- Optimizing Org and Connection Metadata Processing in Provar
- Using Provar Automation
- Understanding Provar’s Use of AI Service for Test Automation
- Provar Automation
- Creating a New Test Project
- Import Test Project from a File
- Import Test Project from a Remote Repository
- Import Test Project from Local Repository
- Commit a Local Test Project to Source Control
- API Testing
- Behavior-Driven Development
- Consolidating Multiple Test Execution Reports
- 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
- Japanese Language Support
- Override Auto-Retry for Test Step
- Customize Browser Driver Location
- Mapping and Executing the Lightning Article Editor in Provar
- Managing Test Steps
- Namespace Org Testing
- NitroX
- Provar Test Builder
- ProvarDX
- 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 Data Generation
- Test Plans
- Testing Browser – Chrome Headless
- 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
- Database Testing
- Document Testing
- Email Testing
- Email Testing in Automation
- Email Testing Examples
- Gmail Connection in Automation with App Password
- App Configuration for Microsoft Connection in MS Portal for OAuth 2.0
- OAuth 2.0 Microsoft Exchange Email Connection
- Support for Existing MS OAuth Email Connection
- OAuth 2.0 MS Graph Email Connection
- Create a Connection for Office 365 GCC High
- Mobile Testing
- OrchestraCMS Testing
- Salesforce CPQ Testing
- ServiceMax Testing
- Skuid Testing
- Vlocity API Testing
- Webservices Testing
- Provar Manager
- How to Use Provar Manager
- Provar Manager Setup
- Provar Manager Integrations
- Release Management
- Test Management
- Test Operations
- Provar Manager and Provar Automation
- Setting Up a Connection to Provar Manager
- Object Mapping Between Automation and Manager
- How to Upload Test Plans, Test Plan Folders, Test Plan Instances, and Test Cases
- Provar Manager Filters
- Uploading Callable Test Cases in Provar Manager
- Uploading Test Steps in Provar Manager
- How to Know if a File in Automation is Linked in Test Manager
- Test Execution Reporting
- Metadata Coverage with Manager
- Provar Grid
- DevOps
- Introduction to Provar 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
- 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
- Version Control
- Salesforce Testing
- Recommended Practices
- Salesforce Connection Best Practices
- Improve Your Metadata Performance
- Java 21 Upgrade
- Testing Best Practices
- Automation Planning
- Supported Testing Phases
- Provar Naming Standards
- Test Case Design
- Create records via API
- Avoid using static values
- Abort Unused Test Sessions/Runs
- Avoid Metadata performance issues
- Increase auto-retry waits for steps using a global variable
- Create different page objects for different pages
- The Best Ways to Change Callable Test Case Locations
- Working with the .testProject file and .secrets file
- Best practices for the .provarCaches folder
- Best practices for .pageObject files
- Troubleshooting
- How to Use Keytool Command for Importing Certificates
- Installing Provar After Upgrading to macOS Catalina
- Browsers
- Configurations and Permissions
- Connections
- DevOps
- Error Messages
- Provar Manager 3.0 Install Error Resolution
- Provar Manager Test Case Upload Resolution
- Administrator has Blocked Access to Client
- JavascriptException: Javascript Error
- macOS Big Sur Upgrade
- Resolving Failed to Create ChromeDriver Error
- Resolving Jenkins License Missing Error
- Resolving Metadata Timeout Errors
- Test Execution Fails – Firefox Not Installed
- Selenium 4 Upgrade
- Licensing, Installation and Firewalls
- Memory
- Test Builder and Test Cases
- Release Notes