Megkésve, de törve nem, én is elkezdtem egyre több dologra használni az AI-t, ahogy az a korábbi bejegyzéseimből is látszik. Reggel gondoltam egy merészet, és megkértem a Copilot-ot, hogy kezdjünk el csinálni egy Playwright, TypeScript projectet, mindezt VSCode-ban, és csak CLI-jal. Meg kell mondjam, egész jól sikerültek az alapok, és időben is lényegesen hamarabb készült el, mintsem, ha kézzel kezdem el.
Felbuzdulva ezen, megkértem, hogy integrálja bele az Allure riport készítést, ami elsőre nem volt teljes siker, mert nem tartalmazta a korábbi futásokat a kérésem ellenére, de ez is hamar javítva lett.
Folytattam azzal, hogy egy ingyenes és publikus API hívásra írattam vele 3 tesztet, majd pedig kértem, hogy legyen 2 negatív is, amit ő elsőre úgy értett, hogy átírta a meglévőket. Ezt is hamar javítottuk.
Kértem, hogy amit csináltunk, azt tegye bele egy Word fájlba, illetve még készítettem vele egy readme.md fájlt is. Szerintem egész jól sikerült, mindezt relatív kevés idő alatt, szóval biztosan fogom még folytatni vele a munkát.
Íme a teljes lista:
Project path: D:\Repositories\ai-playwright
Earliest retrievable project record: approximately 08:55 local time (06:55 UTC)
08:53 ? Initial workspace session
- Opened the working area under D:\Repositories.
08:55 ? Created the Playwright project
- Created D:\Repositories\ai-playwright as a TypeScript Playwright project.
- Configured Chromium, added example tests and a GitHub Actions workflow.
- Installed dependencies and Chromium.
- Verified that the two starter tests passed with npx playwright test.
09:01 ? Changed reporting to Allure
- Switched the default Playwright reporter to Allure.
- Added Allure report generation and execution-history persistence.
- Updated package.json, playwright.config.ts, .github/workflows/playwright.yml, .gitignore, and scripts/allure-history.js.
- Configured CI to restore and save Allure history.
- Verified the initial tests and report generation.
09:07?09:23 ? Opened and fixed Allure history
- Generated allure-report and started it with npm run allure:open.
- Investigated why previous executions were not visible.
- Fixed the issue by clearing old result files before each run while preserving history.
- Verified that the report showed three executions per test instead of treating earlier executions as retries.
09:26 ? Added Open-Meteo API tests
- Added tests in tests/open-meteo-api.spec.ts.
- Covered a valid forecast request, invalid latitude, and invalid longitude.
- All three tests passed.
09:28?09:34 ? Regenerated the report and improved assertions
- Regenerated Allure with the API tests.
- Added descriptive failure messages to the expect assertions.
09:49?09:51 ? Added more negative API scenarios
- Added a request missing required longitude.
- Added a request with an unsupported current-weather variable.
- The API test file reached five tests total.
09:52 ? Verified all tests
- Ran the full suite.
- All seven tests passed.
- Regenerated the Allure report with all tests.
09:55?10:03 ? Fixed Allure generation in GitHub Actions
- Investigated why the report was not generated in CI.
- Updated the workflow to restore history, run Playwright, always generate the report, and upload the report artifact when possible.
- Local verification passed.
10:07?10:12 ? Discussed opening reports from CI
- Clarified that GitHub Actions cannot directly open a browser on the runner.
- Discussed GitHub Pages as the way to automatically host and view the report.
- Explained how to open a downloaded report locally with npx allure open.
10:20 ? Opened the Allure report again
10:31 ? Added Playwright Codegen
- Added the codegen script to package.json.
- Usage: npm run codegen — https://example.com.
- Discussed saving recorded tests with –output tests/recorded.spec.ts.
10:34?10:48 ? Reviewed the project and exported coverage
- Explained that the project is a Playwright test project, not the application under test.
- Identified that baseURL and webServer are not configured.
- Created D:\Repositories\ai-playwright\test-coverage.xlsx.
- The workbook contains all seven test cases, behaviors, assertions, Allure statuses, and a test-scope coverage summary.
Note: The earliest project-creation record available is the summarized 08:55 local-time session; the initial setup session does not contain a complete message-by-message transcript.
10:56 – Added project README documentation
- Created README.md in the project root.
- Documented prerequisites and installation from scratch.
- Documented browser and API test execution.
- Documented Allure report generation, opening, and execution-history handling.
- Documented Playwright Codegen usage.
- Documented project configuration, structure, GitHub Actions CI behavior, and troubleshooting.

Vélemény, hozzászólás?
Hozzászólás küldéséhez be kell jelentkezni.