Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Test timeout doesn't work with BDD scenarios

オープン
#3,055 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript, node.js, playwright
領域
testing

調査の方向性

示されているCodeceptJS設定、Playwrightヘルパー、BDDシナリオで問題を再現し、その後、グローバルタイムアウトとBeforeフックのタイムアウトがどのように適用されるかを追跡してください。両方のアプローチでの動作を確認し、シナリオが設定された制限で停止することを示すリグレッションテストを追加してください。

索引モデルが issue の本文から書いたものです。

説明

bug critical
What are you trying to achieve?

I would like to define a test timeout in order to prevent being stuck during the execution - native applications & websites can be down / blocked during the execution and I want to skip a test when it reaches a limit.

So I tried (without success) to use the 2 following features available in codeceptjs:

  1. Timeout setting in the configuration file: https://codecept.io/configuration/#configuration
exports.config = {
...
  timeout: 10000,
...
}
  1. Dynamic timeout override by using advanced options: https://codecept.io/advanced/#test-options
Before((test) => {
  test.timeout(10000);
});
What do you get instead?
  • Approach 1 - Timeout setting: has no effect at all
  • Approach 2 - Dynamic timeout override: test execution continues until the end and fails with timeout message if execution exceeds the threshold (see screenshot)

Example: timeout set to 10s, execution ran in 36s before displaying the error message

image

Details
  • CodeceptJS version: 3.1.2
  • NodeJS Version: 16.4.2
  • Operating System: Mac OS
  • Configuration file:
exports.config = {
  output: './output',
  timeout: 10000,
  helpers: {
    Playwright: {
      url: 'http://localhost',
      show: true,
      browser: 'chromium',
      waitForNavigation: 'domcontentloaded'
    },
    ChaiWrapper: {
      require: "codeceptjs-chai"
    }
  },
  include: {},
  mocha: {},
  bootstrap: null,
  teardown: null,
  hooks: [],
  gherkin: {
    features: './features/*.feature',
    steps: './step_definitions/*.js'
  },
  plugins: {
    screenshotOnFail: {
      enabled: true
    },
    pauseOnFail: {},
    retryFailedStep: {
      enabled: true
    },
    tryTo: {
      enabled: true
    }
  },
  tests: './*_test.js',
  name: 'cjs-training'
}
主要言語
JavaScript
スター
4.2k
フォーク
756
平均マージ
2日 9時間
マージ済み PR(30日)
16

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

codeceptjs/CodeceptJS のほかの issue

codeceptjs/CodeceptJS の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。