我的magento测试自动化框架出错了

时间:2013-08-26 12:29:57

标签: php unit-testing magento

我尝试使用net beans运行magento测试自动化框架,我收到了这个错误

PHP Warning:  require_once(SymfonyComponents/YAML/sfYaml.php): failed to open stream: No such file or directory in C:\Programs\mtaf\framework\Mage\Selenium\Helper\File.php on line 29
PHP Fatal error:  require_once(): Failed opening required 'SymfonyComponents/YAML/sfYaml.php' (include_path='C:\Programs\mtaf\framework;C:\Programs\mtaf\testsuite;.;C:\Programs\PHP\pear') in C:\Programs\mtaf\framework\Mage\Selenium\Helper\File.php on line 29

但所有梨组件和单元组件都已成功安装。

以下命令用于安装pear和php单元。

C:\Programs\PHP>pear upgrade
C:\Programs\PHP>pear channel-discover pear.phpunit.de
C:\Programs\PHP>pear channel-discover pear.symfony-project.com
C:\Programs\PHP>pear channel-discover components.ez.no
C:\Programs\PHP>pear install phpunit/PHPUnit
C:\Programs\PHP>pear install phpunit/PHPUnit_Selenium
C:\Programs\PHP>pear install phpunit/DbUnit
C:\Programs\PHP>pear install symfony/YAML

1 个答案:

答案 0 :(得分:2)

我没有在Magento上尝试过单元测试,但我会按照github的magento taf存储库中的说明进行操作。 你忘记了一条指令> pear install pear.symfony-project.com/YAML-1.0.2 有关安装Test Automation Framework的更多说明,请查看here

我相信你的指令pear install pear.symfony.com/Yaml将为symfony 2安装最新版本的Yaml(Magento使用symfony-project.com - > symfony 1)