mandan2/prestashop-module-testing-database
Composer 安装命令:
composer require mandan2/prestashop-module-testing-database
包简介
This package enables more accurate automated testing for you database driven applications by using separate database.
README 文档
README
Overview
The PrestaShop Module Testing Database package aims to enable automated integration tests on a separate testing database. This allows data to be manipulated and truncated freely without affecting the original database, which can be preserved for manual testing. While this functionality is common in popular frameworks like Symfony or Laravel, it is now available for PrestaShop modules.
Goal
The primary goal of this package is to:
- Enable automated integration tests on a separate testing database.
- Ensure the original database remains intact for manual testing.
How to Use
Installation
Firstly, install this composer package in your target module:
composer require mandan2/prestashop-module-testing-database
Creating a Clone Database
To create a clone database, run the following command in your terminal from module's main dir:
php vendor/mandan2/prestashop-module-testing-database/CreateTestDatabase.php
Using the Clone Database
To switch to the clone database, use the following command from module's main dir:
php vendor/mandan2/prestashop-module-testing-database/UseTestDatabase.php
Using the Original Database
To revert to the original database, use the following command from module's main dir:
php vendor/mandan2/prestashop-module-testing-database/UseOriginalDatabase.php
Integration
These commands can be integrated into your workflow when launching tests. This enables seamless switching between the test and original databases, ensuring an efficient and isolated testing environment.
Requirements
- Composer 2.2;
- MySQL 5.6+;
- PHP 7.1+
- PrestaShop 1.7.1+ (not tested)
- File editing permissions for app/config/parameters.php
- Folder editing permissions for the entire package
Compatibility
Tested on: PrestaShop 8.1 within a Docker image
License
This package is open-source and licensed under the MIT License.
Contributing
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
Support
If you encounter any issues or have questions, please open an issue on the GitHub repository.
mandan2/prestashop-module-testing-database 适用场景与选型建议
mandan2/prestashop-module-testing-database 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 05 月 28 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 mandan2/prestashop-module-testing-database 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 mandan2/prestashop-module-testing-database 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-05-28