加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

用于Laravel 5.2的PHPUnit Selenium集成

发布时间:2020-12-14 19:43:09 所属栏目:大数据 来源:网络整理
导读:在Laravel 5.2发布之前,Laracasts的集成软件包为Laravel提供了Selenium集成.我找不到5.2版本的任何类似软件包.有没有?如何将硒测试与Laravel集成? 我见过这些链接,他们没有提供任何解决方案: Selenium and Laravel 5.2 Has anyone tried Laravel Integrat
在Laravel 5.2发布之前,Laracasts的集成软件包为Laravel提供了Selenium集成.我找不到5.2版本的任何类似软件包.有没有?如何将硒测试与Laravel集成?

我见过这些链接,他们没有提供任何解决方案:
Selenium and Laravel 5.2
Has anyone tried Laravel Integrated package in Laravel 5.2?

解决方法

PHPUnit本身有一个 selenium extension.它不是很平坦,并没有现代WebDriver接口的支持.

CodeCeption是一个非常强大且易于使用的PHP测试工具.它不仅提供单元测试API,还提供自己的selenium acceptance testing API.

它还具有完美的Laravel integration和一个很棒的chrome extension,用于在浏览器中生成验收测试.这是来自文档的示例代码:

<?php
$I->amOnPage('/login');
$I->fillField('username','davert');
$I->fillField('password','qwerty');
$I->click('LOGIN');
$I->see('Welcome to codeception!');

以下是使用CodeCeption开始验收测试的分步指南:
http://codeception.com/11-20-2013/webdriver-tests-with-codeception.html

以下是一些其他选项:
https://github.com/lmc-eu/steward
https://github.com/Modelizer/Selenium
https://github.com/jhoopes/laravel-selenium-driver

更新:Good news.
更新:见Mink’s PHPUnit integration.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读