Tracking: Test generator MVP
@mk-mxp is already working on this.
Since Feb 23, 2024.
Assessment
This issue has not been assessed yet.
Description
Test generator MVP to use after configlet generate for practice exercises:
- #638 Integrate POC test generator into new directory
contrib/generator, so it is not installed in CI - #638 Add a parameter to choose the exercise by slug
- #638 Use local
configletcached problem specification repository as information source - #663 Do not do anything, if exercise has no canonical-data (there are some)
- #663 Use
/exercises/practice/${slug}/.meta/config.json>files>testand check that there is only one entry - #638 Write tests to already created
/exercises/practice/${slug} - #638 Have test class skeleton
- #663 Have test class DocBlock with "PHP track rules"
- #638 Have testdox with description
- #638 Have UUID in DocBlock
- #638 Have all tests marked incomplete
- #663 Have
$input,$expected - #663 Have
$subject = new ${PascalSlug};,$actual = $subject->${property}($input);andassertSame($expected, $actual); - #663 Handle unknown data, so the user can act on it
- #663 Handle nested groups of tests
- Bonus: Add composer script to handle exercise generation from scratch. The problem is handling the
slugrequired for exercise generation. That requires some additional scripting, so that only those commands get the slug that need it and the others do not fail. - #663 adds unit tests, but no integration tests
Bonus: Add golden tests for test generation of some exercises - #663 handles unknow data instead
Bonus: Add JSON validation using theconfigletscheme (if that exists), else at least field existance and character sets - Bonus: Add PHP CodeSniffer (with rules for test-generator only) and more static analysis
Not MVP:
- Producing production ready tests
- scenarios
- Reimplementation
- Ignoring tests marked with
include = falseintests.toml
Open questions:
- Should it be a single command app or do we want to add more commands like
update-exercise(or so)? - Should we use another code producer library like
laminas/laminas-code?
- Dominant language
- PHP
- Stars
- 167
- Forks
- 151
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 8
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- No contributing 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.
More from exercism/php
-
Streamline `contribution` commandsPossibly taken @homersimpsons claimed this 13 days ago. Openx:knowledge/advanced x:module/generator x:status/claimed x:type/coding
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Discussion: Test generator designMay be free again @mk-mxp claimed this 411 days ago, and no pull request is open. Open
Similar issues
-
dependencies enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
novalo-dev/Prestashop-MCP-Server#329 ·
Maintainers usually reply within 1 day
-
sync-en
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
sync-en
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Перевод устарел
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
type: community contribution WCCOM/Marketplace
Difficulty 2/5 Under an hour Newbie friendliness 80/100
woocommerce/woocommerce#71289 ·
Maintainers usually reply within 1 day