Giter VIP home page Giter VIP logo

civicrm-upgrade-test's Introduction

CiviCRM Upgrade Test Suite

The civicrm-upgrade-test suite provides a set of sample databases which can be used for testing upgrade-logic.

Scope

To facilitate testing of many databases, the current script uses the command-line based upgrade system (drush) and never uses the web-based UI (civicrm/upgrade). Therefore, it is appropriate for testing the database manipulations. It does not currently test for:

  • Issues in the upgrader web UI (such as browser compatibility)
  • Issues with different CMS's (Joomla, WordPress, Drupal 6)
  • Issues in the civicrm.settings.php
  • Issues with setup or compatibility of PHP, MySQL, etc

Pre-Requisites

  • Have a Unix-like environment (bash)
  • Install Drupal 7, CiviCRM, and Drush
  • Configure the username/password for a MySQL administrator in ~/.my.cnf

Setup

## Checkout the repo
cd $HOME
git clone git://github.com/civicrm/civicrm-upgrade-test.git

## Create and edit a settings file
cd civicrm-upgrade-test
cp civicrm-upgrade-test.settings.txt civicrm-upgrade-test.settings
vi civicrm-upgrade-test.settings
## Note: The file will include comments on the configuration options

Running Test Cases

## Run the script with a single database
bash civicrm-upgrade-test databases/4.2.0-setupsh.sql.bz2

## Run the script with all databases
bash civicrm-upgrade-test databases/*.sql.bz2

## Run the script with any databases based on CiviCRM 4.0.x or 4.1.x
bash civicrm-upgrade-test databases/{4.0,4.1}*.sql.bz2

After executing any of the above commands, output will be written to the civicrm-upgrade-test/output directory. Examine these files to identify errors.

Creating Test Cases

To create a new test-case, one can take any CiviCRM database and dump it to a file -- as long as the CiviCRM database is separate from the Drupal database. By convention, any sharable databases should be stored in the "databases" directory and should be prefixed with a CiviCRM version number. For example:

mysqldump my_civi_db | bzip2 > databases/4.2.3-my_civi_db.sql.bz2

This is not strictly required. If you want to create private test-cases, you can store them anywhere and follow your own naming convention.

civicrm-upgrade-test's People

Contributors

kurund avatar totten avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.