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) »
  • Misc questions
Pages: [1]

Author Topic: Misc questions  (Read 1711 times)

demeritcowboy

  • Ask me questions
  • ****
  • Posts: 570
  • Karma: 42
  • CiviCRM version: Always the latest!
  • CMS version: Drupal 6 mostly, still evaluating 7.
  • MySQL version: Mix of 5.0 / 5.1 / 5.5
  • PHP version: 5.3, usually on Windows
Misc questions
November 08, 2010, 01:58:44 pm
I'm testing against 3.3 r30602

1)
Item #1 in the second section of the docs at http://wiki.civicrm.org/confluence/display/CRM/Setting+up+your+personal+testing+sandbox+HOWTO says to create civicrm_tests_dev. Is this needed if you've edited tests/phpunit/CiviTest/civicrm.settings.php to match your own db? It doesn't seem to be although I can't seem to run non-webtests but that might be something else yet TBD. So trying to eliminate this as a possibility.

2)
Are clean urls a requirement for webtests?

3)
If using php 5.2 there's an error about E_DEPRECATED. I can fix this myself easily enough but wondering if php 5.3 is actually a requirement? Don't think this is related to my issue in #1 but again would help to eliminate.

4)
There's an error about undefined xpathPrefix in tests/phpunit/WebTest/Case/AddTestCase. Is this intended to be a global variable or is it something left over from somewhere? There's some similar code in CiviSeleniumTestCase::webtestVerifyTabularData() so I think it might be the latter.

Thanks.

Michał Mach

  • Ask me questions
  • ****
  • Posts: 748
  • Karma: 59
    • CiviCRM site
  • CiviCRM version: latest
  • CMS version: Drupal and Joomla latest
  • MySQL version: numerous
  • PHP version: 5.3 and 5.2
Re: Misc questions
November 09, 2010, 04:39:01 am
Hey,

Quote from: demeritcowboy on November 08, 2010, 01:58:44 pm
Item #1 in the second section of the docs at http://wiki.civicrm.org/confluence/display/CRM/Setting+up+your+personal+testing+sandbox+HOWTO says to create civicrm_tests_dev. Is this needed if you've edited tests/phpunit/CiviTest/civicrm.settings.php to match your own db? It doesn't seem to be although I can't seem to run non-webtests but that might be something else yet TBD. So trying to eliminate this as a possibility.

Yes, civicrm_tests_dev is required for unit tests - it's being populated with clean data in setUp. For webtests, there is no database communication nor data reset (only clean install when you start running tests is required), so there is no such requirement.

Quote from: demeritcowboy on November 08, 2010, 01:58:44 pm
Are clean urls a requirement for webtests?

Yes. I've added this information to the wiki.

Quote from: demeritcowboy on November 08, 2010, 01:58:44 pm
If using php 5.2 there's an error about E_DEPRECATED. I can fix this myself easily enough but wondering if php 5.3 is actually a requirement? Don't think this is related to my issue in #1 but again would help to eliminate.

No, it should run on 5.2. Is it written anywhere on the wiki that tests require 5.3? If so, it needs to be fixed.

Quote from: demeritcowboy on November 08, 2010, 01:58:44 pm
There's an error about undefined xpathPrefix in tests/phpunit/WebTest/Case/AddTestCase. Is this intended to be a global variable or is it something left over from somewhere? There's some similar code in CiviSeleniumTestCase::webtestVerifyTabularData() so I think it might be the latter.

It's wrong - I'll fix it. Thanks for catching it.

Thx,
m
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

My absolute favourite: Wordpress Integration!.

Donate Now!

demeritcowboy

  • Ask me questions
  • ****
  • Posts: 570
  • Karma: 42
  • CiviCRM version: Always the latest!
  • CMS version: Drupal 6 mostly, still evaluating 7.
  • MySQL version: Mix of 5.0 / 5.1 / 5.5
  • PHP version: 5.3, usually on Windows
Re: Misc questions
November 09, 2010, 06:33:37 am
Thanks.
Working on unix (selenium docs say java 5 is ok but I needed to upgrade to java 6 - error about java.lang.IllegalArgumentException: Invalid uri) but non-webtest isn't working on windows.

I'll fix the E_DEPRECATED and update some docs.

Michał Mach

  • Ask me questions
  • ****
  • Posts: 748
  • Karma: 59
    • CiviCRM site
  • CiviCRM version: latest
  • CMS version: Drupal and Joomla latest
  • MySQL version: numerous
  • PHP version: 5.3 and 5.2
Re: Misc questions
November 09, 2010, 07:29:26 am
Gr8, thx.
m
Found this reply helpful? Contribute NOW and help us improve CiviCRM with the Make it Happen! initiative.

My absolute favourite: Wordpress Integration!.

Donate Now!

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

This forum was archived on 2017-11-26.