-
Notifications
You must be signed in to change notification settings - Fork 4
Business Requirements
Jcook999 edited this page Oct 18, 2019
·
9 revisions
This page is for listing the business requirements for the "Declarative Test Generation" idea.
Create the code template that encapsulates the flow. (DONE) Create the code that will utilize the tooling API to generate new test classes for new test flows as needed.
- We need a custom metadata type, that will have a flow name and a checkbox to indicate if it was deployed (the apex test class) or not.
- Custom metadata type for the test class template that will be used to generate new test classes for new test flows as they are created.
A button to run through all those metadata types and it creates apex class for all the flows and update that checkbox to indicate that the apex classes were written.
Req #4: Test results log (may no longer be needed as test result output will be user friendly as long as test flow recommendations are followed)
- option 1: a custom object and the log will be a record -> limitation: we can't save persistent data out of a test class.
- option 2: custom metadata ->: same limitation as option 1
- TBD
We need to think about how to put some limitations on running these test classes in Prod, they should still count towards the test coverage though. Suggestions:
- Sophisticated log that lists created and updated records Limitation to this: If the apex class is a test class it can't save data. And if it's not test class, then it will create real records and we will need to deal with cleaning out those records.
- Have Apex classes that will create real records, and have a dedicated test user for running those classes. Then we can later delete all records created by that user as a cleanup efforts. Limitation to this: We have to figure out a way to warn the Admin if it decides to use that dedicated testing user for other operations (like integration) because there will be a risk of removing real data.