Defining a Namespace Prefix on a Connection
With Automation, you can add or remove a Namespace Prefix at the Salesforce Connection level.
This enables the execution of a test case in a Namespace Prefix org, even if the test was developed in a non-Namespace Prefix org (and vice versa). For example, if tests are created in a development org but need to be run in a package org, or an org where a managed package is deployed.
Note however that Automation ensures none of the test cases are modified and updated with the effective namespace prefix in the execution environment. These changes are done at run time and only during the execution.
In this way, only a single version of the test needs to be maintained for use across multiple environments, even when the environments have different namespace settings.
Setting the namespace prefix override
When adding or editing a Connection, you will see a new Namespace Prefix Override parameter under Advanced Settings.
This parameter will accept one or more values entered in a comma-separated list.
These values can be positive or negative, which you can define using plus (‘+’) and minus (‘-‘) characters. If no character is provided a positive value is assumed.
- Adding a namespace prefix in order to execute tests in an environment with a namespace prefix if they were authored in an environment without a namespace prefix.
- Removing a namespace prefix in order to execute tests in a non-namespace environment if they were authored in an environment with a namespace prefix.
- Changing the namespace prefix in order to execute tests in an environment with a different namespace prefix from the environment in which they were authored.
Adding a namespace prefix
Add a positive Namespace Prefix Override value in order to execute tests in an environment with a namespace prefix if they were authored in an environment without a namespace prefix.
When Automation executes the test, the namespace will be added automatically based on the value set in the Namespace Prefix Override.
Example:
Note that this will not affect any tests created in a namespace prefix org or an org with the managed package installed. These will continue to use their existing namespace prefix settings, unless a matching negative value is found in the Namespace Prefix Override (see below).
Removing a namespace prefix
Add a negative Namespace Prefix Override value in order to execute tests in a non-namespace environment if they were authored in an environment with a namespace prefix.
When Automation executes the test, if the negative value in the Namespace Prefix Override matches the org’s developer namespace, Provar will automatically remove the namespace prefix from the test.xml on execution.
When Automation executes the test, if the negative value in the Namespace Prefix Override matches the namespace prefix of the control (be it be managed package or org’s developer namespace), Provar will automatically remove the namespace prefix from the test.xml on execution. (Note that the test case is not updated in the file system.)
Example:
Changing the namespace prefix
Add a negative Namespace Prefix Override value and then a positive value in order to execute tests in an environment with a different namespace prefix from the environment in which they were authored.
When Automation executes the test, it will remove any namespace prefix that matches any negative value set in the Namespace Prefix Override, then add any positive value set in the Namespace Prefix Override.
This can be done as part of the same operation, but please ensure that you enter negative values first in the list, followed by the positive.
Example:
Note that, if a ‘+’ or ‘–’ character is not provided, the value is assumed positive.
During execution, every locator will be normalized based on the provided values but the test cases are not changed.
Using namespace prefix overrides with environment management
If you are using Environments to manage org-specific execution details, you can add Namespace Prefix Override values as Connection Overrides to toggle namespace settings automatically based on your selected Test Environment.
This means that, if you change your Test Environment, Automation will take the Namespace settings defined on the Connection Override instead of the settings defined at the default Connection level.
Refer to Environment Management for more information.
- 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 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
- 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