- All the test cases will be created in civicrm/test-new/SimpleTest/api-v2/
- All the information needed to for test cases will be provided by common methods (civicrm/test-new/SimpleTest/Test/CiviUnitTestCase.php)
Example: Test case for location will first need contact. So there will be one common method that will create the contact. You are only going to call that method in setUp() of your testcase file. - old testcase class : class TestCreateContact extends UnitTestCase
new testcase class : class TestCreateContact extends CiviUnitTestCase - For each API, there will be separate test case file
- Each testcase file should contain two types of test cases
(I) test cases that checks functionality is working as expected
(II) test cases that checks functionality is not breaking - If applicable, include custom data in most of your test cases
- If applicable, return parameters will be part of the params array (the keys will be prefixed by 'return.')
Example: $params = array( 'location_name' => "Web Access", 'location_type' => "work", 'return.street_address' => 1 ); - Standard Data for testing.
Previously the data being used for test cases was varying with the creators. Now we are thinking of standardizing of data.
Example :
Individual Data / Information :Location Data / Information :Field
Value
first_name
Anthony
Middle_name
john
Last_name
Anderson
prefix
Mr.
suffix
Jr
email
anthony_anderson@civicrm.org
Field
Value
Value
Location type
Home
Work
street address
300 boylston AVE E
100 main St
city
Seattle
Seattle
State/Province
Washington
Washington
pin
98102
98104
country
USA
USA
email1
anthony_home1@civicrm.org
anthony_work1@civicrm.org
email2
anthony_home2@civicrm.org
anthony_work2@civicrm.org
email3
anthony_home3@civicrm.org
anthony_work3@civicrm.org
phone
71818868
71818867
mobile
96768607
967683457
fax
75115887
75115807
Skip to end of metadata
Go to start of metadata
Labels:
