Problem with launching test with an exact tag
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 35/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- javascript, node.js
- 領域
- cli, testing-qa
研究方向
首先針對回報的 @cit-mit 與 @cit-mit-subseq 標籤重現這兩個 npx codeceptjs run --features --config=./codecept.conf.js --grep 指令,接著追蹤 CLI 如何處理 --grep。完成的標準是定義精確標籤選項或行為,並由回歸測試涵蓋,且不需要未來的否定前瞻。
由索引模型根據 Issue 內容生成。
描述
What are you trying to achieve?
I have 2 tags in my tests file :
- @cit-mit
- @cit-mit-subseq
I'm trying to launch tests with @cit-mit tag only.
What do you get instead?
I have the @cit-mit tests launched, then the @cit-mit-subseq launched too.
Commands tested to launch test
npx codeceptjs run --features --config=./codecept.conf.js --grep '@cit-mit'
npx codeceptjs run --features --config=./codecept.conf.js --grep '(?=.*@cit-mit)'
I know I can play only @cit-mit tag with the grep (?=.*@cit-mit)^(?!.*@cit-mit-subseq), but in the next weeks I'll have more tests with @cit-mit "prefix" tag so I'll have to edit my grep and I don't want this.
It'll be nice if there is an exact keyword or something like this to lock the pattern to the only tag we provide, and not every tags starting with the one given.
Details
- CodeceptJS version: 3.5.6
- NodeJS Version: 18.18.0
- Operating System: Debian 12.1
- puppeteer || webdriverio || testcafe version (if related) /
- Configuration file:
const { output } = require('codeceptjs')
require('dotenv').config({ path: '.env' })
if (process.env.ENV === undefined) {
process.env['ENV'] = 'preprod'
}
require('dotenv').config({ path: 'codecept.' + process.env.ENV + '.env' })
exports.config = {
output: './output',
helpers: {
REST: {
endpoint: process.env.GATEWAY_URL,
timeout: 60000,
},
WebDriver: {
url: 'http://localhost',
host: process.env.SELENIUM_HOST === undefined ? 'localhost' : process.env.SELENIUM_HOST,
browser: 'chrome',
desiredCapabilities: {
chromeOptions: {
args: ['--headless', '--disable-gpu', '--no-sandbox'],
},
},
},
ChaiWrapper: {
require: 'codeceptjs-chai',
},
JSONResponse: {},
CustomWebDriver: {
require: './lib/CustomWebDriver.js',
},
},
include: {
I: './steps_file.js',
lib: './lib/index',
context: './lib/contextAPI.js',
inputOrder: './data/inputs/input.order.js',
endpoints: './data/data.endpoints.js',
mappings: './data/data.mappings.js',
merchants: './data/data.merchants.js',
},
mocha: {},
bootstrap: null,
timeout: null,
teardown: null,
hooks: [],
gherkin: {
features: './features/**/*.feature',
steps: [
'./step_definitions/_common.steps.js',
'./step_definitions/hpayment.steps.js',
'./step_definitions/order.steps.js',
'./step_definitions/hpayment/hpayment.nominal.steps.js',
'./step_definitions/order/order.cit-mit.steps.js',
'./step_definitions/order/order.nominal.steps.js',
'./step_definitions/order/order.sdd.steps.js',
'./step_definitions/order/order.given.steps.js',
'./step_definitions/order/sca.preference.steps.js',
],
},
plugins: {
hook: {
require: './plugins/gateway-qa-hooks.js',
enabled: true,
},
screenshotOnFail: {
enabled: true,
uniqueScreenshotNames: true,
},
tryTo: {
enabled: true,
},
retryFailedStep: {
enabled: true,
},
retryTo: {
enabled: true,
},
eachElement: {
enabled: true,
},
pauseOnFail: {},
},
stepTimeout: 0,
stepTimeoutOverride: [
{
pattern: 'wait.*',
timeout: 0,
},
{
pattern: 'amOnPage',
timeout: 0,
},
],
tests: './tests/**/*.js',
name: 'gateway-qa',
}
output.success(' ==================================== ')
output.success(' ENVIRONNEMENT: ' + process.env.ENV + ' ')
output.success(' GATEWAY_URL: ' + process.env.GATEWAY_URL + ' ')
output.success(' PCI_URL: ' + process.env.PCI_URL + ' ')
output.success(' ====================================')
- 主要語言
- JavaScript
- 星號
- 4.2k
- 分支
- 756
- 平均合併
- 1 天 8 小時
- 30 天內合併 PR
- 18
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
codeceptjs/CodeceptJS 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 68/100
codeceptjs/CodeceptJS#5731 ·
維護者通常 1 天內回覆
-
`I.waitForFile` (FileSystem helper) fails if directory does not exist (yet)可能已有人在做 @danielrentz 於 250 天前認領。 未關閉stale
難度 2/5 1-3 小時 新手友好度 72/100
codeceptjs/CodeceptJS#5420 · 1 則留言 ·
維護者通常 1 天內回覆
-
stale
難度 2/5 1-3 小時 新手友好度 76/100
codeceptjs/CodeceptJS#5358 · 1 則留言 ·
維護者通常 1 天內回覆
-
stale
難度 2/5 1-3 小時 新手友好度 78/100
codeceptjs/CodeceptJS#4958 · 10 則留言 · 2 個 reaction ·
維護者通常 1 天內回覆
-
stale
難度 1/5 1 小時以內 新手友好度 72/100
codeceptjs/CodeceptJS#4778 · 3 則留言 ·
維護者通常 1 天內回覆
查看 codeceptjs/CodeceptJS 的全部 Issue
相似的 Issue
-
area:docs bug triage:confirmed
難度 2/5 1-3 小時 新手友好度 74/100
維護者通常 1 天內回覆
-
[Feature]:未關閉enhancement
難度 2/5 1-3 小時 新手友好度 65/100
-
難度 2/5 1-3 小時 新手友好度 73/100
Uuriko/project-room#1554 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
維護者通常 4 天內回覆
-
automated issue report
難度 2/5 1-3 小時 新手友好度 62/100
lirantal/discoprint#36 ·
維護者通常 1 天內回覆