exercism / exercism/php

Tracking: Test generator MVP

Đang mở
#631 2 bình luận 1 reaction 1 người được giao Được @mk-mxp nhận Xem trên GitHub
Ngôn ngữ chính
PHP
Star
167
Fork
150
Merge trung bình
3 ngày 6 giờ
Pull request đã merge (30 ngày)
2

Mô tả

Test generator MVP to use after `configlet generate` for practice exercises:

- [x] #638 Integrate [POC test generator](https://github.com/tomasnorre/exercism-tests-generation) into new directory `contrib/generator`, so it is not installed in CI
- [x] #638 Add a parameter to choose the exercise by slug
- [x] #638 Use local `configlet` cached 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>test` and check that there is only one entry
- [x] #638 Write tests to already created `/exercises/practice/${slug}`
- [x] #638 Have test class skeleton
- [ ] #663 Have test class DocBlock with "PHP track rules"
- [x] #638 Have testdox with description
- [x] #638 Have UUID in DocBlock
- [x] #638 Have all tests marked incomplete
- [ ] #663 Have `$input`, `$expected`
- [ ] #663 Have `$subject = new ${PascalSlug};`, `$actual = $subject->${property}($input);` and `assertSame($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 `slug` required 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 the `configlet` scheme (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](https://github.com/exercism/problem-specifications?tab=readme-ov-file#scenarios)
- [Reimplementation](https://github.com/exercism/problem-specifications?tab=readme-ov-file#changing-tests)
- Ignoring tests marked with `include = false` in `tests.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`](https://docs.laminas.dev/laminas-code/generator/intro/)?

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.