0
votes

I have a Laravel Project (5.4) with about 8 Dusk Test files. I also have a Selenium Grid running with 8 Chrome Nodes.

I want to send one Laravel Dusk Test file to each Chrome Node. Is there an easy way to do so? or is it even feasible? I have a way now but it is manually typing in each @group tag when running dusk.

i.e. I open multiple powershell windows and type php artisan dusk --group=NAME_OF_TEST into each and press enter.


Ex. php artisan dusk --distribute

This would then start multiple Chromedrivers in DuskTestCase.php and send them, at the same time, to the Selenium Grid's URL.


Thanks again for your time!

1

1 Answers

0
votes

Found a better work around. I grab all the groups that are listed above my Testing functions and paste them into a text file. From there, I can "read" it line by line (with something like a python script) and call dusk on each line.

Example:

php artisan dusk --list-group will return all available "groups" (@group blah) that are written above any test functions. So I can do php artisan dusk --list-group > file.txt and that will paste all the groups into a text file. Then I can open the text file in python and read it line by line.