`run-multiple` command picks 0 feature files when `-c` CLI option is specified

未關閉 適合新手
#5,358 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
76/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
冷清
技術堆疊
javascript, node.js
領域
cli, testing-qa

研究方向

從 lib/command/run-multiple.js 中處理自訂設定路徑的部分開始,接著追蹤產生的路徑如何到達 lib/codecept.js 和 globSync。重現 issue 中的兩個 run-multiple 命令,並確認明確傳入 -c codecept.conf.js 後能夠找到並執行已設定的 feature 檔案。

由索引模型根據 Issue 內容生成。

描述

stale

Let's assume we have codecept.conf.js config file in the project root with the following config:

exports.config = {
    // other options go here
    multiple: {
        basic: {
            browsers: ['chromium', 'firefox'],
        },
    },
    gherkin: {
        features: './features/*.feature',
        steps: ['./step_definitions/steps.js'],
    }
};

When running tests with:

codeceptjs run-multiple --all

all specified feature files are executed as expected.

However, when the -c CLI option is explicitly provided:

codeceptjs run-multiple --all -c codecept.conf.js

the command fails to identify and run the specified glob for the feature files, resulting in 0 features being picked.

Image

Root cause:

The issue occurs due to the usage of path.resolve on paths when a custom configuration file is specified here. This results in invalid input for the globSync command, causing it to fail to resolve the glob patterns correctly here.

主要語言
JavaScript
星號
4.2k
分支
756
平均合併
2 天 9 小時
30 天內合併 PR
16

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

codeceptjs/CodeceptJS 的其他 Issue

查看 codeceptjs/CodeceptJS 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。