@@ -273,17 +273,61 @@ template-name/
273
273
274
274
### Testing
275
275
276
- 1 . Required Tests:
277
- - Basic CRUD operations
278
- - Authentication/Authorization
276
+ FastAPI-fastkit includes ** automated template testing** that provides comprehensive validation:
277
+
278
+ #### ✅ Automatic Template Testing
279
+
280
+ ** Zero Configuration Required:**
281
+ - 🚀 New templates are ** automatically discovered** and tested
282
+ - ⚡ No manual test file creation needed
283
+ - 🛡️ Consistent quality standards applied
284
+
285
+ ** Comprehensive Test Coverage:**
286
+ - ✅ ** Project Creation** : Template copying and metadata injection
287
+ - ✅ ** Package Manager Support** : UV, PDM, Poetry, and PIP compatibility
288
+ - ✅ ** Virtual Environment** : Creation and dependency installation
289
+ - ✅ ** Project Structure** : File and directory validation
290
+ - ✅ ** FastAPI Integration** : Project identification and functionality
291
+
292
+ ** Test Execution:**
293
+ ``` bash
294
+ # Test all templates automatically
295
+ $ pytest tests/test_templates/test_all_templates.py -v
296
+
297
+ # Test your specific template
298
+ $ pytest tests/test_templates/test_all_templates.py::TestAllTemplates::test_template_creation[your-template-name] -v
299
+
300
+ # Test with PDM environment
301
+ $ pdm run pytest tests/test_templates/test_all_templates.py -v
302
+ ```
303
+
304
+ #### ✅ Template-Specific Testing
305
+
306
+ While basic functionality is automatically tested, you should include template-specific tests:
307
+
308
+ 1 . ** Required Template Tests:**
309
+ - Basic CRUD operations (if applicable)
310
+ - Authentication/Authorization (if implemented)
279
311
- Error handling
280
312
- API endpoints
281
313
- Configuration validation
282
314
283
- 2 . Test Coverage:
284
- - Minimum 80% code coverage
285
- - Include integration tests
286
- - API testing examples
315
+ 2 . ** Test Coverage Goals:**
316
+ - Minimum 80% code coverage for template-specific logic
317
+ - Include integration tests for external services
318
+ - API testing examples in template documentation
319
+
320
+ #### ✅ Package Manager Testing
321
+
322
+ Test your template with all supported package managers:
323
+
324
+ ``` bash
325
+ # Test with different package managers
326
+ $ fastkit startdemo your-template-name --package-manager uv
327
+ $ fastkit startdemo your-template-name --package-manager pdm
328
+ $ fastkit startdemo your-template-name --package-manager poetry
329
+ $ fastkit startdemo your-template-name --package-manager pip
330
+ ```
287
331
288
332
### Submission Process
289
333
@@ -313,10 +357,12 @@ template-name/
313
357
- [ ] All files use .py-tpl extension
314
358
- [ ] FastAPI-fastkit dependency included
315
359
- [ ] Security requirements met
316
- - [ ] Tests implemented and passing
317
360
- [ ] Documentation complete
318
361
- [ ] inspector.py validation passes
319
362
- [ ] All make dev-check tests pass
363
+ - [ ] ** Automatic template tests pass** (new templates tested automatically)
364
+ - [ ] ** Package manager compatibility verified** (tested with UV, PDM, Poetry, PIP)
365
+ - [ ] ** Template-specific functionality tested** (if applicable)
320
366
321
367
4 . ** Pull Request:**
322
368
- Provide detailed description
0 commit comments