magium/magento
Composer 安装命令:
composer require --dev magium/magento
包简介
Magento-based functionality for the Magium test library
README 文档
README
Magium Magento
A PHPUnit/Webdriver (Selenium (there for SEO)) based test framework for streamlining browser testing with Magento. It basically boils down to building out reusable Web Driver commands for Magento allowing you to bypass much of the boilerplate code that browser/functional testing may require. This is done through utility classes.
Find much more information at magiumlib.com
I had some good talks with some good folks this past week. Now entering the 4th month of working on Magium I can honestly say that this past week was the most exciting week I've had. It was a week when I allowed myself to think "maybe I am right about this after all!"
But, truth be told, it's been a struggle to gain some traction. People know, and I mean really know, that they should be automating this part of testing. Every single person who I've talked about testing via the browser has said almost the exact same thing. It's a great idea, but it takes too long and is too tedious.
Browser testing fails, in my humble opinion, because of problems that almost all software has. It is a very common problem. And it's so common I'm going to put it in <H1> tags to make sure everyone sees it.
Software should have easy, early wins
In other words,with software, especially new or unfamiliar software, you should have something useful to show with a minimal amount of effort. That's why, I believe, despite there being several good packages out there for testing Magento with Selenium, including good ones by Magento, I believe that the reason very few use them is because they are not able to "ease" into them.
So what I am going to do is show you how you can get started with Magium, testing Magento using Selenium, in under 10 minutes.
These quick wins are on me :-)
Step 1: Download and install Selenium Server and Chromedriver
Download Selenium Server and Chrome WebDriver
Start it as so, replacing the jar file with whatever the current version is and the chromedriver.exe with whichever version you downloaded:
java -Dwebdriver.chrome.driver=chromedriver.exe -jar selenium-server-standalone-2.48.2.jar
Step 2: Download and install Magento CE 1.9 with the Sample Data
Note: this doesn't count against the 10 minutes
Make sure that it is working first before you start the timer. (I presume you don't need instructions on how to do this)
But shouldn't I start with my own code?
No. Start with what is common, then move to what is unique. It will be a lot easier.
Step 3: Clone the sample test cases
git clone https://github.com/magium/MagiumMagentoExample.git
Step 4 - Edit 4 files
Edit the following files:
- configuration/Magium/Magento/Identities/Admin.php - Enter your admin credentials
- configuration/Magium/Magento/Identities/Customer.php - Enter some default user credentials
- configuration/Magium/Magento/Themes/Admin/ThemeConfiguration.php - Change the baseUrl setting
- configuration/Magium/Magento/Themes/Magento19/ThemeConfiguration.php - Change the baseUrl setting
Step 5 - Run composer
composer install
or if you have a custom phar installed
php composer.phar install
Step 6 - Run PHPUnit
If you are using PHPStorm all you need to do is right click on phpunit.xml.dist and select 'Run phpunit.xml.dist'
If you are running PHPUnit from the command line you will need to exectue
phpunit -c tests/phpunit.xml.dist
And with that you should see 15 tests running and passed after a few minutes.
Does it really work this easily? Check out the video below to see Magium in action.
magium/magento 适用场景与选型建议
magium/magento 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5.41k 次下载、GitHub Stars 达 27, 最近一次更新时间为 2015 年 12 月 18 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「testing」 「selenium」 「webdriver」 「magento」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 magium/magento 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 magium/magento 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 magium/magento 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Testing Suite For Lumen like Laravel does.
Utility for downloading Microsoft Edge Driver binary with browser version detection
Selenium4 (WebDriver) driver for Mink framework
Easily run Laravel Dusk tests on BrowserStack.
PHP Library for Selenium
Selenium driver for Mink framework
统计信息
- 总下载量: 5.41k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 27
- 点击次数: 3
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: ASL-2.0
- 更新时间: 2015-12-18