dongpu3898 2012-04-09 10:01 采纳率: 100%
浏览 66

与Selenium / Ubuntu的PHPUnit致命错误

I have gone through various tutorials/posts to install PHPUnit with Selenium on my Ubuntu system. I believe I have everything setup as required:

/usr/share/php$ phpunit --version
PHPUnit 3.6.10 by Sebastian Bergmann.

So using the IDE I create my test, and save it for running, which appears to be setup as required. So I run the test using:

phpunit /home/retrobadger/working_files/tutorials/phpunit/selenium1.php

But everytime I run it, I get the error below:

PHP Fatal error:  Class 'PHPUnit_Extensions_SeleniumTestSuite' not found in /usr/share/php/PHPUnit/Extensions/SeleniumTestCase.php on line 394
PHP Stack trace:
PHP   1. {main}() /usr/bin/phpunit:0
PHP   2. PHPUnit_TextUI_Command::main() /usr/bin/phpunit:46
PHP   3. PHPUnit_TextUI_Command->run() /usr/share/php/PHPUnit/TextUI/Command.php:130
PHP   4. PHPUnit_Runner_BaseTestRunner->getTest() /usr/share/php/PHPUnit/TextUI/Command.php:150
PHP   5. ReflectionMethod->invoke() /usr/share/php/PHPUnit/Runner/BaseTestRunner.php:124
PHP   6. PHPUnit_Extensions_SeleniumTestCase::suite() /usr/share/php/PHPUnit/Extensions/SeleniumTestCase.php:0

The file in extensions exists, and I have set very open priviledges to it. The only things I can think of are that either my SeleniumTestCase.php is faulty, or that I need to require another file no other tutorials have suggested.

Any recommendations would be greatly appreciated. I have little experience with PHPUnit so expect my mistake is a basic one.

Thanks for any advice you can give, Dan

  • 写回答

1条回答 默认 最新

  • duannuochi3549 2012-04-09 10:07
    关注

    Check that you include PHPUnit when you call tests.. either in php.ini, or with IDE that you run, or explicitly - right now it just can't find class.. which means that PHPUnit is not reachable. Try a simplier class, PHPUnit_Extensions_SeleniumTestCase

    评论

报告相同问题?

悬赏问题

  • ¥50 如何用脚本实现输入法的热键设置
  • ¥20 我想使用一些网络协议或者部分协议也行,主要想实现类似于traceroute的一定步长内的路由拓扑功能
  • ¥30 深度学习,前后端连接
  • ¥15 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)