two-thirds/laravel-test-suite 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

two-thirds/laravel-test-suite

最新稳定版本:4.4.0

Composer 安装命令:

composer require two-thirds/laravel-test-suite

包简介

README 文档

README

pipeline status coverage report

Add Laravel Test Suite to your project to make it easy to run your testing tools directly from Artisan. Once installed, just run php artisan test. Out of the box it automatically detects and runs phpunit ( with or without code coverage ), Laravel dusk, php-cs-fixer and php mess detector.

I welcome any additional tools or bugfixes via pull / merge request.

Installation

Composer

Laravel Test Suite can be installed through composer:

composer require --dev two-thirds/laravel-test-suite

Register service provider

If you are using Laravel 5.5 or greater, the service provider will be loaded automatically. If using 5.4, add the following to the providers array of config/app.php:

        TwoThirds\TestSuite\TestSuiteServiceProvider::class,

Publishing config (optional)

Laravel Test Suite comes with a sane set of defaults out of the box but if you want to customize how any of the suites are ran, you can publish to your project:

php artisan vendor:publish --tag=laravel-test-suite

Test your code

Simply run php artisan test to run the whole test suite against your codebase.

Tests can be run individually as well:

php artisan test:phpunit
php artisan test:dusk
php artisan test:php-cs-fixer
php artisan test:phpmd

Running Dusk in non-headless mode

Sometimes it can be useful to be able to see your dusk tests as they execute, for troubleshooting purposes. This package makes it really easy to do that using the --show flag, however you need to make a small change to the DuskTestCase::driver method:

    protected function driver()
    {
        $options = (new ChromeOptions())->addArguments([
            '--disable-gpu',  // Remove the '--headless' option from this array
            '--no-sandbox',
            '--window-size=1920,1080',
        ]);

        // Add this section
        if (! env('DUSK_DISABLE_HEADLESS', false)) {
            $options->addArguments(['--headless']);
        }

        ...
    }

Then, you simply run php artisan test:dusk --show to see the chrome instance running in the foreground.

统计信息

  • 总下载量: 2.54k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 3
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-06-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固