Giter Site home page Giter Site logo

antonioribeiro / tddd Goto Github PK

View Code? Open in Web Editor NEW
721.0 31.0 57.0 4.57 MB

A Laravel Continuous Integration Package

License: MIT License

PHP 25.04% HTML 0.30% CSS 1.13% JavaScript 1.77% Vue 71.75%
dashboard watcher phpunit codeception laravel-dusk phpspec testing laravel php tester

tddd's Introduction

TDDD - Test Driven Development Dashboard

A Self-Hosted TDD Dashboard & Tests Watcher

Latest Stable Version License Downloads Code Quality Build StyleCI

What is it?

TDD Dashboard, is an app (built as a Laravel PHP package) to watch and run all your tests during development. It supports any test framework working on terminal, and comes with some testers (PHPUnit, phpspec, behat, Jest, AVA...) preconfigured, but you can easily add yours, just tell it where the executable is and it's done. It also shows the progress of your tests, let you run a single test or all of them, and open your favorite code editor (PHPStorm, VSCode, Sublime Text, etc.) going right to the failing line of your test. If your test framework generate screenshots, it is also able to show it in the log page, with all the reds and greens you are used to see in your terminal.

It uses Laravel as motor, but supports (and has been tested with) many languages, frameworks and testing frameworks:

Features

  • Project List: click a project link to see all its tests.
  • Open files directly in your source code editor (PHPStorm, Sublime Text...).
  • Error log with source code linked, go strait to the error line in your source code.
  • Enable/disable a test. Once disabled if the watcher catches a change in resources, that test will not fire.
  • Real time test state: "idle", "running", "queued", "ok" and "failed".
  • "Show" button, to display the error log of failed tests.
  • Highly configurable, watch anything and test everything!

Videos

Screenshots

Dashboard

visits

Error Log

visits

visits

visits

Command Line Interface

The Artisan commands Watcher and Tester are responsible for watching resources and firing tests, respectively:

Watcher

Keep track of your files and enqueue your tests every time a project or test file is changed. If a project file changes, it will enqueue all your tests, if a test file changes, it will enqueue only that particular test. This is how you run it:

php artisan tddd:watch

Tester

Responsible for taking tests from the run queue, execute it and log the results. Tester will only execute enabled tests. This is how you run it:

php artisan tddd:test

Notifications

It uses JoliNotif, so if it's not working on macOS, you can try installing terminal-notifier:

brew install terminal-notifier

Test Framework Compatibility

This package was tested and is known to be compatible with

Installing

TL;DR

laravel new tddd
cd tddd
composer require pragmarx/tddd
php artisan vendor:publish --provider="PragmaRX\Tddd\Package\ServiceProvider"
valet link tddd
# configure database on your .env
php artisan migrate
php artisan tddd:watch & php artisan tddd:work &
open http://tddd.dev/tests-watcher/dashboard

Examples & Starter App

For lots of examples, check this starter app, which will also help you create an independent dashboard for your tests.

The long version

Require it with Composer:

composer require pragmarx/tddd

Create a database, configure on your Laravel app and migrate it

php artisan migrate

Publish Ci configuration:

On Laravel 4.*

Add the service provider to your app/config/app.php:

'PragmaRX\Tddd\Package\ServiceProvider',
php artisan config:publish pragmarx/tddd

On Laravel 5.*

php artisan vendor:publish --provider="PragmaRX\Tddd\Package\ServiceProvider"

Example of projects

Laravel Dusk

'project bar (dusk)' => [
    'path' => $basePath,
    'watch_folders' => [
        'app',
        'tests/Browser'
    ],
    'exclude' => [
        'tests/Browser/console/',
        'tests/Browser/screenshots/',
    ],
    'depends' => [],
    'tests_path' => 'tests',
    'suites' => [
        'browser' => [
            'tester' => 'dusk',
            'tests_path' => 'Browser',
            'command_options' => '',
            'file_mask' => '*Test.php',
            'retries' => 0,
        ],
    ],
],

Troubleshooting

Tests are running fine in terminal but failing in the dashboard?

You have first to remember they are being executed in isolation, and, also, the environment is not exactly the same, so things like a cache and session may affect your results.

Requirements

  • Laravel 4.1+ or 5
  • PHP 5.3.7+

Author

Antonio Carlos Ribeiro

License

Laravel Ci is licensed under the BSD 3-Clause License - see the LICENSE file for details

Contributing

Pull requests and issues are welcome.

tddd's People

Contributors

antonioribeiro avatar arie-piscator avatar bagwaa avatar bryant1410 avatar brysonreece avatar stltt avatar sumityadav avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tddd's Issues

Cannot make it to work?

Hi, I followed the configuration, watcher works fine if I modify files it adds stuff to the queue but then what? If I manually run the worker, the first few times it seems like it's running the test but it never proceeds? I.e it stays on 1 test if I turn off and turn back on it moved to another one? also the dashboard is not actually showing any of the test results. Also is it possible to define the tester route in a middleware inside web.php?

vagrant@liveandnow:~/liveandnow$ php artisan ci:work
Laravel Tests-Watcher - Worker
RUNNING: /usr/bin/script -q /tmp/tw-m9354O vendor/bin/phpunit  /home/vagrant/liveandnow/tests/Unit/ResponseTest.php

♥
vagrant@liveandnow:~/liveandnow$ php artisan ci:work
Live & Now Tester - Worker
RUNNING: /usr/bin/script -q /tmp/tw-S4f2Xe vendor/bin/phpunit  /home/vagrant/liveandnow/tests/Unit/ApiResponseTest.php
vagrant@liveandnow:~/liveandnow$

♥
vagrant@liveandnow:~/liveandnow$ php artisan ci:work
Live & Now Tester - Worker
RUNNING: /usr/bin/script -q /tmp/tw-qThe7l vendor/bin/phpunit  /home/vagrant/liveandnow/tests/Unit/ResponseTest.php
vagrant@liveandnow:~/liveandnow$
♥
vagrant@liveandnow:~/liveandnow$ php artisan ci:work
Live & Now Tester - Worker
RUNNING: /usr/bin/script -q /tmp/tw-YKED20 php artisan dusk  /home/vagrant/liveandnow/tests/Browser/LoginTest.php
vagrant@liveandnow:~/liveandnow$
♥
vagrant@liveandnow:~/liveandnow$ php artisan ci:work
Live & Now Tester - Worker
RUNNING: /usr/bin/script -q /tmp/tw-PTWgeT php artisan dusk  /home/vagrant/liveandnow/tests/Browser/RegisterTest.php
vagrant@liveandnow:~/liveandnow$

[1]+  Stopped                 php artisan ci:work
vagrant@liveandnow:~/liveandnow$ cd liveandnow
-bash: cd: liveandnow: No such file or directory
vagrant@liveandnow:~/liveandnow$ php artisan ci:work
Live & Now Tester - Worker
idle...
♥
vagrant@liveandnow:~/liveandnow$ php artisan ci:work
Live & Now Tester - Worker
idle...

watch:

vagrant@liveandnow:~/liveandnow$ php artisan ci:watch
Live & Now Tester - Watcher
Loading testers...
TESTER: phpunit
TESTER: dusk
TESTER: codeception
TESTER: phpspec
TESTER: behat
TESTER: atoum
TESTER: tester
TESTER: jest
TESTER: react-scripts
TESTER: rake
TESTER: ava
Loading projects and suites...
Project 'PhPUnit'
  -- suite 'feature'
  -- suite 'unit'
Project 'Dusk'
  -- suite 'browser'
EXCLUDED: /home/vagrant/liveandnow/tests/Browser/console/
EXCLUDED: /home/vagrant/liveandnow/tests/Browser/screenshots/
Loading tests...
BOOT: booting watchers...
WATCHING /home/vagrant/liveandnow/app
WATCHING /home/vagrant/liveandnow/tests
WATCHING /home/vagrant/liveandnow/app
WATCHING /home/vagrant/liveandnow/tests/Browser
WATCHING CONFIG: /home/vagrant/liveandnow/config/ci.php
Loading testers...
TESTER: phpunit
TESTER: dusk
TESTER: codeception
TESTER: phpspec
TESTER: behat
TESTER: atoum
TESTER: tester
TESTER: jest
TESTER: react-scripts
TESTER: rake
TESTER: ava
Loading projects and suites...
Project 'PhPUnit'
  -- suite 'feature'
  -- suite 'unit'
Project 'Dusk'
  -- suite 'browser'
EXCLUDED: /home/vagrant/liveandnow/tests/Browser/console/
EXCLUDED: /home/vagrant/liveandnow/tests/Browser/screenshots/
Loading tests...
FILE CHANGED: /home/vagrant/liveandnow/app/Helpers/Parsers.php was modified
QUEUE: adding all tests for the feature suite
QUEUE: adding all tests for the unit suite
QUEUE: adding all tests for the browser suite

can't install

i run this in but i get this error. This is in a laravel 5.6 project.
Your requirements could not be resolved to an installable set of packages.

Problem 1
    - Conclusion: remove symfony/console v4.0.6
    - Conclusion: don't install symfony/console v4.0.6
    - symfony/process 3.0.x-dev conflicts with symfony/console[v4.0.6].
    - symfony/process 3.1.x-dev conflicts with symfony/console[v4.0.6].
    - symfony/process 3.2.x-dev conflicts with symfony/console[v4.0.6].
    - symfony/process v3.0.0 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.0.0-BETA1 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.0.1 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.0.2 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.0.3 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.0.4 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.0.5 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.0.6 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.0.7 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.0.8 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.0.9 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.1.0 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.1.0-BETA1 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.1.0-RC1 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.1.1 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.1.10 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.1.2 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.1.3 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.1.4 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.1.5 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.1.6 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.1.7 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.1.8 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.1.9 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.2.0 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.2.0-BETA1 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.2.0-RC1 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.2.0-RC2 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.2.1 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.2.10 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.2.11 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.2.12 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.2.13 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.2.14 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.2.2 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.2.3 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.2.4 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.2.5 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.2.6 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.2.7 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.2.8 conflicts with symfony/console[v4.0.6].
    - symfony/process v3.2.9 conflicts with symfony/console[v4.0.6].
    - Installation request for symfony/console (locked at v4.0.6) -> satisfiable by symfony/console[v4.0.6].
    - Installation request for pragmarx/tddd ^0.9.9 -> satisfiable by pragmarx/tddd[v0.9.9].
    - Conclusion: don't install symfony/process v4.0.6|install symfony/process 3.0.x-dev|install symfony/process 3.1.x-dev|install symfony/process 3.2.x-dev|install symfony/process v3.0.0|install symfony/process v3.0.0-BETA1|install symfony/process v3.0.1|install symfony/process v3.0.2|install symfony/process v3.0.3|install symfony/process v3.0.4|install symfony/process v3.0.5|install symfony/process v3.0.6|install symfony/process v3.0.7|install symfony/process v3.0.8|install symfony/process v3.0.9|install symfony/process v3.1.0|install symfony/process v3.1.0-BETA1|install symfony/process v3.1.0-RC1|install symfony/process v3.1.1|install symfony/process v3.1.10|install symfony/process v3.1.2|install symfony/process v3.1.3|install symfony/process v3.1.4|install symfony/process v3.1.5|install symfony/process v3.1.6|install symfony/process v3.1.7|install symfony/process v3.1.8|install symfony/process v3.1.9|install symfony/process v3.2.0|install symfony/process v3.2.0-BETA1|install symfony/process v3.2.0-RC1|install symfony/process v3.2.0-RC2|install symfony/process v3.2.1|install symfony/process v3.2.10|install symfony/process v3.2.11|install symfony/process v3.2.12|install symfony/process v3.2.13|install symfony/process v3.2.14|install symfony/process v3.2.2|install symfony/process v3.2.3|install symfony/process v3.2.4|install symfony/process v3.2.5|install symfony/process v3.2.6|install symfony/process v3.2.7|install symfony/process v3.2.8|install symfony/process v3.2.9
    - Conclusion: remove symfony/process v4.0.6|install symfony/process 3.0.x-dev|install symfony/process 3.1.x-dev|install symfony/process 3.2.x-dev|install symfony/process v3.0.0|install symfony/process v3.0.0-BETA1|install symfony/process v3.0.1|install symfony/process v3.0.2|install symfony/process v3.0.3|install symfony/process v3.0.4|install symfony/process v3.0.5|install symfony/process v3.0.6|install symfony/process v3.0.7|install symfony/process v3.0.8|install symfony/process v3.0.9|install symfony/process v3.1.0|install symfony/process v3.1.0-BETA1|install symfony/process v3.1.0-RC1|install symfony/process v3.1.1|install symfony/process v3.1.10|install symfony/process v3.1.2|install symfony/process v3.1.3|install symfony/process v3.1.4|install symfony/process v3.1.5|install symfony/process v3.1.6|install symfony/process v3.1.7|install symfony/process v3.1.8|install symfony/process v3.1.9|install symfony/process v3.2.0|install symfony/process v3.2.0-BETA1|install symfony/process v3.2.0-RC1|install symfony/process v3.2.0-RC2|install symfony/process v3.2.1|install symfony/process v3.2.10|install symfony/process v3.2.11|install symfony/process v3.2.12|install symfony/process v3.2.13|install symfony/process v3.2.14|install symfony/process v3.2.2|install symfony/process v3.2.3|install symfony/process v3.2.4|install symfony/process v3.2.5|install symfony/process v3.2.6|install symfony/process v3.2.7|install symfony/process v3.2.8|install symfony/process v3.2.9
    - pragmarx/tddd v0.9.9 requires symfony/process ~3 -> satisfiable by symfony/process[3.0.x-dev, 3.1.x-dev, 3.2.x-dev, 3.3.x-dev, 3.4.x-dev, v3.0.0, v3.0.0-BETA1, v3.0.1, v3.0.2, v3.0.3, v3.0.4, v3.0.5, v3.0.6, v3.0.7, v3.0.8, v3.0.9, v3.1.0, v3.1.0-BETA1, v3.1.0-RC1, v3.1.1, v3.1.10, v3.1.2, v3.1.3, v3.1.4, v3.1.5, v3.1.6, v3.1.7, v3.1.8, v3.1.9, v3.2.0, v3.2.0-BETA1, v3.2.0-RC1, v3.2.0-RC2, v3.2.1, v3.2.10, v3.2.11, v3.2.12, v3.2.13, v3.2.14, v3.2.2, v3.2.3, v3.2.4, v3.2.5, v3.2.6, v3.2.7, v3.2.8, v3.2.9, v3.3.0, v3.3.0-BETA1, v3.3.0-RC1, v3.3.1, v3.3.10, v3.3.11, v3.3.12, v3.3.13, v3.3.14, v3.3.15, v3.3.16, v3.3.2, v3.3.3, v3.3.4, v3.3.5, v3.3.6, v3.3.7, v3.3.8, v3.3.9, v3.4.0, v3.4.0-BETA1, v3.4.0-BETA2, v3.4.0-BETA3, v3.4.0-BETA4, v3.4.0-RC1, v3.4.0-RC2, v3.4.1, v3.4.2, v3.4.3, v3.4.4, v3.4.5, v3.4.6].
    - Can only install one of: symfony/process[3.3.x-dev, v4.0.6].
    - Can only install one of: symfony/process[3.4.x-dev, v4.0.6].
    - Can only install one of: symfony/process[v3.3.0, v4.0.6].
    - Can only install one of: symfony/process[v3.3.0-BETA1, v4.0.6].
    - Can only install one of: symfony/process[v3.3.0-RC1, v4.0.6].
    - Can only install one of: symfony/process[v3.3.1, v4.0.6].
    - Can only install one of: symfony/process[v3.3.10, v4.0.6].
    - Can only install one of: symfony/process[v3.3.11, v4.0.6].
    - Can only install one of: symfony/process[v3.3.12, v4.0.6].
    - Can only install one of: symfony/process[v3.3.13, v4.0.6].
    - Can only install one of: symfony/process[v3.3.14, v4.0.6].
    - Can only install one of: symfony/process[v3.3.15, v4.0.6].
    - Can only install one of: symfony/process[v3.3.16, v4.0.6].
    - Can only install one of: symfony/process[v3.3.2, v4.0.6].
    - Can only install one of: symfony/process[v3.3.3, v4.0.6].
    - Can only install one of: symfony/process[v3.3.4, v4.0.6].
    - Can only install one of: symfony/process[v3.3.5, v4.0.6].
    - Can only install one of: symfony/process[v3.3.6, v4.0.6].
    - Can only install one of: symfony/process[v3.3.7, v4.0.6].
    - Can only install one of: symfony/process[v3.3.8, v4.0.6].
    - Can only install one of: symfony/process[v3.3.9, v4.0.6].
    - Can only install one of: symfony/process[v3.4.0, v4.0.6].
    - Can only install one of: symfony/process[v3.4.0-BETA1, v4.0.6].
    - Can only install one of: symfony/process[v3.4.0-BETA2, v4.0.6].
    - Can only install one of: symfony/process[v3.4.0-BETA3, v4.0.6].
    - Can only install one of: symfony/process[v3.4.0-BETA4, v4.0.6].
    - Can only install one of: symfony/process[v3.4.0-RC1, v4.0.6].
    - Can only install one of: symfony/process[v3.4.0-RC2, v4.0.6].
    - Can only install one of: symfony/process[v3.4.1, v4.0.6].
    - Can only install one of: symfony/process[v3.4.2, v4.0.6].
    - Can only install one of: symfony/process[v3.4.3, v4.0.6].
    - Can only install one of: symfony/process[v3.4.4, v4.0.6].
    - Can only install one of: symfony/process[v3.4.5, v4.0.6].
    - Can only install one of: symfony/process[v3.4.6, v4.0.6].
    - Installation request for symfony/process (locked at v4.0.6) -> satisfiable by symfony/process[v4.0.6].


Installation failed, reverting ./composer.json to its original content.

Migration not working

Causes the following issue:

  [Symfony\Component\Debug\Exception\FatalThrowableError]              
  Call to undefined method Illuminate\Foundation\Application::share()  

laravel 5.2 incompatibility

Hello,
it's seems there is some works to do to be compatible with laravel 5.2 out of the box. There is some issue with config method I think

environment variable not set pusher key

Hi Antonio
I have a problem when I try installing antonioribeiro/ci package.
And the error "environment variable not set: PUSHER_KEY" appear at step "Create a database, configure on your Laravel app and migrate it" when i run "php artisan migrate --package=pragmarx/ci"
I have looked for on Google and still do not know the reason why ?
Please help me fix this problem!
Thank a lot ! :)
https://gyazo.com/8b3374b01c21ffcd4eeb9da0af5e9663

Errors with Laravel 5.5

Seems there's a few issues with Laravel 5.5, namely default config issues:

In Inline.php line 600:

  Malformed inline YAML string: {{ config('app.name') }} at line 2 (near "dashboard: {{ config('app.name') }}").

which is easily resolved by wrapping that string in double quotes within the YML config.

As well as errors associated with the watcher:

Config loaded from /Users/dkenney/Documents/Personal/NukeYa/config
Loading testers...
No testers found.
Loading projects and suites...
No projects found.
Loading tests...
FATAL ERROR: directory not found: /Users/dkenney/code/pragmarx/tddd/tests/Feature.
[1]    24730 done       php artisan tddd:watch

I am new to Laravel and will try to figure these issues out on my own - documentation isn't really clear regarding how the configuration for tests work and what directory to point to. I'm not sure why pragmarx/tddd is chosen or why it's assuming it should point to my home directory as well?

From the config I can see that it's configured this way but wouldn't a better way to do this be to default to the root of the Laravel application and not assume the location of the code base?

Any help here would be greatly appreciated - I can try to make a PR for fixing this - I was looking forward to having a nice way to manage my tests and code coverage while I learn and build with Laravel.

System info:
OSX High Sierra
PHP 7.1.3

If you need anymore let me know.

Layout for small screens

Hi,

This is a minor issue, but, I have a notebook 13'' , and layout does not fit well for tags.

captura de tela 2017-10-28 as 02 07 13

Installation steps not correct

Hello,

I'm following the installation steps, however, the service provider mentioned isn't correct.

'PragmaRX\TestsWatcher\Vendor\Laravel\ServiceProvider',

Seems like the correct one is:

\PragmaRX\Ci\Vendor\Laravel\ServiceProvider::class,

This doesn't exist.

laravel 5 install

When I try to install in l5 throws this error:

Uncaught exception 'ReflectionException' with message 'Class log does not exist'.....

Laravel 5: "package" method removed

Package installs with no problem but updon trying to execute artisan after adding service provider to config/app.php produces:

PHP Fatal error: Call to undefined method Illuminate\Config\Repository::package() in /home/seats/code/www/rldcks/charlie/vendor/pragmarx/support/src/ServiceProvider.php on line 142
PHP Stack trace:
PHP 1. {main}() /home/seats/code/www/rldcks/charlie/artisan:0
PHP 2. Illuminate\Foundation\Console\Kernel->handle() /home/seats/code/www/rldcks/charlie/artisan:36
PHP 3. Illuminate\Foundation\Console\Kernel->bootstrap() /home/seats/code/www/rldcks/charlie/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:89
PHP 4. Illuminate\Foundation\Application->bootstrapWith() /home/seats/code/www/rldcks/charlie/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:192
PHP 5. Illuminate\Foundation\Bootstrap\RegisterProviders->bootstrap() /home/seats/code/www/rldcks/charlie/storage/framework/compiled.php:1307
PHP 6. Illuminate\Foundation\Application->registerConfiguredProviders() /home/seats/code/www/rldcks/charlie/storage/framework/compiled.php:1758
PHP 7. Illuminate\Foundation\ProviderRepository->load() /home/seats/code/www/rldcks/charlie/storage/framework/compiled.php:1404
PHP 8. Illuminate\Foundation\Application->register() /home/seats/code/www/rldcks/charlie/storage/framework/compiled.php:6344
PHP 9. PragmaRX\Ci\Vendor\Laravel\ServiceProvider->register() /home/seats/code/www/rldcks/charlie/storage/framework/compiled.php:1414
PHP 10. PragmaRX\Support\ServiceProvider->register() /home/seats/code/www/rldcks/charlie/vendor/pragmarx/ci/src/Vendor/Laravel/ServiceProvider.php:49
PHP 11. PragmaRX\Support\ServiceProvider->preRegister() /home/seats/code/www/rldcks/charlie/vendor/pragmarx/support/src/ServiceProvider.php:116
PHP 12. PragmaRX\Support\ServiceProvider->registerConfig() /home/seats/code/www/rldcks/charlie/vendor/pragmarx/support/src/ServiceProvider.php:101
exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Call to undefined method Illuminate\Config\Repository::package()' in /home/seats/code/www/rldcks/charlie/vendor/pragmarx/support/src/ServiceProvider.php:142
Stack trace:
#0 /home/seats/code/www/rldcks/charlie/storage/framework/compiled.php(1721): Illuminate\Foundation\Bootstrap\HandleExceptions->fatalExceptionFromError(Array)
#1 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleShutdown()
#2 {main}

Cannot open file

Hi,

It does not handle path with "spaces".

'myproject' => [
            'path'          => '/Volumes/Backup\ HD/Dropbox/dev/myproject',
...

captura de tela 2017-10-28 as 02 03 57

Test won't complete, Work will never finish.

WATCHING CONFIG: /srv/www/production/reporting-admin/config/ci.php RUNNING: /usr/bin/script -q /tmp/tw-7Ksd5Q vendor/bin/phpunit /srv/www/production/reporting-admin/tests/Unit/ExampleTest.php

The ExampleTest is just a basic test:

public function testBasicTest() { $this->assertTrue(true); }

I've stepped through the code and it appears to be hanging inside of the Symphony Process.php wait function.

vendor/symfony/process/Process.php

` public function wait(callable $callback = null){
$this->requireProcessIsStarted(FUNCTION);

    $this->updateStatus(false);

    if (null !== $callback) {
        if (!$this->processPipes->haveReadSupport()) {
            $this->stop(0);
            throw new \LogicException('Pass the callback to the Process::start method or enableOutput to use a callback with Process::wait');
        }
        $this->callback = $this->buildCallback($callback);
    }

    do {
        $this->checkTimeout();
        $running = '\\' === DIRECTORY_SEPARATOR ? $this->isRunning() : $this->processPipes->areOpen();
        $this->readPipes($running, '\\' !== DIRECTORY_SEPARATOR || !$running);
    } while ($running);

    while ($this->isRunning()) {
        usleep(1000);
    }

    if ($this->processInformation['signaled'] && $this->processInformation['termsig'] !== $this->latestSignal) {
        throw new RuntimeException(sprintf('The process has been signaled with signal "%s".', $this->processInformation['termsig']));
    }

    return $this->exitcode;
}`

When running ci:work $running never sets itself to false, so it gets stuck inside of the while loop. For somereason "$this->processPipes->areOpen()" never returns as false. I've tried running this basic phpunit test script using ci:work and even after 20+ minutes it never finishes.

The unit tests work fine when running phpunit from command line, "vendor/bin/phpunit /srv/www/production/reporting-admin/tests/Unit/ExampleTest.php"

Capture STDERR

Some testing software like Selenium put the test output to STDERR not STDOUT which mean it doesn't get captured by the CI.

Is there some way we can capture that output to so we get the full test output?

No argument --package

This argument does not exist anymore.

php artisan migrate --package=pragmarx/ci

Also looks like the migrations aren't registered in the package, so laravel can't migrate them.

The service provider needs this:

 $this->loadMigrationsFrom(__DIR__ . '/../../migrations');

And then we can migrate with php artisan migrate

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.