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

Use paratest for parallel test execution #5372

Open
wants to merge 3 commits into
base: devel
Choose a base branch
from

Conversation

manuelmeister
Copy link
Member

@manuelmeister manuelmeister commented Jun 16, 2024

To speed up our api tests, I've parallelized them with paratest. It works quite good. Has to be tested, if it actually tests, as the duration seems fishy

@manuelmeister manuelmeister added the WIP Work in progress label Jun 16, 2024
@manuelmeister manuelmeister marked this pull request as ready for review June 16, 2024 15:36
@manuelmeister manuelmeister removed the WIP Work in progress label Jun 16, 2024
@manuelmeister manuelmeister requested review from carlobeltrame, BacLuc and usu and removed request for BacLuc June 16, 2024 15:42
@BacLuc BacLuc added the api-performance-test! Run API Performance test label Jun 16, 2024
Copy link
Member

@usu usu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 🚀

Can I also use this to run tests in parallel on my local machine?

@manuelmeister
Copy link
Member Author

@usu Yes, but you would need to setup the databases

@manuelmeister
Copy link
Member Author

I realized that from 39410e3 (update phpunit from v10.5.20 to v10.5.21, main feature: sebastianbergmann/phpunit#5861) the test only takes 3m 19s, instead of 14m 34s.
With my PR it is again reduced to 1m 22s.

Copy link
Contributor

@BacLuc BacLuc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert the unnecessary change and the change in dev/doctrine.yaml, and i am happy.

Tested it locally, and it ran out of memory when it tried to merge the coverage.
But most of us will anyway not run the tests locally anymore, it takes too much time.

But running the tests locally without paratest still works

POSTGRES_PASSWORD: 'ecamp3'
POSTGRES_USER: 'ecamp3'
POSTGRES_DB: 'ecamp3test'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please revert this unnecessary change.
Else future devs might think that this change is needed.

doctrine:
dbal:
# "TEST_TOKEN" is typically set by ParaTest
dbname_suffix: 'dev%env(default::TEST_TOKEN)%'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think you need the test token for dev

@BacLuc
Copy link
Contributor

BacLuc commented Jul 7, 2024

It seems to be stable, tested it 20 times:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api-performance-test! Run API Performance test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants