HBx:3.2.3.20210825
自动化插件:HBuilderX uni-app自动化测试 版本:0.0.3
自动安装 自动化测试环境依赖插件:版本0.0.1
测试 hello-uniapp 测试例子,发现 测试api 加载超时,应该说是完全卡住。无法正常获取变量.
11:02:03.097 [hello-uniapp:mp-weixin] DONE Build complete. Watching for changes...
11:02:38.389 [hello-uniapp:mp-weixin] FAIL pages/tabBar/component/component.test.js (55.808 s)
11:02:38.389 [hello-uniapp:mp-weixin]
11:02:38.395 [hello-uniapp:mp-weixin] pages/tabBar/component/component.nvue
11:02:38.395 [hello-uniapp:mp-weixin] ✕ u-link (1 ms)
11:02:38.400 [hello-uniapp:mp-weixin] ✕ 视图容器
11:02:38.401 [hello-uniapp:mp-weixin] ✕ .uni-panel action
11:02:38.403 [hello-uniapp:mp-weixin]
11:02:38.403 [hello-uniapp:mp-weixin] ● pages/tabBar/component/component.nvue › u-link
11:02:38.406 [hello-uniapp:mp-weixin]
11:02:38.406 [hello-uniapp:mp-weixin] thrown: "Exceeded timeout of 30000 ms for a hook.
11:02:38.410 [hello-uniapp:mp-weixin] Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test."
11:02:38.410 [hello-uniapp:mp-weixin]
11:02:38.412 [hello-uniapp:mp-weixin] 1
11:02:38.414 [hello-uniapp:mp-weixin] describe('pages/tabBar/component/component.nvue', () => {
11:02:38.414 [hello-uniapp:mp-weixin] 2
11:02:38.416 [hello-uniapp:mp-weixin] let page
11:02:38.417 [hello-uniapp:mp-weixin] > 3
11:02:38.419 [hello-uniapp:mp-weixin] beforeAll(async () => {
11:02:38.421 [hello-uniapp:mp-weixin]
11:02:38.422 [hello-uniapp:mp-weixin] ^
11:02:38.423 [hello-uniapp:mp-weixin] 4
11:02:38.425 [hello-uniapp:mp-weixin] // 重新reLaunch至首页,并获取首页page对象(其中 program 是uni-automator自动注入的全局对象)
11:02:38.427 [hello-uniapp:mp-weixin] 5
11:02:38.429 [hello-uniapp:mp-weixin] page = await program.reLaunch('/pages/tabBar/component/component')
11:02:38.431 [hello-uniapp:mp-weixin] 6
11:02:38.432 [hello-uniapp:mp-weixin] await page.waitFor(1000)
11:02:38.433 [hello-uniapp:mp-weixin]
11:02:38.434 [hello-uniapp:mp-weixin] at pages/tabBar/component/component.test.js:3:5
11:02:38.436 [hello-uniapp:mp-weixin] at Object.<anonymous> (pages/tabBar/component/component.test.js:1:57)
11:02:38.436 [hello-uniapp:mp-weixin]
11:02:38.438 [hello-uniapp:mp-weixin] ● pages/tabBar/component/component.nvue › 视图容器
11:02:38.438 [hello-uniapp:mp-weixin]
11:02:38.440 [hello-uniapp:mp-weixin] thrown: "Exceeded timeout of 30000 ms for a hook.
11:02:38.441 [hello-uniapp:mp-weixin] Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test."
11:02:38.443 [hello-uniapp:mp-weixin]
11:02:38.443 [hello-uniapp:mp-weixin] 1
11:02:38.445 [hello-uniapp:mp-weixin] describe('pages/tabBar/component/component.nvue', () => {
11:02:38.445 [hello-uniapp:mp-weixin] 2
11:02:38.446 [hello-uniapp:mp-weixin] let page
11:02:38.446 [hello-uniapp:mp-weixin] > 3
11:02:38.448 [hello-uniapp:mp-weixin] beforeAll(async () => {
11:02:38.448 [hello-uniapp:mp-weixin]
11:02:38.450 [hello-uniapp:mp-weixin] ^
11:02:38.450 [hello-uniapp:mp-weixin] 4
11:02:38.451 [hello-uniapp:mp-weixin] // 重新reLaunch至首页,并获取首页page对象(其中 program 是uni-automator自动注入的全局对象)
11:02:38.451 [hello-uniapp:mp-weixin] 5
11:02:38.453 [hello-uniapp:mp-weixin] page = await program.reLaunch('/pages/tabBar/component/component')
11:02:38.453 [hello-uniapp:mp-weixin] 6
11:02:38.455 [hello-uniapp:mp-weixin] await page.waitFor(1000)
11:02:38.455 [hello-uniapp:mp-weixin]
11:02:38.456 [hello-uniapp:mp-weixin] at pages/tabBar/component/component.test.js:3:5
11:02:38.457 [hello-uniapp:mp-weixin] at Object.<anonymous> (pages/tabBar/component/component.test.js:1:57)
11:02:38.458 [hello-uniapp:mp-weixin]
11:02:38.458 [hello-uniapp:mp-weixin] ● pages/tabBar/component/component.nvue › .uni-panel action
11:02:38.460 [hello-uniapp:mp-weixin]
11:02:38.460 [hello-uniapp:mp-weixin] thrown: "Exceeded timeout of 30000 ms for a hook.
11:02:38.462 [hello-uniapp:mp-weixin] Use jest.setTimeout(newTimeout) to increase the timeout value, if this is a long-running test."
11:02:38.462 [hello-uniapp:mp-weixin]
11:02:38.463 [hello-uniapp:mp-weixin] 1
11:02:38.463 [hello-uniapp:mp-weixin] describe('pages/tabBar/component/component.nvue', () => {
11:02:38.465 [hello-uniapp:mp-weixin] 2
11:02:38.465 [hello-uniapp:mp-weixin] let page
11:02:38.466 [hello-uniapp:mp-weixin] > 3
11:02:38.466 [hello-uniapp:mp-weixin] beforeAll(async () => {
11:02:38.468 [hello-uniapp:mp-weixin]
11:02:38.468 [hello-uniapp:mp-weixin] ^
11:02:38.469 [hello-uniapp:mp-weixin] 4
11:02:38.469 [hello-uniapp:mp-weixin] // 重新reLaunch至首页,并获取首页page对象(其中 program 是uni-automator自动注入的全局对象)
11:02:38.471 [hello-uniapp:mp-weixin] 5
11:02:38.471 [hello-uniapp:mp-weixin] page = await program.reLaunch('/pages/tabBar/component/component')
11:02:38.473 [hello-uniapp:mp-weixin] 6
11:02:38.473 [hello-uniapp:mp-weixin] await page.waitFor(1000)
11:02:38.475 [hello-uniapp:mp-weixin]
11:02:38.475 [hello-uniapp:mp-weixin] at pages/tabBar/component/component.test.js:3:5
11:02:38.476 [hello-uniapp:mp-weixin] at Object.<anonymous> (pages/tabBar/component/component.test.js:1:57)
11:02:38.478 [hello-uniapp:mp-weixin] Test Suites: 1 failed, 1 total
11:02:38.480 [hello-uniapp:mp-weixin] Tests: 3 failed, 3 total
11:02:38.480 [hello-uniapp:mp-weixin] Snapshots: 0 total
11:02:38.482 [hello-uniapp:mp-weixin] Time: 55.892 s, estimated 58 s
11:02:38.483 [hello-uniapp:mp-weixin] Ran all test suites.
11:02:38.485 Test results written to: ../../../Library/Application Support/HBuilder X/hbuilderx-for-uniapp-test/hello-uniapp/mp-weixin/20210923111.json
11:02:38.487 [hello-uniapp:mp-weixin] Force exiting Jest: Have you considered using `--detectOpenHandles` to detect async operations that kept running after all tests finished?
11:02:38.489 [hello-uniapp:mp-weixin]测试运行结束。
g***@163.com
问题解决了吗
2022-06-27 17:30