Giter Site home page Giter Site logo

furqanfreed / ci Goto Github PK

View Code? Open in Web Editor NEW

This project forked from antonioribeiro/tddd

0.0 2.0 0.0 2.96 MB

A Laravel Continuous Integration Package

License: BSD 3-Clause "New" or "Revised" License

PHP 6.27% CSS 10.43% JavaScript 82.23% Vue 0.94% HTML 0.13%

ci's Introduction

Tests Watcher

A Self-Hosted Continuous Testing Service and a Dashboard.

Dashboard View

  • 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.
  • Ready for PHPUnit, Laravel Dusk, Codeception, phpspec, atoum and more.
  • Highly configurable, watch anything & test everything!

Preview Video

Watch the video

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 ci: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 ci: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

PostgreSQL is needed, MySQL support is on the way

TLDR;

  • Install via Composer
  • Publish the configuration
  • Migrate the database
  • Run php artisan ci:watch & php artisan ci:work &
  • Open http://<domain.dev>/tests-watcher/dashboard

Starte App

You can just use this starter app to create an independent dashboard for your tests.

The long version

Require it with Composer:

composer require pragmarx/ci

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

php artisan migrates

Publish Ci configuration:

On Laravel 4.*

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

'PragmaRX\TestsWatcher\Vendor\Laravel\ServiceProvider',
php artisan config:publish pragmarx/ci

On Laravel 5.*

php artisan vendor:publish --provider="PragmaRX\TestsWatcher\Vendor\Laravel\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 yoru 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.

ci's People

Contributors

antonioribeiro avatar stltt avatar bryant1410 avatar

Watchers

James Cloos avatar Furqan Freed avatar

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.