|
2 | 2 |
|
3 | 3 | Welcome to the agent-driven GitHub Copilot training! This document is designed for developers who want to explore the cutting edge of AI-assisted software development using GitHub Copilot as an autonomous development agent.
|
4 | 4 |
|
5 |
| -**⚠️ Important:** This mode requires a fundamentally different mindset. You are not making wishes—you are providing strategic direction, maintaining oversight, and ensuring quality at every step. The agent executes, but you remain the architect and decision-maker. |
| 5 | +**⚠️ Important:** This mode requires a fundamentally different mindset. You are not making wishes—you are providing strategic direction, maintaining oversight, and ensuring quality at every step. The agent executes, but you remain the architect and decis### If Playwright be new to ye: |
| 6 | + |
| 7 | +**Agent-Guided Learning and Implementation:** |
| 8 | +``` |
| 9 | +@workspace I'm new to Playwright and want to implement E2E testing for this dashboard. Please: |
| 10 | +
|
| 11 | +1. Explain what Playwright is and why it's valuable for this type of application |
| 12 | +2. Analyze our current project structure to recommend the best E2E testing approach |
| 13 | +3. Guide me through setting up Playwright with our FastAPI + HTML dashboard |
| 14 | +4. Create a comprehensive E2E test that validates the full user workflow |
| 15 | +5. Include instructions for running tests and integrating with our development process |
| 16 | +
|
| 17 | +Consider both Python and Node.js options and recommend the best fit for our stack. |
| 18 | +``` |
| 19 | + |
| 20 | +**Key Agent-Driven Test Scenarios:** |
| 21 | +- Dashboard loads and initializes correctly |
| 22 | +- API integration and data flow validation |
| 23 | +- User interface interactions (dropdowns, buttons, forms) |
| 24 | +- Chart rendering and data visualization validation |
| 25 | +- Error handling and edge case coverage |
| 26 | +- Cross-browser compatibility testing |
| 27 | + |
| 28 | +**Integration and CI/CD:** |
| 29 | +- Use `#openSimpleBrowser` to validate user experience during development |
| 30 | +- Have the agent create CI pipeline integration |
| 31 | +- Generate test reports and debugging utilities> 🏴☠️ If ye be into testing, skip to the end for an optional Playwright E2E exercise! |
6 | 32 |
|
7 | 33 | ## Prerequisites: Setting Up Agent-Driven Development
|
8 | 34 |
|
@@ -532,18 +558,40 @@ Validate security implementations with security testing tools.
|
532 | 558 |
|
533 | 559 | ---
|
534 | 560 |
|
535 |
| -## Critical Success Factors for Agent-Driven Development |
| 561 | +## Optional Exercise: End-to-End Testing with Playwright 🏴☠️ |
| 562 | + |
| 563 | +Yarr! If ye want to test the whole dashboard like a true pirate, Playwright be the tool for E2E adventures. |
| 564 | + |
| 565 | +### If ye already know Playwright: |
| 566 | + |
| 567 | +**Agent-Driven Test Development:** |
| 568 | +- Set up your E2E test structure (`tests/e2e/`, `e2e/`, or wherever ye prefer) |
| 569 | +- Install Playwright: `pip install playwright` (Python) or `npm install playwright` (Node.js) |
| 570 | +- Use `#openSimpleBrowser` to preview the dashboard during development |
| 571 | + |
| 572 | +**Agent Collaboration for E2E Tests:** |
| 573 | +``` |
| 574 | +@workspace I want to create comprehensive E2E tests for this dashboard application using Playwright. Please: |
| 575 | +
|
| 576 | +1. Analyze the existing HTML structure and API endpoints |
| 577 | +2. Design a test strategy that covers the full user workflow |
| 578 | +3. Generate Playwright tests for dashboard loading, user interactions, and chart validation |
| 579 | +4. Include proper error handling and edge case testing |
| 580 | +
|
| 581 | +Use the existing project structure and maintain consistency with our testing patterns. |
| 582 | +``` |
536 | 583 |
|
537 |
| -**Human Responsibilities:** |
538 |
| -1. **Strategic Oversight:** Always approve architectural decisions before implementation |
539 |
| -2. **Quality Gates:** Validate each phase before proceeding to the next |
540 |
| -3. **Risk Management:** Understand the implications of each change |
541 |
| -4. **Knowledge Transfer:** Ensure you understand what the agent has implemented |
| 584 | +### If Playwright be new to ye: |
| 585 | +- Ask Copilot: `What is Playwright and how can I use it for E2E testing in this project?` |
| 586 | +- Use `/explain` and `/setupTests` to: |
| 587 | + 1. Learn what Playwright does and why it’s useful |
| 588 | + 2. Scaffold a basic E2E test (dashboard loads, API returns data, chart appears) |
| 589 | + 3. Get Copilot to write a test that clicks, fills, or checks chart output |
| 590 | + 4. Use `#openSimpleBrowser` to see the app in action |
| 591 | +- Try both Python and Node.js Playwright flavors—Copilot can help with either! |
542 | 592 |
|
543 |
| -**Agent Responsibilities:** |
544 |
| -1. **Transparency:** Explain all decisions and implementations clearly |
545 |
| -2. **Validation:** Confirm understanding before proceeding with complex changes |
546 |
| -3. **Documentation:** Maintain comprehensive documentation of all changes |
547 |
| -4. **Testing:** Ensure comprehensive testing at every step |
| 593 | +**Bonus:** |
| 594 | +- Add E2E tests to your CI pipeline for true production-readiness |
| 595 | +- Use Copilot to generate test reports and screenshots |
548 | 596 |
|
549 |
| -**Remember:** The agent is your implementation partner, not your replacement. You remain accountable for all architectural decisions, code quality, and system behavior. Use this mode to explore the possibilities of AI-assisted development while maintaining professional responsibility for the outcomes. |
| 597 | +*For more, see [Playwright for Python](https://playwright.dev/python/) or [Playwright for JS](https://playwright.dev/)* |
0 commit comments