This documentation refers to an older version of CiviCRM (3.4 / 4.0). View latest version.

Skip to end of metadata
Go to start of metadata
This page refers to CiviCRM 3.4 and 4.0, current STABLE version.

Documentation Search


CiviCRM 3.4 and 4.0 Documentation

Support and Participation

Developer Resources


CiviCRM books!

Make sure to check out the FLOSS Manual Understanding CiviCRM as well! You can also support this project by ordering a hard copy.

Or support us by buying an eBook or hard copy of Using CiviCRM from Packt Publishing.

Release testing script is located in tools repository, in scripts/release-testing directory.

Utility script

Script is located in scripts/release-testing/upgrader.sh It's written in bash and offers following functions:

  • upgrader.sh cleanup-files - removes CiviCRM installation files
  • upgrader.sh cleanup-dbs - makes sure that CiviCRM database is empty and Drupal database is in pristine state
  • upgrader.sh install /path/to/tarball - installs CiviCRM files from provided tarball and runs install webtest
  • upgrader.sh upgrade /path/to/tarball - puts CiviCRM files from provided tarball in place of currently existing install and runs upgrade webtest
  • upgrader.sh dumpschema-cividb /path/to/dumpfile.mysql - dumps CiviCRM schema into given file
  • upgrader.sh run-checks - verifies if all the params are set correctly
  • upgrader.sh run-tests - TBD

Before you can use the script, you need to set following variables inside:

  • CIVIDBNAME - name of CiviCRM database
  • CIVIDBUSER - username to access CiviCRM database
  • CIVIDBPASS - password to access CiviCRM database
  • DRUPALDBNAME - name of Drupal database
  • DRUPALDBUSER - username to access Drupal database
  • DRUPALDBPASS - password to access Drupal database
  • DRUPALPRISTINEDBFILE - path to mysql dump of pristine Drupal database
  • DRUPALDIR - a path to Drupal root directory
  • MODULESDIR - a path to Drupal modules directory
  • CIVICRMDIR - a path where CiviCRM is expected to be
  • DRUPALURL - URL of Drupal installation used for upgrade testing
  • CIVICRMURL - URL of CiviCRM installation used for upgrade testing
  • PHPUNITSCRIPTDIR - path from which WebTests (using PHPunit) will be run
  • PHPUNITCOMMAND - name of the script used to run WebTests

Example release testing scenarios

Simple release tests

Simple release test is located in scripts/release-testing/simpleupgradetest.sh

Step by step description:

  • good idea to run-checks at the beginning to make sure all the stuff is set up correctly
  • first two lines: cleans up databases for upgrade testing installation and removes CiviCRM files (in case they weren't cleaned up from previous runs) for upgrade testing installation
  • installs start version (3.3.0 in above case) and runs verification webtest (WebTests_Release_InstallScript)
  • upgrades 3.3.0 to 3.4.1 and runs verification webtest (WebTests_Release_UpgradeScript)

Upgraded database schema verification

Upgraded database schema verification test is located in scripts/release-testing/simpleupgradetest.sh

Step by step description:

  • good idea to run-checks at the beginning to make sure all the stuff is set up correctly
  • first two lines: cleans up databases for upgrade testing installation and removes CiviCRM files (in case they weren't cleaned up from previous runs) for upgrade testing installation
  • installs start version (3.4.1 in above case) and runs verification webtest (WebTests_Release_InstallScript)
  • dumps database schema for clean 3.4.1 install
  • cleans up again
  • installs 3.3.0 and runs verification webtest (WebTests_Release_InstallScript)
  • upgrades 3.3.0 to 3.4.1 and runs verification webtest (WebTests_Release_UpgradeScript)
  • dumps database schema for upgraded 3.4.1 install
  • produces a diff between dumps to verify if core upgrade code takes all the necessary schema changes into consideration

Assembling other release testing scenario

TBD

Labels
  • None