运行MTAF时使用selenium server 2.24.1和firefox 13拍摄屏幕截图
我正在尝试设置我的测试自动化引擎。不幸的是,当我运行测试并失败时,没有截屏。在告诉我出了什么问题的日志中,我找不到任何错误 我正在使用: Magento社区1.7.0.0, Selenium服务器2.24.1, Firefox 13.0.1, PHPUnit 3.6.11, Magento测试自动化框架(最新版本)。 Ubuntu 12.04 我的问题是: 1.如何归纳问题所在?运行MTAF时使用selenium server 2.24.1和firefox 13拍摄屏幕截图,firefox,magento,testing,selenium,automation,Firefox,Magento,Testing,Selenium,Automation,我正在尝试设置我的测试自动化引擎。不幸的是,当我运行测试并失败时,没有截屏。在告诉我出了什么问题的日志中,我找不到任何错误 我正在使用: Magento社区1.7.0.0, Selenium服务器2.24.1, Firefox 13.0.1, PHPUnit 3.6.11, Magento测试自动化框架(最新版本)。 Ubuntu 12.04 我的问题是: 1.如何归纳问题所在? 2.有没有人在firefox和selenium版本的屏幕截图中取得了成功?我编写了一个没有magento taf的简
2.有没有人在firefox和selenium版本的屏幕截图中取得了成功?我编写了一个没有magento taf的简单测试,它必须失败:
class WebTest extends PHPUnit_Extensions_SeleniumTestCase
{
protected $captureScreenshotOnFailure = TRUE;
protected $screenshotPath = '/home/lpp2/Pulpit/report/';
protected $screenshotUrl = '/home/lpp2/Pulpit/report/';
protected function setUp()
{
$this->setBrowser("*chrome");
$this->setBrowserUrl("http://www.google.pl/");
}
public function testMyTestCase()
{
$this->open("http://www.google.pl/");
$this->click("id=gbi4t");
$this->waitForPageToLoad("30000");
$this->type("id=Email", "user.name");
$this->type("id=Passwd", "pass");
$this->click("id=signIn");
$this->waitForPageToLoad("30000");
$this->assertEquals("Google", $this->getTitle());
}
}
?>
My phpunit.xml:
<phpunit>
<testsuites>
<testsuite name="Google">
<file>google.php</file>
</testsuite>
</testsuites>
<logging>
<log type="coverage-html" target="./report/coverage/" charset="UTF-8"
yui="true" highlight="false"
lowUpperBound="35" highLowerBound="70"/>
<log type="plain" target="./report/logfile.txt"/>
<log type="junit" target="./report/logfile.xml" logIncompleteSkipped="false"/>
</logging>
</phpunit>
取消注释->仍不工作
编辑:
好的,我已经从github下载了最新版本,现在可以使用了。也许selenium不支持firefox 13:这个链接已经过时了,你可以看到firefox 13是受支持的。我每天用它(用WebDriver)截图。然而,我不知道Magento是什么。你们能做一个简单的测试,打开Google并截图看看会发生什么吗?当我使用Selenium IDE进行测试并运行它(在Selenium IDE中)时,我得到了截图。Magento是电子商务的平台。MTAF是为在Magento中创建的商店进行测试的框架。MTAF使用selenium进行用例测试,并由phpunit运行。我已经降级到Firefox10,但仍然没有截图。
protected $captureScreenshotOnFailure = TRUE;
protected $screenshotPath = SELENIUM_TESTS_SCREENSHOTDIR;
protected $screenshotUrl = SELENIUM_TESTS_SCREENSHOTDIR;