Skip to content

Instantly share code, notes, and snippets.

@chancancode
Created February 27, 2009 23:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chancancode/71763 to your computer and use it in GitHub Desktop.
Save chancancode/71763 to your computer and use it in GitHub Desktop.
feature: 功能 - 這個應該大家都同意吧
background: 背景 - 這個也是
scenario: 場景 | 劇本
我參考了中文Wikipedia和一本台灣的UML教科書, 發覺他們都用了"場景"來翻譯 Use Case Scenario, 所以我想這應該是技術用詞吧。但可能劇本比較接近台灣的日常用法, 所以還是由你決定是否保留吧。以下是參考連結:
- http://zh.wikipedia.org/w/index.php?title=用例&variant=zh-hant [每個用例提供了一個或多個場景...]
- http://www.scholars.com.tw/flytown/itemdesc.asp?ProductID=PG20143&menu=6 [單元 8-確定使用案例場景(Use Case Scenario)]
以下這個Powerpoint交替使用了場景和情境, 但我想反正都差不多還是統一一點, 不要introduce另一個confusion吧
- http://ngis.moi.gov.tw/get_file.aspx?file_name=20080918111016.pdf&folder=edu_train/20080819171003546/&file_id=20080918111016590
scenario_outline: 場景大綱 | 劇本大綱
我原本用了"場景簡述", 但我再想清楚後還是用了大綱。因為在cucumber中, scenario和scenario_outline在用法上的分別就是scenario_outline可以用variables來整合幾個類似的scenarios吧。考慮到這點我認為大綱好像比"簡述"(short description)和"概要"(summary)適合吧。(當然, 如果決定刪除"劇本", 這裡也要一拼刪去吧。)
examples: 例子
在cucumber中這個keyword的作用是作為一個標題放在examples table上面, 所以例子(some examples => 一些例子)好像比例如(for example)適合。
given: 假設
在cucumber中Given的意思是為Scenario設立一些"前提", 個人應為假設比較接緊這個意思。(Given好像比If[如果]肯定一些)
when: 當 - 這個大家都認同
then: 那麼
承接"Given"部份的討論, cucumber的then應該比較接近"那麼"的意思。"然後"帶有點"時序"的感覺。 (...watched the late movie and *then* went to bed.)
and: 而且 | 並且
有些情況下"而且"比較適合, 有時"假設"配合"並且"則比較恰當:
- 假設Tom已經登記, 而且他已經登入
- 假設引擎已經啟動, 並且假設其他機件沒有固障
but: 但是 - 這個也沒甚麼特別
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment