Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel testing support #369

Merged
merged 43 commits into from
Aug 13, 2021
Merged

Parallel testing support #369

merged 43 commits into from
Aug 13, 2021

Conversation

lukeraymonddowning
Copy link
Member

Q A
Bug fix? no
New feature? yes

Hi all,

Here it is! A very early draft of parallel testing in Pest. This uses brianium/paratest as the base runner.

I'll be adding more detail here as I continue work on this, but wanted to get it out in the open for suggestions and changes.

Kind Regards,
Luke

@lukeraymonddowning
Copy link
Member Author

So, there is one breaking test in the repo. That test isn't related to parallel and the bug can be reproduced without it:

bin/pest tests/PHPUnit/CustomTestCaseInSubFolders/SubFolder/SubFolder/UsesPerSubDirectory.php

will reproduce outside of this branch.

@lukeraymonddowning
Copy link
Member Author

lukeraymonddowning commented Aug 6, 2021

Todos (in no particular order):

  • PR some changes to Paratest itself which would negate having to override entire classes for 1 or 2 lines
  • Build a custom printer that supports the additional Paratest functionality but outputs Pest style
  • Allow the --coverage flag, which would run paratest's coverage functionality then output Pest style
  • Test edge cases and other operating systems (Windows, Linux)

@owenvoke
Copy link
Member

owenvoke commented Aug 6, 2021

So, there is one breaking test in the repo. That test isn't related to parallel and the bug can be reproduced without it:

bin/pest tests/PHPUnit/CustomTestCaseInSubFolders/SubFolder/SubFolder/UsesPerSubDirectory.php

will reproduce outside of this branch.

I wonder if that's because the required uses() calls in Pest.php aren't being called or something for a single test run? 🤔

@lukeraymonddowning
Copy link
Member Author

@owenvoke its actually the Pest file in tests/PHPUnit/Pest.php that isn't being called.

@owenvoke
Copy link
Member

owenvoke commented Aug 6, 2021

@lukeraymonddowning, sorry yes. I corrected my comment earlier. 👍🏻 Forgot where the nested file was.

@nuernbergerA
Copy link
Contributor

  • Allow the --coverage flag, which would run paratest's coverage functionality then output Pest style

src/Actions/InteractsWithPlugins.php Outdated Show resolved Hide resolved
src/Actions/InteractsWithPlugins.php Outdated Show resolved Hide resolved
composer.json Outdated Show resolved Hide resolved
bin/pest Outdated Show resolved Hide resolved
bin/pest Outdated Show resolved Hide resolved
src/Functions.php Outdated Show resolved Hide resolved
src/Functions.php Outdated Show resolved Hide resolved
src/Repositories/TestRepository.php Outdated Show resolved Hide resolved
src/TestSuite.php Outdated Show resolved Hide resolved
tests/Visual/Success.php Outdated Show resolved Hide resolved
@lukeraymonddowning lukeraymonddowning marked this pull request as ready for review August 13, 2021 10:31
@nunomaduro nunomaduro merged commit 01d672d into master Aug 13, 2021
@nunomaduro nunomaduro deleted the parallel branch August 13, 2021 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants