我经常运行一个包含大约250个测试的测试套件。每次我运行这个测试套件时,我都会得到不一致的错误返回,每次似乎都是不同的测试。返回的不一致错误示例:
Facebook\WebDriver\Exception\StaleElementReferenceException: stale element reference: element is not attached to the page document
(Session info: headless chrome=65.0.3325.146)
(Driver info: chromedriver=2.36.540471 (9c759
如果我使用RefreshDatabase特性,我的测试就会失败。
没有特征测试的将通过,但数据仍保留在数据库中.
我在用:
Laravel 5.5 (新鲜的)
Laradock: nginx mysql selenium
测试正在从laradock的工作区运行。
这是一个简单的测试,来自官方的。
<?php
namespace Tests\Browser;
use App\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Laravel\Dusk\Browser;
use Tests\DuskTe
版本: Laravel v5.8.21和Laravel Dusk v5.1.0 我在让Dusk使用测试数据库时遇到了真正的问题。我似乎已经看过了每一条建议,但仍然一无所获。由于某种原因,Dusk无法加载我的.env.dusk.local文件。有人能帮上忙吗? // test
class ApplicationTest extends DuskTestCase
{
use DatabaseMigrations;
/** @test */
public function it_works()
{
$this->browse(function
我正在构建一个自消耗Lumen API,它只有一个Lumen视图(它服务于附加了React应用程序的HTML )。
我能够用composer require --dev laravel/dusk安装黄昏,看起来很成功。
但是,当我运行php artisan dusk:install时,我得到了There are no commands defined in the "dusk" namespace.
我知道Lumen有一个赤裸裸的php工匠。但是,我想知道我是否可以将命令添加到" Dusk“名称空间,或者是否有人成功地将Dusk与Lumen一起使用。
我正在使用Laravel设置e2e测试,并且我在尝试如何测试Laravel的身份验证时遇到了问题。
我正在使用DatabaseMigrations特性迁移数据库,并使用1条记录(运行模拟用户的setUp方法)填充数据库。我尝试使用loginAs()方法与这个特定的用户登录,但它没有登录我。
我的AuthenticationTest.php文件
use DatabaseMigrations;
public function setUp(): void
{
parent::setUp();
factory('App\User')-
我刚刚发现了Laravel,我很高兴能在我的项目中使用它。然而,它似乎无法使它发挥作用。我按照Laravel文档来安装Dusk。当我在终端机运行php artisan dusk时,我得到
[Symfony\Component\Process\Exception\RuntimeException]
TTY mode is not supported on Windows platform.
我找到了这个(),它应该修复它--我想,但是我仍然得到了错误。
此外,我试图通过PhpStorm在此处接受的答案()之后运行Dusk测试,但我得到了一个Class config does not ex
我在app/Providers/DuskServiceProvider文件中定义了以下宏,但dusk抛出了一个BadMethodCallException: Browser::macro('logoutOfWave', function () {
$this->visit(env('DUSK_URL'))
->script("localStorage.clear()");
$this->visit(env('DUSK_URL'));
re
我正在尝试在Laravel5.4应用程序上安装Laravel/Dusk。
我正在运行的命令是,根据文档:
composer require laravel/dusk
终端输出:
Using version ^1.0 for laravel/dusk
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing facebook/webdriver (1.3.0)
我和Sail有一个Laravel,我想用Laravel Dusk做自动化测试。我遵循了Dusk Documentation和Sail + Dusk Installation中的所有说明,但是当我运行默认测试时,我收到以下错误消息: Tests\Browser\ExampleTest::testBasicExample
Facebook\WebDriver\Exception\WebDriverCurlException: Curl error thrown for http POST to /session with params: {"capabilities":{"
有没有人能让在上工作。
我可以让我的构建工作和测试与PHPUnit,但它失败的拉拉维尔杜斯克。
我有一个基地拉架安装和杜斯克安装。当我到达php artisan dusk命令时,我会得到以下错误。
误差
1) Tests\Browser\ExampleTest::testBasicExample
Did not see expected text [Laravel] within element [body].
Failed asserting that false is true.
因此,它正在启动chromebrowser,但并没有触及该站点。
我试过使用Dusk的chromedriver
我听从了的指示。但是我遇到了这个错误,并且不知道为什么。
There was 1 error:
1) Tests\Browser\Auth\LoginTest::testLogin
TypeError: Argument 1 passed to Facebook\WebDriver\Remote\DesiredCapabilities::__construct() must be of the type array, null given, called in /var/www/xxxxxx/vendor/facebook/webdriver/lib/Remote/RemoteWebDriv
我用Laravel编写了以下端到端测试,以测试我的站点的PayPal和Stripe元素表单:
<?php
namespace Tests\Browser;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Laravel\Dusk\Browser;
use Tests\DuskTestCase;
class PaymentsTest extends DuskTestCase
{
use DatabaseMigrations;
/**
* A Dusk test example.
*