Does BDD pay?

I am a little familiar with rspec [Ruby] and the [Scala] specs. At Yesturday, I went through tutoring for Cucumber. What I did not like about Cucumber is that in addition to describing scripts (for example, for type testing or xUnit), you need to implement an additional level of indirection: translating scripts into ruby ​​expressions. For me, creating unnecessary (?) Additional layers of indirection seems like a “hard” J2EE way, not a “light” ruby ​​way. Is clarity "expert in the field" the only advantage of cucumber? Or are there some unobvious (technical?) Advantages for the developer / tester?

+3
source share
3 answers

BDD, from a practical point of view, is very synonymous with TDD. Rspec is a BDD test base as well as a cucumber.

The fact that interested parties can read and understand the specifications of cucumber acceptance is certainly a key advantage, but this fact alone does not achieve real benefits from the cucumber. Your features and scenarios should grow to a certain extent, as the work done for them moves through the value stream of your team’s cycle.

Some teams may have an analyst reviewing the work at the beginning of the cycle. Sometimes this analyst writes the acceptance characteristics of the sheds, but whoever writes the first draft, you expect them to be pretty rude. They may not cover all unsatisfied paths.

, , . , .

, , , . , , .

, , Cucumber .

, . , , , Cucumber . , Cucumber , , .

, , . . . , .

+5

, - , .

, , (. Domain Driven Design " " ), , , .. ..

, , . , # , wiki, , , this. Ruby.

BDD - , , , , , - . Feature Injection , . , BDD BDD.

BDD , , ( JBehave - , ). , , Cucumber, DSL BDD , .

: , , , BDD DSL. DSL .

+6

, .

, , , .

, , .

On the other hand, if developers are the only ones reading your tests, you can probably stick with rspec / unit-test / etc. and write your integration tests within this framework. However, you can get more readable, high-level documentation using cucumber. See, for example, rspec 2 basic descriptions of functions in a cucumber.

+2
source

Source: https://habr.com/ru/post/1774909/


All Articles