easyb学习笔记
来源:互联网 发布:英文游戏汉化软件 编辑:程序博客网 时间:2024/05/17 23:37
1.关于given,when和then的解释
These three words bind a feature together with a means to verify it, because the words describe a flow or sequence of events:
- Given some context,
- When something happens,
- Something else should happen.
2.
3.
In easyb, scenarios — not stories — have states. A scenario can be in a passing, failing, or pending state. Pending is handy because it can indicate that a particular scenario is actively being worked on. Failing, obviously, indicates an error condition either occurring in the application being verified or possibly in how the scenario is defined.
Scenarios in easyb define steps using the keywords given
, when
, then
, and optionally and
. Each keyword definition in a scenario looks a lot like the scenario
keyword definition, as Listing 10 shows:
4.then
easyb supports a host of similar checks, including:
shouldNotBe
shouldEqual
shouldNotEqual
shouldBeGreaterThan
shouldBeLessThan
5.file extension
The stories in easyb should and must be in a file ending with an extension of .story. So our login story would be placed in a file called LoginServiceTest.story.
If you have a story named AccountServiceTest.groovy, you will get an exception as such:
Buildfile: /Users/meerasubbarao/Development/easyb-samples/build.xml
init:
run.easyb.stores:
[easyb] easyb is preparing to process 2 file(s)
[easyb] Easyb behavior file must end in Story.groovy, .story, Specification.groovy or .specification. See easyb documentation for more details.
[easyb] easyb execution FAILED
BUILD SUCCESSFUL
Total time: 1 second
- easyb学习笔记
- 用 easyb 驱动开发
- easyb,我对你终于失去了耐心
- 学习笔记?
- 学习笔记
- 学习笔记
- 学习笔记
- 学习笔记
- 学习笔记
- 学习笔记
- 学习笔记
- 学习笔记
- 学习笔记
- 学习笔记
- 学习笔记
- 学习笔记
- 学习笔记
- 学习笔记
- 在拷贝(复制)代码前,应该确呆所复制的代码是正确的
- 极度郁闷中····
- VC系统托盘
- SSH Secure Shell Client中文乱码的解决办法
- get available fonts
- easyb学习笔记
- emacs 中的快捷键
- 在Windows上学习Object-C
- 第四课真枪核弹做自己的应用
- Javascript技术合集
- UML基础知识
- fieldset(数据周围绘制一个带标题的框)
- SIP Presence and Instant Message Example
- 地址总线,地址总线宽度,寻址能力