laravel / ideas

Issues board used for Laravel internals discussions.
938 stars 31 forks source link

Custom artisan commands for parallel testing #2632

Open mbroersen opened 3 years ago

mbroersen commented 3 years ago

Although the parallel testing setup is a great step forward I would like to know if we can add an improvement.

Would it be possible to do the parallel callback before the artisan command? In that way, we can add a custom artisan command what would make the code more flexible.
https://github.com/laravel/framework/blob/a106b939e9bce2ddd7325e1cf2c539d9afa4966a/src/Illuminate/Testing/Concerns/TestDatabases.php#L54-L60

especially when calling this command it would be nice.

php artisan test --parallel

For example, we use a schema to load most of the database setup, this breaks the default php artisan test --parallel

php artisan migrate --schema-path=database/schema/dev-db-schema.dump

Thanks for reading :)

driesvints commented 3 years ago

Heya, thanks for submitting this.

This seems like a feature request or an improvement so I'm moving this to the ideas repository instead. It's best to post these in the ideas repository in the future to get support for your idea. After that you may send a PR to the framework. Please only use the laravel/framework issue tracker to report bugs and issues with the framework.

Thanks!

mbroersen commented 3 years ago

@driesvints Thank you and sorry about that, thanks for clarifying this. :)