|
|
пре 3 дана | |
|---|---|---|
| .. | ||
| README.md | пре 3 дана | |
| basic.spec.ts | пре 3 дана | |
本项目使用 Playwright 进行前端自动化测试,已配置使用指定的 Chrome 浏览器。
D:\Software\chrome-win64\chrome.exenpm install
npm test
npm run test:ui
npm run test:headed
npm run test:debug
npm run test:report
tests/
├── basic.spec.ts # 基础功能测试
└── ... # 其他测试文件
当前测试包含以下内容:
基础页面测试
Cesium 地图测试
性能测试
在 tests/ 目录下创建新的测试文件,使用 .spec.ts 扩展名:
import { test, expect } from '@playwright/test';
test.describe('测试组名称', () => {
test('测试用例名称', async ({ page }) => {
// 测试代码
await page.goto('/');
await expect(page).toHaveTitle(/标题/);
});
});
npm run dev)http://localhost:5173