ANT: Generating ANT Build File
After the ANT and Java JDK have been installed and their ANT environment variables are set up correctly, a build.xml file can be generated for your scheduling requirements.
This build.xml file defines the scope and requirements of the scheduling task, including what tests should be run, the test environment to be used, the report recipients, and other details.
You can generate a build.xml file automatically using Automation’s Run Under ANT option.
Run Under ANT in Automation
Start by opening Automation. If Automation is already running and has not been restarted since you updated your Environment Variables, please close and restart it now.
In the Navigator view, locate the test case or folder you wish to schedule.
Right-click on the test case or test folder and select Run Under ANT.
The following ANT Dialog window will appear.
This window provides all the options available around test scheduling. Note that these options have already defaulted to the most common configuration.
Note: This page does not run through every option available in Run Under ANT. Refer to the Run Under ANT Options page for more information on a specific option. Or, to learn more about the parameters in your Build File, refer to ANT Task Parameters.
In particular, note the ‘Start Ant execution’ checkbox at the bottom of the window. If ticked, Test Case execution will be initiated through ANT as soon as the ‘Run’ button is clicked. If ‘Start Ant execution’ is not ticked, the Build File will be created without executing the Test Cases. This is useful if you want to make the Build File to be run on a different machine.
We recommend unticking Start Ant execution for now since we will test the Build File manually after it is created.
Setting Up a Report Email
We recommend that your scheduling sends a report email to stakeholders after completing the scheduled run.
Click the Email tab on the ANT Dialog window to set up an email report.
Once you have selected your preferred options, click the Email Configuration button.
Enter the details of the email account you want to use to send the report email:
Click the Test Connection button to verify the email account details. Note that clicking this button will send a test email from the account to the same tab to confirm access.
If successful, an email will be sent and received from the email account:
This success message will display:
Click OK to remove this message and then OK again to confirm the email connection details.
Creating the Build File
After you have set your preferred options, click the ‘Run’ button from any tab of the ANT Dialog window.
This will create the Build File in the location you defined:
If the Start Ant Execution checkbox is ticked on the Details tab, this will also begin Ant execution automatically. If you unticked Start Ant execution, follow the steps below to run the Build File manually locally.
To learn more about the parameters in your Build File, refer to ANT Task Parameters.
Running the Build File Locally
Now you can test the Build File by running it locally. The following steps describe how to do this using the command line. (You can do this automatically when creating the Build File by ticking the ‘Start Ant Execution’ checkbox.)
To run the Build File, use the command ant -f build.xml runtests to run the Build.xml file from the directory where it is stored. Follow the steps below if you are not sure how to do this.
On Windows:
Navigate to the folder that contains the new Build File.
Highlight the full file path by clicking in the top panel.
Then type in cmd and hit return.
This will open cmd in the directory of the Build File.
Type ant into cmd.
Note: This simple ant instruction will work fine if only one target is in the Build File. You could use this command if your Build File were generated using the default settings supplied in Run Under Ant. However, if you have modified the Build File so that there are multiple targets, instead of entering ‘ant,’ you should enter an ant -f build.xml runtests, where runtests is the name of the target you want to specify:
Hit return to run the command above. If you get the following ‘not recognized’ error, check your ANT_HOME and Path variables:
Wait for the command to complete.
Viewing Test Results
On completion, the interface will look something like this:
If you specified an email as part of the Build Task, you should also have received an email at the addresses you specified:
A detailed execution report will also be created in the Results directory specified in the Build File (this defaults to /ANT/Results).
This contains an index.html file that can be opened in any web browser:
- 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
- Salesforce 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
- Add Permissions to Edit Provar.ini File
- Configure Provar UI in High Resolution
- Enable Prompt to Choose Workspace
- Increase System Memory for Provar
- Refresh Org Cache Manually
- Show Hidden Provar Files on Mac
- Java Version Mismatch Error
- Unable to test cases, test suites, etc… from the Test Project Navigation sidebar
- 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