Defining a namespace prefix on a connection
As of Provar version 1.9, 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 Provar 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 Provar executes the test, the namespace will be added automatically based on the value set in the Namespace Prefix Override.
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 Provar 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 Provar 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.)
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 Provar 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.
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, Provar 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.
- General information
- Licensing Provar
- Provar trial guide and extensions
- Using Provar
- API testing
- Behavior-driven development
- Creating and importing projects
- Creating test cases
- Custom table mapping
- Debugging tests
- Defining a namespace prefix on a connection
- Defining proxy settings
- Environment management
- Exporting test cases into a PDF
- Exporting test projects
- Managing test steps
- Namespace org testing
- Provar desktop
- Provar Test Builder
- Refresh and Recompile
- Reload Org Cache
- 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
- Test Palette introduction
- Control test steps
- List compare
- Read test step
- String test steps
- UI Test Steps
- Using custom APIs
- Callable tests
- Data-driven testing
- Page objects
- Block locator strategies
- Introduction to XPaths
- Creating an XPath
- Label locator strategies
- Maintaining page objects
- Mapping non-Salesforce fields
- Page object operations
- Refresh and reselect field locators in Test Builder
- Using Java method annotations for custom objects
- Applications testing
- Database testing
- Document testing
- Email testing
- Mobile testing
- OrchestraCMS Testing
- Salesforce CPQ testing
- ServiceMax testing
- Skuid testing
- Vlocity testing
- Webservices testing
- Introduction to test scheduling
- Apache Ant
- Configuration for sending emails via the Provar Command Line Interface (CLI)
- Continuous integration
- Azure DevOps
- Running a Provar CI task in Azure DevOps
- Configuring the Provar 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
- GitHub Actions
- Running a Provar CI task in GitHub Actions
- 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 CI
- Travis CI
- Execution Environment Security Configuration
- Parallel Execution
- Running Provar on Linux
- Salesforce DX
- Team foundation server
- Version control
- Zephyr Cloud and Server
- Salesforce testing
- Adding a Salesforce connection
- Assert Page Error Messages on Add/Edit Product
- Dynamic Forms
- Internationalization support
- List and table testing
- Salesforce Release Updates
- Salesforce Lightning Testing
- Salesforce Lightning Web Component (LWC) locator support
- Salesforce console testing
- Visualforce Testing
- Testing best practices
- Configurations and permissions
- Error messages
- Licensing, installation and firewalls
- Test Builder and test cases
- Release notes