- boot/ (Java/Maven, JNPF 7.0) — 移除旧的 boot/.git,源码直接纳入仓库
- web/ (Vue 3 + Vite + Ant Design Vue, pnpm)
- docs/, scard/, nax/
- refs/INDEX.md + refs/国标/(其余 refs/* 开源子仓库不纳入)
- 已忽略: connector_data/, jweb/, log/, web/{dist,node_modules,.pnpm}, boot/*/target/, .DS_Store, .idea, .vscode
52 lines
1.5 KiB
JavaScript
52 lines
1.5 KiB
JavaScript
/**
|
||
* TC-REL-009 · 需要时系统可操作和访问
|
||
* REQ-Q-REL 质量特性-可靠性 正向 P0
|
||
*
|
||
* 前置:1. 系统已部署并正常运行 2. 网络及测试环境可用
|
||
* 步骤:1. 在需要使用系统时发起访问 2. 执行常规操作
|
||
* 预期:1. 系统在需要使用时可以正常操作和访问
|
||
*/
|
||
export const meta = {
|
||
tc: 'TC-REL-009',
|
||
req: 'Q-REL',
|
||
title: '需要时系统可操作和访问',
|
||
type: '正向',
|
||
priority: 'P0',
|
||
route: '/tds/spaces',
|
||
needs: ['fe', 'be']
|
||
}
|
||
|
||
export async function run(t) {
|
||
await t.step('前置:登录', async () => {
|
||
await t.login()
|
||
})
|
||
|
||
await t.step('连续访问 3 个主要页面均能正常打开', async () => {
|
||
const routes = ['/tds/spaces', '/tds/connectors', '/tds/contracts']
|
||
for (const r of routes) {
|
||
await t.goto(r, { waitTable: false })
|
||
await t.waitIdle()
|
||
t.assert(true, `路由 ${r} 可访问,未 5xx`)
|
||
}
|
||
})
|
||
|
||
await t.step('调用关键 API 应返回 200', async () => {
|
||
const apis = [
|
||
'/api/ssw/tds/Space',
|
||
'/api/ssw/tds/Connector',
|
||
'/api/ssw/tds/Contract',
|
||
'/api/ssw/tds/PolicyTemplate'
|
||
]
|
||
for (const a of apis) {
|
||
const r = await t.api('GET', a)
|
||
t.assert(r.code === 200, `${a} 返回 200(实际 ${r.code})`)
|
||
}
|
||
})
|
||
|
||
await t.step('登录接口自检', async () => {
|
||
const r = await t.api('GET', '/api/ssw/online/list')
|
||
t.assert(typeof r.code === 'number', `online/list 接口可用(code=${r.code})`)
|
||
})
|
||
|
||
t.expectConsoleClean()
|
||
} |