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
- 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
- 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
- Provar Automation trial guide and extensions
- Salesforce Testing
- Provar Manager
- Best Practices
- Troubleshooting
- Release Notes