Created
May 16, 2020 11:56
-
-
Save edmondop/2d8df87228cc0425075f83f3a52c80e0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Account.AnnualRevenue | Age | Role | Likely_Member__c | |
---|---|---|---|---|
10000 | 20 | CEO | True | |
100000 | 45 | CFO | False |
Option 2, using maybe roboframework.csv, in pseudocode
Likely_Member__c
True,
False
cci task run dataset import my-flow-examples
${rows}= read csv as list test.csv ## You still need a csv to store Likely_Member__c, the dataset only solves setting up the graph
contacts = Get All contacts
for index in range. 0 , contacts.length
row = rows(index)
contact = contacts(index)
Should Be Equal updated_contact.Likely_Member__c row(1)
Pros:
- the complex set up of graph and dependencies of linked objects is handled by cumulus ci data set
Cons: - You need a different csv for the results and linking that csv with the dataset used in input is not trivial
- Still, ShouldBeEqual is hardcoded in the test, what if in some cases you want to test Should Be Greater Than, or Should Not Be Greater Than?
Option 3:
- Have a file that stores the relationship between the dataset ids and the expected values
- Parse that file with roboframework
- Perform CCI tasks
- Loop over the file and perform the assertion (potentially dynamically)
ContactId, AssertionType, Value
0131aaaa, Should Be Equal To, 10
0131aaab, Should Be Greater Than , 20
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Option 1, using maybe roboframework.csv, in pseudocode
Pros:
Cons: