Mailinglist Archive: yast-devel (79 mails)

< Previous Next >
Re: [yast-devel] Rspec as specification: Cucumber
Dne 3.3.2016 v 08:39 Stefan Schubert napsal(a):
I fully agree here. In my former team (SCC) we have used cucumber and I have
really seen the benefits in the daily work. The idea has been that PM should
us the requirements in cucumber format. That has never happend ;-)

Exactly. Cucumber is great when you can get the requirements from outside
(PMs, designers, users...) as they can use "English" language. (It's actually
not a free form text, it has some keywords and structure so they have to learn
it a bit, but it's far more human friendly than RSpec).

The problem is that you have to maintain the intermediate part which
translates the specification into executable Ruby code. If your tests are
too different you need to maintain many transformation rules.

Additionaly cucumber is suitable for high level tests as the descriptions
are high level. That usually means integration tests, for low level
unit tests it's not suitable. And we write mainly unit tests for YaST...

Actually the main reason why I switched to cucumber in the rubocop-yast
is that cucumber supports multiline arguments in verbatim format [1].
That makes the tests more readable.

But this is a specific case as we need to test Ruby code (as string literal)
in Ruby code. Normally you would need to escape all quotes, newlines and that
make it hardly readable...



Ladislav Slez√°k
Appliance department / YaST Developer
Lihovarsk√° 1060/12
190 00 Prague 9 / Czech Republic
tel: +420 284 028 960
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups