This repository has been archived by the owner on Feb 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 51
Manifest file vs regex
adarsh-ramakrishna-sfdc edited this page Oct 16, 2015
·
1 revision
Users can populate class names in the Manifest file and/or provide regular expressions(regexes) to filter the Apex classes Use cases
Manifest files:
- The user can populate class names in manifest files. Multiple Manifest files can be created for unit tests, functional tests, integration tests etc.
- If your team has legacy test/source classes, for which no naming conventions have been followed, you can populate class names in the manifest file. Another use case for using Manifest file is if your team is transitioning from ApexUnit 1.0 and have the setup for manifest files, the team can continue to use the setup already in place
- Multiple-manifest file support is provided; user can specify multiple comma separated manifest files.
Regexes:
- Worried about maintaining manifest files each time a new Apex class is created or each time a class is renamed? Regular expressions(regexes) solves the overhead of maintaining the manifest files.
- In order to use regex, you must make sure that your classes follow a specific naming conventions like TEAM_PROJECT_MODULE_UNITTEST_MY-TEST-NAME.. In such a case you can specify the regex- "TEAM_PROJECT_MODULE_UNITTEST_*"; this would fetch all the classes from the org whose name matches the regex.
- If you do not wish to rename your existing apex classes, you could use manifest files to filter the classes. However, you could start leveraging the regex-support feature by making sure that the new classes follow a naming convention.
- Multiple-regex support is provided; user can specify multiple comma separated regexes.