[英]PHPUnit Selenium integration for Laravel 5.2+
Before Laravel's 5.2 release, Laracasts' integrated package was providing Selenium integration for Laravel. 在Laravel 5.2发行之前,Laracasts的集成软件包为Laravel提供了Selenium集成。 I couldn't find any similar package for the 5.2 release.
我找不到5.2版的任何类似软件包。 Is there any?
有没有? How can I integrate selenium testing with Laravel?
如何将硒测试与Laravel集成在一起?
I've seen these links, they do not provide any solutions: 我看过这些链接,它们没有提供任何解决方案:
Selenium and Laravel 5.2 硒和Laravel 5.2
Has anyone tried Laravel Integrated package in Laravel 5.2? 有没有人尝试过Laravel 5.2中的Laravel集成软件包?
PHPUnit itself has a selenium extension . PHPUnit本身具有selenium扩展 。 It's not quite laravelish, and is not backed by a modern WebDriver interface.
它不是很简单,也没有现代WebDriver界面的支持。
CodeCeption is a very powerful, yet easy-to-use testing tool for PHP. CodeCeption是一个非常强大但易于使用的PHP测试工具。 Not only does it provide a unit-testing API, it also provides its own selenium acceptance testing API .
它不仅提供了单元测试API,还提供了自己的硒接受测试API 。
It also has perfect Laravel integration and a great chrome extension for generating acceptance test in browser. 它还具有完善的Laravel集成和出色的chrome扩展 ,可在浏览器中生成验收测试。 Here's an example code from the docs:
这是文档中的示例代码:
<?php
$I->amOnPage('/login');
$I->fillField('username', 'davert');
$I->fillField('password', 'qwerty');
$I->click('LOGIN');
$I->see('Welcome to codeception!');
Here's a step-by-step guide to getting started with acceptance testing using CodeCeption: 这是使用CodeCeption进行验收测试的分步指南:
http://codeception.com/11-20-2013/webdriver-tests-with-codeception.html http://codeception.com/11-20-2013/webdriver-tests-with-codeception.html
Here are some other options: 以下是一些其他选项:
https://github.com/lmc-eu/steward https://github.com/lmc-eu/steward
https://github.com/Modelizer/Selenium https://github.com/Modelizer/Selenium
https://github.com/jhoopes/laravel-selenium-driver https://github.com/jhoopes/laravel-selenium-driver
Update : Good news . 更新 : 好消息 。
Update : See Mink's PHPUnit integration . 更新 :请参见Mink的PHPUnit集成 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.