🦞 4minAI.com
1 / 13
Day 19 of 28 Β· Vibe Coding Challenge

Testing Without Writing Tests

"But does it actually work?" That's the question testing answers. And no, clicking around randomly doesn't count. Today you'll learn to test your code systematically β€” and yes, AI writes the tests for you.

Why testing matters for vibe coders

When you're building with AI, code changes fast. A single prompt can rewrite an entire component. How do you know the new version didn't break something?

Testing catches bugs before users do. It catches regressions β€” features that worked yesterday but broke because of today's changes. It gives you confidence that your app does what it's supposed to.

Knowledge Check
Why is testing especially important when vibe coding?
A
AI can change large amounts of code at once β€” tests verify that existing features still work after changes
B
You can't deploy without tests
C
Testing is required by coding law
D
AI-generated code is always buggy
Vibe coding means rapid changes. A single prompt can touch multiple files. Without tests, you'd need to manually check every feature after every change. Tests automate that verification β€” they catch regressions instantly.

Let AI write your tests

Here's the beautiful part: you don't write tests. You describe what should work, and AI creates the tests for you.

πŸ€–
Cursor AI
online
Write tests for my signup form. It should test: - Email field rejects invalid emails - Password must be at least 8 characters - Form submits successfully with valid data - Error message shows for duplicate email - All fields are required
Tests created in `__tests__/SignupForm.test.tsx` βœ“ βœ… 5 test cases: 1. "rejects invalid email format" β€” enters "notanemail", expects error 2. "requires password of 8+ characters" β€” enters "short", expects error 3. "submits with valid data" β€” fills all fields correctly, expects success 4. "shows error for duplicate email" β€” simulates existing user, expects "Email already registered" 5. "shows errors for empty required fields" β€” submits empty form, expects 3 validation errors Run with: `npm test` All 5 tests passing βœ“
↻ Replay conversation
Knowledge Check
Who wrote the test code in that example?
A
Both the user and AI wrote tests together
B
The AI wrote the tests β€” the user only described what should be tested
C
The tests were downloaded from a testing library
D
The user wrote all the tests manually
You described the behaviors to test in plain English. The AI translated those into actual test code with proper assertions, mock data, and test structure. You think about what to test, AI handles how to test it.

The testing pyramid for vibe coders

Not all tests are equal. Here's what to focus on:

Manual testing (always do this) β€” Click through your app after every change. Test the happy path (everything works) and edge cases (empty forms, long text, weird inputs). This catches obvious issues.

AI-written tests (do this for important features) β€” Ask AI to write tests for critical functionality: authentication, payments, data processing. These run automatically and catch regressions.

Browser testing (do this before deploying) β€” Check your app in Chrome, Safari, and on mobile. AI tools usually generate cross-browser compatible code, but surprises happen.

πŸ€–
Cursor AI
online
What are the most important things to test in my e-commerce app? I can't test everything β€” what gives me the most coverage?
Focus on the money path β€” the features where bugs cost you customers: πŸ”΄ **Critical (test these first):** 1. User can sign up and log in 2. Products display with correct prices 3. Cart calculates total correctly 4. Checkout completes and creates an order 🟑 **Important (test next):** 5. Search returns relevant results 6. Filters work correctly 7. User can update their profile 🟒 **Nice to have:** 8. Animations work smoothly 9. Mobile layout looks correct 10. Edge cases (empty cart, out-of-stock items) Want me to generate tests for the critical path first?
↻ Replay conversation
Knowledge Check
What should you test first in your app?
A
The critical path β€” the features where bugs would cost you users or money
B
The code that's hardest to write
C
Every possible user interaction
D
CSS animations and hover effects
Test what matters most first. For an e-commerce app, the checkout flow is critical β€” a bug there loses money. Pretty animations can wait. Focus on the features that, if broken, would cause real damage.

Manual testing like a pro

Even with automated tests, you need to manually test your app. Here's a systematic approach:

The happy path β€” Go through the app as a normal user would. Sign up, use the features, complete the main workflow. Does everything work as expected?

The edge cases β€” Try the weird stuff. Submit an empty form. Enter a 1000-character name. Resize the browser really small. Use the back button. Refresh in the middle of a process.

The new user test β€” Pretend you've never seen the app. Is it obvious what to do? Can you figure out the navigation? Are there any confusing dead ends?

πŸ€–
Cursor AI
online
Give me a manual testing checklist for my task management app. I want to make sure everything works before I share it.
Manual testing checklist: **Authentication:** ☐ Sign up with new account ☐ Log in with correct credentials ☐ Try wrong password β€” error message shows? ☐ Log out and back in **Tasks:** ☐ Create a new task ☐ Edit an existing task ☐ Delete a task ☐ Mark task as complete ☐ Create task with empty title β€” validation works? **UI/UX:** ☐ Check on mobile (or resize browser) ☐ Test dark mode toggle ☐ Check loading states (refresh the page) ☐ Navigate with browser back/forward buttons Go through each one. Note anything that feels broken or weird.
↻ Replay conversation
Final Check
What's the vibe coder's approach to testing?
A
Write all tests manually from scratch
B
Describe what should be tested in plain English, let AI write the test code, and manually verify the critical path
C
Only test after getting user complaints
D
Skip testing β€” AI code is always correct
The best approach combines AI-generated tests (for automated coverage) with manual testing (for real-world verification). You describe what to test, AI writes the code, and you verify the most important flows yourself. Complete coverage with minimal effort.
βœ…
Day 19 Complete
"Testing isn't about finding bugs β€” it's about proving your app works. Let AI write the proof."
Tomorrow β€” Day 20
Performance Optimization
Your app works, but is it fast? Tomorrow you'll learn to find and fix the things that make your app feel slow.
πŸ”₯1
1 day streak!