1寓免、WAS 運(yùn)算符:可以查找當(dāng)前或曾經(jīng)的一個(gè)狀態(tài)
? ??WAS運(yùn)算符包括Was,Was in努释,Was not夹姥,Was not in
例如:assignee WAS "leo"? ? 這個(gè)用于查找當(dāng)前或曾經(jīng)分配給leo的所有問(wèn)題,這個(gè)功能很實(shí)用也很強(qiáng)大儡陨。
2褪子、CHANGED運(yùn)算符
? ?CHANGED運(yùn)算符用于查找問(wèn)題單的某個(gè)特定字段被變更過(guò)了量淌。這個(gè)運(yùn)算符有以下一些常見用法:
AFTER “date”
BEFORE “date”
BY “username”
DURING (“date1”,“date2”)
ON “date”
FROM “oldvalue”
TO “newvalue”
? ??備注: CHANGED運(yùn)算符常被用于Assignee, Fix Version, Priority, Reporter, Resolution, and Status這些字段。
例子:project not in (TestLog, 內(nèi)部需求反饋) AND issuetype in (Improvement, "New Feature", 線上BUG) AND status = 已上線 AND?status changed from 開發(fā)中 to 待測(cè)試 by currentUser() before endOfMonth() after startOfMonth()?ORDER BY createdDate DESC
3嫌褪、查詢是否帶有附件
? ??attachments IS NOT EMPTY
? ??attachments IS EMPTY
4呀枢、查詢包含特定文本
comment ~ "My PC is quite old"查找評(píng)論里包含有"My PC is quite old"的問(wèn)題(模糊匹配)
5、日期相關(guān)
? ??查找某個(gè)特定日期前或后創(chuàng)建的問(wèn)題(或某個(gè)日期范圍)笼痛。注意裙秋,如果沒(méi)有指定具體時(shí)間,默認(rèn)為凌晨00:00缨伊。查詢結(jié)果是根據(jù)你的JIRA服務(wù)器設(shè)置的時(shí)區(qū)摘刑。使用如下格式:
"yyyy/MM/dd HH:mm"
"yyyy-MM-dd HH:mm"
"yyyy/MM/dd"
"yyyy-MM-dd"
或者使用"w" (周), "d" (天), "h" (小時(shí))或"m" (分鐘)來(lái)指定相對(duì)于當(dāng)前時(shí)間的日期。默認(rèn)為“M”(分鐘)刻坊。一定要使用引號(hào)(“);如果省略了引號(hào)標(biāo)記枷恕,你提供的數(shù)字將被解釋為紀(jì)元(1970-1-1)之后的毫秒。
注:該字段不支持自動(dòng)填寫功能谭胚。
支持的函數(shù)
當(dāng)使用 EQUALS, NOT EQUALS, GREATER THAN, GREATER THAN EQUALS, LESS THAN 或LESS THAN EQUALS運(yùn)算符時(shí)徐块,該字段支持:
currentLogin()
lastLogin()
now()
startOfDay()
startOfWeek()
startOfMonth()
startOfYear()
endOfDay()
endOfWeek()
endOfMonth()
endOfYear()
例子:created > "2010/12/12" and created < "2010/12/12 14:00"? ?查找2010年12月12日下午2點(diǎn)之前創(chuàng)建的所有問(wèn)題? ? ??created > "-1d"? ??查找創(chuàng)建不足一天的問(wèn)題
官方文檔:
https://confluence.atlassian.com/jirasoftwareserver082/advanced-searching-974359675.html
https://support.atlassian.com/jira-software-cloud/docs/advanced-search-reference-jql-fields/
SynapseRT JQL
testSuite()
以下是testSuite() JQL功能的使用實(shí)例。
序號(hào)用法功能描述
1issue in testSuite()搜索項(xiàng)目中的所有測(cè)試用例漏益。
2issue in testSuite('Test Suite Name')搜索某個(gè)特定根測(cè)試用例集中的測(cè)試用例蛹锰。
3issue in testSuite('Test Suite 1/Sub Test Suite')搜索某個(gè)特定測(cè)試用例集中的測(cè)試用例(包含在根測(cè)試用例集下的子測(cè)試用例集)深胳。
4issue in testSuite('Test Suite 1','Test Suite 2')搜索多個(gè)測(cè)試用例集中的測(cè)試用例绰疤。
5issue not in testSuite()搜素沒(méi)有關(guān)聯(lián)到任何測(cè)試用例集的測(cè)試用例。
hasRequirements()
以下是hasRequirements() JQL功能的使用實(shí)例舞终。
序號(hào)用法功能描述
1issue in hasRequirements()搜索所有關(guān)聯(lián)了需求的測(cè)試用例轻庆。
2issue in hasRequirements('Issuekey1','Issuekey2')搜索所有關(guān)聯(lián)了指定需求的測(cè)試用例。
3issue not in hasRequirements() and type = 'Test Case'搜索所有沒(méi)有關(guān)聯(lián)任何需求的測(cè)試用例敛劝。
hasTestCases()
以下是hasTestCases() JQL功能的使用實(shí)例余爆。
序號(hào)用法功能描述
1issue in hasTestCases()搜索所有關(guān)聯(lián)了測(cè)試用例的需求。
2issue in hasTestCases('Issuekey1','Issuekey2')搜索所有關(guān)聯(lián)了指定測(cè)試用例的需求夸盟。
3issue not in hasTestCases() and type = 'Requirement'搜索所有沒(méi)有關(guān)聯(lián)任何測(cè)試用例的需求蛾方。
bugsInTestPlan()
以下是bugsInTestPlan() JQL功能的使用實(shí)例。
序號(hào)用法功能描述
1issue in bugsInTestPlan("Issuekey")搜索關(guān)聯(lián)到指定的一個(gè)測(cè)試計(jì)劃中缺陷上陕。
2issue in bugsInTestPlan('Issuekey1','Issuekey2')搜索關(guān)聯(lián)到指定的多個(gè)測(cè)試計(jì)劃中的缺陷桩砰。
bugsInCycle()
以下是bugsInCycle() JQL功能的使用實(shí)例。
序號(hào)用法功能描述
1issue in bugsInCycle('TestCycleName')搜索所有關(guān)聯(lián)到指定測(cè)試周期的缺陷释簿。
bugsInTestCase()
以下是bugsInTestCase() JQL功能的使用實(shí)例亚隅。
序號(hào)用法功能描述
1issue in bugsInTestCase('issueKey')搜索所有關(guān)聯(lián)到指定測(cè)試用例的缺陷。
2issue in bugsInTestCase('issueKey1','issueKey2')搜索所有關(guān)聯(lián)到多個(gè)指定的測(cè)試用例的缺陷庶溶。
bugsInRequirement()
以下是bugsInRequirement() JQL功能的使用實(shí)例煮纵。
序號(hào)用法功能描述
1issue in bugsInRequirement('issueKey')搜索所有關(guān)聯(lián)到指定需求的缺陷懂鸵。
2issue in bugsInRequirement('issueKey1','issueKey2')搜索所有關(guān)聯(lián)到多個(gè)指定的需求的缺陷。
bugsInBuild()
以下是bugsInBuild()?JQL功能的使用實(shí)例行疏。
序號(hào)用法功能描述
1issue in bugsInBuild('BuildName')搜索所有從指定的測(cè)試版本中報(bào)告的缺陷匆光。
2issue in bugsInBuild('BuildName1','BuildName2')搜索所有從指定的多個(gè)測(cè)試版本中報(bào)告的缺陷。
bugsInEnvironment()
以下是bugsInEnvironment()?JQL功能的使用實(shí)例酿联。
序號(hào)用法功能描述
1issue in?bugsInEnvironment('EnvName')搜索所有從指定的“測(cè)試環(huán)境”中報(bào)告的缺陷殴穴。
2issue in?bugsInEnvironment('EnvName1','EnvName2')搜索所有從指定的多個(gè)“測(cè)試環(huán)境”中報(bào)告的缺陷。
hasActiveCycle()
以下是hasActiveCycle()?JQL功能的使用實(shí)例货葬。
序號(hào)用法功能描述
1issue in hasActiveCycle()搜索所有包含處于“開始”狀態(tài)測(cè)試周期的測(cè)試計(jì)劃采幌。
hasCycleWithBugs()
以下是hasCycleWithBugs() JQL功能的使用實(shí)例。
序號(hào)用法功能描述
1issue in hasCycleWithBugs()搜索所有包含了“測(cè)試周期中關(guān)聯(lián)了缺陷”的測(cè)試計(jì)劃震桶。
hasCycleWithUnresolvedBugs()
以下是hasCycleWithUnresolvedBugs() JQL功能的使用實(shí)例休傍。
序號(hào)用法功能描述
1issue in hasCycleWithUnresolvedBugs()搜索所有包含了“測(cè)試周期中存在’未解決‘狀態(tài)缺陷”的測(cè)試計(jì)劃。
hasCycleWithFailedTestCases()
以下是hasCycleWithFailedTestCases() JQL功能的使用實(shí)例蹲姐。
序號(hào)用法功能描述
1issue in hasCycleWithFailedTestCases()搜索所有包含了“測(cè)試周期中存在’失敗‘狀態(tài)測(cè)試用例”的測(cè)試計(jì)劃磨取。
hasCycleWithBlockedTestCases()
以下是hasCycleWithBlockedTestCases() JQL功能的使用實(shí)例。
序號(hào)用法功能描述
1issue in hasCycleWithBlockedTestCases()搜索所有包含了“測(cè)試周期中存在’鎖定‘狀態(tài)測(cè)試用例”的測(cè)試計(jì)劃柴墩。
hasCycleWithUntestedTestCases()
以下是hasCycleWithUntestedTestCases() JQL功能的使用實(shí)例忙厌。
序號(hào)用法功能描述
1issue in hasCycleWithUntestedTestCases()搜索所有包含了“測(cè)試周期中存在’未測(cè)試‘狀態(tài)測(cè)試用例”的測(cè)試計(jì)劃。
hasCyclesOfDefectCount()
以下是hasCyclesOfDefectCount() JQL功能的使用實(shí)例江咳,支持的運(yùn)算符是:“==”逢净,“>=”和“<=”。
序號(hào)用法功能描述
1issue?in hasCyclesOfDefectCount("10")搜索所有包含了“測(cè)試周期中關(guān)聯(lián)了10個(gè)缺陷”的測(cè)試計(jì)劃歼指。
2issue in hasCyclesOfDefectCount("<=","10")搜索所有包含了“測(cè)試周期中關(guān)聯(lián)了10個(gè)或者少于10個(gè)缺陷”的測(cè)試計(jì)劃爹土。
3issue in hasCyclesOfDefectCount(">=","10")搜索所有包含了“測(cè)試周期中關(guān)聯(lián)了10個(gè)或者多于10個(gè)缺陷”的測(cè)試計(jì)劃。
testPlanMembers()
以下是?testPlanMembers()?JQL功能的使用實(shí)例踩身。
ID用法功能描述
1issue in testPlanMembers("issueKey")搜索指定測(cè)試計(jì)劃中的所有測(cè)試用例胀茵。
childrenOfParentRequirement()
以下是childrenOfParentRequirement()JQL功能的使用實(shí)例。
ID用法功能描述
1issue in childrenOfParentRequirement("issueKey")搜索指定需求中直接關(guān)聯(lián)的子級(jí)需求挟阻。
2issue in?childrenOfParentRequirement("issueKey","all")搜索指定需求中直接關(guān)聯(lián)的子級(jí)需求以及間接關(guān)聯(lián)的子級(jí)需求琼娘。
testPlansForTester()
以下是testPlansForTester()JQL功能的使用實(shí)例。
ID用法功能描述
1issue in testPlansForTester("username")搜索所有包含了指定測(cè)試者(=用戶名)的測(cè)試計(jì)劃附鸽。
testCycleMembers()
以下是?testCycleMembers()JQL功能的使用實(shí)例脱拼。支持這些運(yùn)算符: "==", ">=" 和"<="拒炎。
ID用法功能描述
1issue in testCycleMembers('TestPlanIssueKey','TestCycleName')搜索指定測(cè)試周期中的測(cè)試用例挪拟。
2issue in testCycleMembers('TestPlanIssueKey','TestCycleName','Not Tested')搜索指定測(cè)試周期中所有狀態(tài)為“未測(cè)試”的測(cè)試用例。
3issue in testCycleMembers('TestPlanIssueKey','TestCycleName','NA')搜索指定測(cè)試周期中所有狀態(tài)為“不適用”的測(cè)試用例击你。
4issue in testCycleMembers('TestPlanIssueKey','TestCycleName','Passed')搜索指定測(cè)試周期中所有狀態(tài)為“通過(guò)”的測(cè)試用例
5issue in testCycleMembers('TestPlanIssueKey','TestCycleName','Failed')搜索指定測(cè)試周期中所有狀態(tài)為“失敗”的測(cè)試用例
6issue in testCycleMembers('TestPlanIssueKey','TestCycleName','Blocked')搜索指定測(cè)試周期中所有狀態(tài)為“鎖定”的測(cè)試用例