It takes a long time to finish the process after testing
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, node.js
- Lĩnh vực
- testing-qa
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện độ trễ với cấu hình CodeceptJS được cung cấp và đầu ra của --verbose, tập trung vào helper Puppeteer và teardown hook. So sánh các lần chạy kết thúc nhanh với những lần vẫn tiếp tục sau “finished teardown hook”; được xem là hoàn tất khi tiến trình kiểm thử thoát ngay lập tức đối với cả các kiểm thử thành công và thất bại.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What are you trying to achieve?
I'm trying to run a test.
What do you get instead?
After running the test, codecept takes a long time to quit the process. It does not matter if the test succeeds or fails. After the test runs are finished, it just stays at OK in ... or finished teardown hook with --verbose. This happens randomly, sometimes finishing fast, but more often lasting up to several minutes.
Provide console output if related. Use
--verbosemode for more details.
✔ OK in 12663ms
--- STARTED "after each" hook: After for "Scenario1" ---
Emitted | provisioning.user.removed ([object Object])
Emitted | provisioning.user.removed ([object Object])
--- ENDED "after each" hook: After for "Scenario1" ---
OK | 1 passed // 16s
started teardown hook
Emitted | provisioning.context.removed ([object Object])
finished teardown hook
✨ Done in 316.64s.
Provide test source code if related
Happens randomly to all tests.
Details
- CodeceptJS version: v3.5.3
- NodeJS Version: v21.6.2
- Operating System: Sonoma 14.2.1
- puppeteer version: 20.8.2
- Configuration file:
(cut sensitive data)
module.exports.config = {
tests: './tests/**/*_test.js',
timeout: 90,
output: './output/',
helpers: {
Puppeteer: {
url: process.env.LAUNCH_URL,
smartWait: 1000,
waitForTimeout: Number(process.env.WAIT_TIMEOUT),
browser: 'chrome',
restart: true,
windowSize: '1280x1024',
uniqueScreenshotNames: true,
timeouts: {
script: 5000
},
chrome: {
executablePath: process.env.CHROME_BIN,
args: [
'--disable-crash-reporter',
'--disable-dev-shm-usage',
'--disable-features=IsolateOrigins',
'--disable-gpu',
'--disable-notifications', // to disable native notification window on Mac OS,
'--disable-print-preview',
'--disable-setuid-sandbox',
'--disable-site-isolation-trials',
'--disable-web-security',
process.env.HEADLESS === 'false' ? '' : `--headless=${process.env.HEADLESS}`,
'--no-first-run',
'--no-sandbox',
'--no-zygote',
`--unsafely-treat-insecure-origin-as-secure=${process.env.LAUNCH_URL}`
].concat((process.env.CHROME_ARGS || '').split(' '))
},
show: process.env.HEADLESS === 'false' || 'new',
waitForNavigation: ['domcontentloaded', 'networkidle0']
},
MockRequestHelper: {
require: '@codeceptjs/mock-request'
}
},
async teardown () {
const { contexts } = global.inject()
for (const ctx of contexts.filter(ctx => ctx.id > 100)) {
if (ctx.id !== 10) await ctx.remove().catch(e => console.error(e.message))
}
},
}
- Ngôn ngữ chính
- JavaScript
- Star
- 4.2k
- Fork
- 756
- Merge trung bình
- 2 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 16
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của codeceptjs/CodeceptJS
-
stale
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
codeceptjs/CodeceptJS#5420 · 1 bình luận ·
-
stale
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
codeceptjs/CodeceptJS#5358 · 1 bình luận ·
-
stale
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
codeceptjs/CodeceptJS#4958 · 10 bình luận · 2 reaction ·
-
stale
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
codeceptjs/CodeceptJS#4778 · 3 bình luận ·
-
stale
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
codeceptjs/CodeceptJS#5618 · 1 bình luận ·
Tất cả issue của codeceptjs/CodeceptJS
Issue tương tự
-
bot:ai-assisted component:compact-js status:untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
midnightntwrk/midnight-sdk#403 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 86/100
DavidAnson/markdownlint-cli2#940 ·
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
githubnext/gh-aw-workshop#3692 ·
-
agent/guide documentation hive/hosted-available-lke648397-260827-5n31
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 90/100