# ๐Ÿงช Quick Test Guide ## โœ… Created 7 Test Payloads for Your TDS-PROJ-1 Application ### ๐Ÿ“‹ Test Scenarios | # | Test File | Task | Features Tested | Has Attachments | | --- | -------------------------------- | -------------------- | ---------------------------------- | --------------- | | 1 | `payload-sales-summary.json` | Sales Calculator | CSV loading, fetch(), calculations | โœ… sales.csv | | 2 | `payload-calculator.json` | Calculator App | UI buttons, interactive operations | โŒ | | 3 | `payload-todo-list.json` | To-Do List | Forms, Bootstrap, dynamic lists | โŒ | | 4 | `payload-weather-dashboard.json` | Weather Dashboard | Search, display, Bootstrap | โŒ | | 5 | `payload-json-viewer.json` | JSON Viewer | JSON loading, tree view, search | โœ… data.json | | 6 | `payload-github-user.json` | GitHub Lookup | External API, form, date format | โŒ | | 7 | `payload-markdown-enhanced.json` | Markdown Editor (R2) | Tabs, word count, round 2 | โœ… input.md | --- ## ๐Ÿš€ Quick Start ### 1๏ธโƒฃ Start Your Server ```bash cd /home/niloy/tds-proj-1-main source venv/bin/activate python -m uvicorn main:app --host 0.0.0.0 --port 8000 ``` ### 2๏ธโƒฃ Run All Tests (New Terminal) ```bash cd /home/niloy/tds-proj-1-main ./run_tests.sh ``` ### 3๏ธโƒฃ Or Test One Payload ```bash curl -X POST http://127.0.0.1:8000/build \ -H "Content-Type: application/json" \ -d @test_payloads/payload-calculator.json ``` --- ## ๐Ÿ“Š Expected Output ### โœ… Success ``` Status: 200 { "message": "Request received. Buildling Application..." } ``` Then check your server logs for: - โœ… Querying aipipe LLM... - โœ… Creating repository: {task-name} - โœ… Repository created at {url} - โœ… Pushing files to repository... - โœ… Github pages enabled - โœ… Posted to evaluation URL --- ## ๐Ÿ” What Gets Created Each test creates: 1. **GitHub Repository** - Named after the `task` field 2. **README.md** - Professional documentation 3. **LICENSE** - MIT License 4. **index.html** - Complete working app 5. **Attachments** - Any files from the payload 6. **GitHub Pages** - Live at `https://username.github.io/task-name/` --- ## ๐Ÿ’ก Pro Tips โœ… **Before Testing:** - Ensure `.env` has `API_SECRET=11032003` - Check `GITHUB_TOKEN` is valid - Verify `AI_PIPE_API_KEY` is set โœ… **While Testing:** - Watch server terminal for real-time logs - Wait ~30-60 seconds per request - GitHub Pages takes 1-2 minutes to go live โœ… **After Testing:** - Check GitHub for new repositories - Visit GitHub Pages URLs to see live apps - Review README.md in each repo - Clean up test repos if needed --- ## ๐ŸŽฏ All Commands ```bash # Test all payloads ./run_tests.sh # Test specific payload curl -X POST http://127.0.0.1:8000/build \ -H "Content-Type: application/json" \ -d @test_payloads/payload-NAME.json # List all test files ls -l test_payloads/*.json # View a payload cat test_payloads/payload-calculator.json | jq '.' # Check server health curl http://127.0.0.1:8000/ # View API docs open http://127.0.0.1:8000/docs ``` --- Happy Testing! ๐Ÿš€