CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • Unit Testing (Moderator: Michał Mach) »
  • [SOLVED] Normal output for api_v3_ContactTest
Pages: [1]

Author Topic: [SOLVED] Normal output for api_v3_ContactTest  (Read 1020 times)

capo

  • I post occasionally
  • **
  • Posts: 108
  • Karma: 5
[SOLVED] Normal output for api_v3_ContactTest
April 07, 2014, 02:49:38 am
I'm setting up my "personal testing sandbox" for the first time, following the wiki instructions [1]. When I run the first phpunit test, I obtain this output:
Code: [Select]
PHPUnit 3.6.10 by Sebastian Bergmann.

.
Installing civicrm_tests_dev database
.............E.........EE.EEE............E........E....EEEEEEEEE 65 / 70 ( 92%)
E....

Time: 03:26, Memory: 43.25Mb

There were 18 errors:

1) api_v3_ContactTest::testCreateWithCustom
fopen(../api/v3/examples/Contact/Create.php): failed to open stream: Permission denied

/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:1935
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:820
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/api/v3/ContactTest.php:337
/var/www/drupal/sites/all/modules/civicrm/tools/scripts/phpunit:75

2) api_v3_ContactTest::testGetWithCustom
fopen(../api/v3/examples/Contact/CustomFieldGet.php): failed to open stream: Permission denied

/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:1935
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:820
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/api/v3/ContactTest.php:556
/var/www/drupal/sites/all/modules/civicrm/tools/scripts/phpunit:75

3) api_v3_ContactTest::testGetWithCustomReturnSyntax
fopen(../api/v3/examples/Contact/CustomFieldGetReturnSyntaxVariation.php): failed to open stream: Permission denied

/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:1935
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:820
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/api/v3/ContactTest.php:579
/var/www/drupal/sites/all/modules/civicrm/tools/scripts/phpunit:75

4) api_v3_ContactTest::testGetGroupIDFromContact
fopen(../api/v3/examples/Contact/GroupFilterUsingContactAPI.php): failed to open stream: Permission denied

/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:1935
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:820
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/api/v3/ContactTest.php:615
/var/www/drupal/sites/all/modules/civicrm/tools/scripts/phpunit:75

5) api_v3_ContactTest::testCreateIndividualWithContributionDottedSyntax
fopen(../api/v3/examples/Contact/ChainTwoWebsites.php): failed to open stream: Permission denied

/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:1935
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:820
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/api/v3/ContactTest.php:687
/var/www/drupal/sites/all/modules/civicrm/tools/scripts/phpunit:75

6) api_v3_ContactTest::testCreateIndividualWithContributionChainedArrays
fopen(../api/v3/examples/Contact/ChainTwoWebsitesSyntax2.php): failed to open stream: Permission denied

/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:1935
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:820
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/api/v3/ContactTest.php:734
/var/www/drupal/sites/all/modules/civicrm/tools/scripts/phpunit:75

7) api_v3_ContactTest::testContactDelete
fopen(../api/v3/examples/Contact/Delete.php): failed to open stream: Permission denied

/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:1935
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:820
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/api/v3/ContactTest.php:1034
/var/www/drupal/sites/all/modules/civicrm/tools/scripts/phpunit:75

8) api_v3_ContactTest::testContactGetEmail
fopen(../api/v3/examples/Contact/Get.php): failed to open stream: Permission denied

/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:1935
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:820
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/api/v3/ContactTest.php:1196
/var/www/drupal/sites/all/modules/civicrm/tools/scripts/phpunit:75

9) api_v3_ContactTest::testGetIndividualWithChainedArrays
fopen(../api/v3/examples/Contact/APIChainedArray.php): failed to open stream: Permission denied

/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:1935
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:820
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/api/v3/ContactTest.php:1358
/var/www/drupal/sites/all/modules/civicrm/tools/scripts/phpunit:75

10) api_v3_ContactTest::testGetIndividualWithChainedArraysFormats
fopen(../api/v3/examples/Contact/APIChainedArrayFormats.php): failed to open stream: Permission denied

/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:1935
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:820
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/api/v3/ContactTest.php:1420
/var/www/drupal/sites/all/modules/civicrm/tools/scripts/phpunit:75

11) api_v3_ContactTest::testGetIndividualWithChainedArraysAndMultipleCustom
fopen(../api/v3/examples/Contact/APIChainedArrayMultipleCustom.php): failed to open stream: Permission denied

/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:1935
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:820
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/api/v3/ContactTest.php:1492
/var/www/drupal/sites/all/modules/civicrm/tools/scripts/phpunit:75

12) api_v3_ContactTest::testChainingValuesCreate
fopen(../api/v3/examples/Contact/APIChainedArrayValuesFromSiblingFunction.php): failed to open stream: Permission denied

/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:1935
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:820
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/api/v3/ContactTest.php:1513
/var/www/drupal/sites/all/modules/civicrm/tools/scripts/phpunit:75

13) api_v3_ContactTest::testContactGetFormatIsSuccessTrue
fopen(../api/v3/examples/Contact/FormatIsSuccess_True.php): failed to open stream: Permission denied

/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:1935
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:820
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/api/v3/ContactTest.php:1534
/var/www/drupal/sites/all/modules/civicrm/tools/scripts/phpunit:75

14) api_v3_ContactTest::testContactCreateFormatIsSuccessFalse
fopen(../api/v3/examples/Contact/FormatIsSuccess_Fail.php): failed to open stream: Permission denied

/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:1935
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:820
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/api/v3/ContactTest.php:1547
/var/www/drupal/sites/all/modules/civicrm/tools/scripts/phpunit:75

15) api_v3_ContactTest::testContactGetSingle_entity_array
fopen(../api/v3/examples/Contact/GetSingleContact.php): failed to open stream: Permission denied

/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:1935
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:820
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/api/v3/ContactTest.php:1560
/var/www/drupal/sites/all/modules/civicrm/tools/scripts/phpunit:75

16) api_v3_ContactTest::testContactGetFormatcount_only
fopen(../api/v3/examples/Contact/GetCountContact.php): failed to open stream: Permission denied

/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:1935
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:820
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/api/v3/ContactTest.php:1574
/var/www/drupal/sites/all/modules/civicrm/tools/scripts/phpunit:75

17) api_v3_ContactTest::testContactGetFormatID_only
fopen(../api/v3/examples/Contact/FormatOnlyID.php): failed to open stream: Permission denied

/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:1935
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:820
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/api/v3/ContactTest.php:1588
/var/www/drupal/sites/all/modules/civicrm/tools/scripts/phpunit:75

18) api_v3_ContactTest::testContactGetFormatSingleValue
fopen(../api/v3/examples/Contact/FormatSingleValue.php): failed to open stream: Permission denied

/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:1935
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/CiviTest/CiviUnitTestCase.php:820
/var/www/drupal/sites/all/modules/civicrm/tests/phpunit/api/v3/ContactTest.php:1603
/var/www/drupal/sites/all/modules/civicrm/tools/scripts/phpunit:75

FAILURES!
Tests: 70, Assertions: 285, Errors: 18.

Is that the normal output for 4.5.alpha1? Or maybe my confirguration isn't correct?

[1] - http://wiki.civicrm.org/confluence/display/CRM/Setting+up+your+personal+testing+sandbox+HOWTO
« Last Edit: April 07, 2014, 04:43:07 am by capo »

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Normal output for api_v3_ContactTest
April 07, 2014, 04:23:43 am
Hi,

Running the tests are generating the examples too. It looks like your user can't write them?

Try changing to api/v3/examples is RW for the user running the tests
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

capo

  • I post occasionally
  • **
  • Posts: 108
  • Karma: 5
[SOLVED] Re: Normal output for api_v3_ContactTest
April 07, 2014, 04:42:47 am
Solved! Thanks! Now I'm getting the correct output:

Code: [Select]
PHPUnit 3.6.10 by Sebastian Bergmann.

.
Installing civicrm_tests_dev database
................................................................ 65 / 70 ( 92%)
.....

Time: 03:46, Memory: 42.00Mb

OK (70 tests, 351 assertions)

I've also removed the /tmp/civi folder, cause it was created before with a different user and, apparently, the user running the tests need to write there too.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: [SOLVED] Normal output for api_v3_ContactTest
April 07, 2014, 01:18:16 pm
Karma + for getting the tests going
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • Unit Testing (Moderator: Michał Mach) »
  • [SOLVED] Normal output for api_v3_ContactTest

This forum was archived on 2017-11-26.