I am fairly new to Civicrm, I created a new API for an Entity which I would like to make a pull request for but however it seems preparing a test environment in Civicrm is quite difficult.
I have followed this tutorial but seems it's not for Civicrm 4.7 since some of the paths mentioned are not in Civicrm version 4.7
Tutorial URL: https://wiki.civicrm.org/confluence/display/CRM/Setting+up+your+personal+testing+sandbox+HOWTO
I can't seem to be able to find these paths , mentioned below
Configure the PHP constant CIVICRM_DSN. Database connection using PHP constant To define PHP constants for unit-testing, copy the file "/tests/phpunit/CiviTest/civicrm.settings.local.php.txt" to "/tests/phpunit/CiviTest/civicrm.settings.local.php". Edit the file to include to include a line like this:
define('CIVICRM_DSN', 'mysql://db_username:db_password@localhost/civicrm_tests_dev'); Configure the environment variable CIVICRM_TEST_DSN. (The format is the same as the CIVICRM_DSN above.)
Don't use this approach unless you already have a strong understanding of environment variables. Pass the MySQL details as command-line parameters each time you run the unit-tests. (This approach doesn't require updating any other files, but it's cumbersome to use when you regularly run unit-tests.)
https://wiki.civicrm.org/confluence/display/CRM/Setting+up+your+personal+testing+sandbox+HOWTO
When I go to the root of my API extension and type :
civix test CRM_MyEntity_EntityAction
I get error below which suggests I should read the tutorial above