civicrm/upgrade-test 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

civicrm/upgrade-test

Composer 安装命令:

composer require civicrm/upgrade-test

包简介

Collection of scripts and data-files for testing CiviCRM upgrades

README 文档

README

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 upgrader (cv upgrade:db) 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 web UI (such as browser compatibility or CMS page-loading)
  • Issues in the civicrm.settings.php
  • Issues with setup or compatibility of PHP, MySQL, etc

Pre-Requisites

  • Have a Unix-like environment (bash)
  • Install CiviCRM and cv
  • 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
cd civicrm-upgrade-test
composer install

Finding Test Cases

## Find snapshots from 5.0.0 through 5.30.0
./bin/civicrm-upgrade-examples @5.0.0..5.30.0

Running Test Cases

## Create and edit a settings file
cp examples/civicrm-upgrade-test.settings.txt civicrm-upgrade-test.settings
vi civicrm-upgrade-test.settings
## Note: The file will include comments on the configuration options
## Run the script with a single database
./bin/civicrm-upgrade-test databases/4.2.0-setupsh.sql.bz2

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

## Run the script with any databases based on CiviCRM 4.0.x or 4.1.x
./bin/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
./scripts/update-json.php

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

Standalone Test Cases

The standard test snapshots do not work on Standalone, as they do not contain the required DB state for a Standalone system.

As such, a separate library of Standalone specific snapshots has been created in "databases_standalone" directory. This will be used automatically by civicrm-upgrade-test when running against a Standalone build.

civicrm/upgrade-test 适用场景与选型建议

civicrm/upgrade-test 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 46.77k 次下载、GitHub Stars 达 7, 最近一次更新时间为 2014 年 05 月 10 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 civicrm/upgrade-test 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 civicrm/upgrade-test 我们能提供哪些服务?
定制开发 / 二次开发

基于 civicrm/upgrade-test 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 46.77k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 7
  • 点击次数: 26
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 7
  • Watchers: 8
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: AGPL-3.0
  • 更新时间: 2014-05-10