Use case與user story在不同項目中定義會有一定區(qū)別肤寝,此處只討論最大眾的定義宿饱。
最基本的區(qū)別:use case是以用例圖表示体捏,user story是以一句話表示腐泻。
最基本的共同點:幫助閱讀者明白該軟件應(yīng)該完成什么事纵搁,促進(jìn)利益相關(guān)者交流合作窄做。
在實際使用時這兩者無高下之分愧驱,只分使用場合。
User story在維基百科上的定義:In software development and product management, a user story is an informal, natural language description of one or more features of a software system.
User story有其固定格式椭盏,其中應(yīng)用最廣的為:
As a <role>, I want <goal/desire> so that <some reason>.
E.g. As a PO, I want to change privacy policy for the China version of the App so that local policies are updated for local market.
不過實際使用時有的公司也不會遵從這個格式组砚,只要能把意思表達(dá)清楚即可√图眨【個人觀點】
user story只有簡單的需求描述糟红,而非詳細(xì)的需求規(guī)范艾帐。所以因其簡單易懂的特點,user story適用于需求探索階段盆偿,也就是sprint plainning階段與用戶討論需求時使用柒爸。
關(guān)于role:并且使用user story時,role不只有終端用戶一個角色事扭,比如還包括backend team捎稚、PO等等。測試人員在設(shè)計case時需要把自己轉(zhuǎn)換成多個角色來設(shè)計case并確保其覆蓋場景句旱。
關(guān)于粒度:在敏捷開發(fā)中user story的粒度一般較小阳藻,一個業(yè)務(wù)場景的備選流有時也能成為一個user story。
關(guān)于關(guān)注點:user story不會涉及系統(tǒng)內(nèi)部的東西谈撒,主要關(guān)注業(yè)務(wù)用例而非系統(tǒng)用例。
Use case的定義為:A generalized description of a set of interactions between the system and one or more actors, where an actor is either a user or another system.
可以看出use case的關(guān)注點在于系統(tǒng)用例匾南,即更適合系統(tǒng)設(shè)計與開發(fā)團隊使用啃匿。
未完待續(xù)。