parse-community / parse-community/parse-server
Implement Parallel Unit testing
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 21.4k
- Forks
- 4.8k
- Avg merge
- 7h 45m
- Merged PRs (30d)
- 11
Description
New Feature / Enhancement Checklist
- Report security issues confidentially.
- Any contribution is under this license.
- Before posting search existing issues.
Current Limitation
Our current testing approach is more or less e2e testing. A full server and database is built in memory.
This makes test comprehensive, but slow. For a simple test like asserting that cloud functions register, there's no reason why this needs to run across all the different environments.
Feature / Enhancement Description
Implement a seperate folder of unit tests. This could still utilise Jasmine, but the focus being on mocking all external dependencies to the test. This means that the unit tests can be ran in parallel, reducing our build times. Will also make it easier to debug - theoretically, one line that breaks tests should only break one unit test.
Example Use Case
Alternatives / Workarounds
3rd Party References
Would also suggest testing standards uplifts:
- unit testing folder structure should reflect the source code
- each unit tests should be focused on testing one thing and one thing only
- verbose, over complicated tests should be replaced by simpler, easier to understand tests.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the current end-to-end testing approach and how Jasmine is used. Define a separate unit-test folder with mocked external dependencies, parallel execution, source-mirroring structure, and focused tests; done means the unit suite runs independently and reduces build time without losing coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100