Wednesday, December 17, 2014

Cucumber Testing Framework

Cucumber is BDD (behaviour driven development) framework. In contrast to other BDD frameworks (like RSpec) the specification is written in a natural human readable language.

Rubocop-yast

I wanted to write tests for the new Rubocop-yast plugin in some nice way. I started with RSpec, but the tests looked ugly (writing multiline indented Ruby code in a string literal requires extra escaping which makes it quite hard to read...).

Then I looked at the original Zombie Killer tests. They are written in Markdown so they are better readable, you can write some additional comments to the test etc... And how to run the Markdown tests? There is a custom Markdown renderer which converts the Markdown specification into a RSpec test.

Looks nice, but having a custom renderer makes it difficult, we have to maintain it and the Markdown format in specific, there is nothing else similar to it...

Then Cucumber come to my mind! It exactly fits our need! The specification allows to write extra comments and notes, it's readable almost like our Markdown and is a standard tool. The killer feature is multiline docstring parameter. It allows to write indented Ruby code directly without any extra escaping.

You can check how the tests looks here, check the *.feature files. Here is the code which converts the specification into the testing code.

Pros & Cons

Here is the summary of pros & cons I found when starting with Cucumber:

Advantages
  • Specification in natural language, readable tests and user stories
  • Allows to use other testing framework for running the real tests (like RSpec)
Disadvantages
  • Extra code for converting the textual specification to Ruby code
  • One more layer between test description and the code (you need to make sure the code really matches the description)
  • Test descriptions should describe the high level features (usually the user interaction), they should not describe the low-level implementation details
Ideally the features should be written by managers, designers or other non-technical people. They can describe the required features without any programming skills. That's probably the most important Cucumber feature.

Suitable for Yast?

In my opinion not. Why? We are usually focused on low-level features and we would probably need too much code for converting the specifications to tests. And the tests are usually too different, we would need to write extra conversion for each test and maintain it. The overall benefit would be small in my opinion and would not be worth of doing it.

Moreover the feature descriptions we usually get are hard to convert to a testing code, they are usually too generic or cannot be tested in unit tests (e.g. the installer features).

Links


48 comments:

Unknown said...



I simply want to say I am new to weblog and truly savored you’re website. More than likely I’m want to bookmark your blog . You actually have excellent writings. Thanks a bunch for sharing your web site.

Jorcel
www.imarksweb.org

Sherlin Jones said...

The biggest change in Selenium recently has been the inclusion of the WebDriver API. Driving a browser natively as a user would either locally or on a remote machine using the Selenium Server it marks a leap forward in terms of browser automation.

Selenium WebDriver fits in the same role as RC did, and has incorporated the original 1.x bindings. It refers to both the language bindings and the implementations of the individual browser controlling code. This is commonly referred to as just "WebDriver" or sometimes as Selenium 2.
Selenium Training Institute in Chennai

Jones said...

A nice article here with some useful tips for those who are not used-to comment that frequently. Thanks for this helpful information I agree with all points you have given to us. I will follow all of them.


Selenium Training in Velachery
Selenium Training Center in Chennai

rana said...

Incredible Article… I want to peruse your articles on the grounds that you're composing style is too great, its is extremely useful for every one of us and I never get exhausted while perusing your article in light of the fact that

Selenium Training in Bangalore

rose said...

I accept there are numerous more pleasurable open doors ahead for people that took a gander at your site.

selenium training in bangalore|

saranya said...

Thanks a lot very much for the high your blog post quality and results-oriented help. I won’t think twice to endorse to anybody who wants and needs support about this area. Besant technologies Marathahalli

Anonymous said...

I accept there are numerous more pleasurable open doors ahead for people that took a gander at your site.
QTP Tutorial

Unknown said...

Webtrackker is one only IT company who will provide you best class training with real time working on marketing from last 4 to 8 Years Experience Employee. We make you like a strong technically sound employee with our best class training.


WEBTRACKKER TECHNOLOGY (P) LTD.
C - 67, sector- 63, Noida, India.
F -1 Sector 3 (Near Sector 16 metro station) Noida, India.
+91 - 8802820025
0120-433-0760



Best SAS Training Institute in delhi

SAS Training in Delhi

SAS Training center in Delhi

Best Sap Training Institute in delhi

Best Sap Training center in delhi


Sap Training in delhi

Best Software Testing Training Institute in delhi

Software Testing Training in delhi

Software Testing Training center in delhi


Best Salesforce Training Institute in delhi


Salesforce Training in delhi

Salesforce Training center in delhi

Best Python Training Institute in delhi

Python Training in delhi

Best Python Training center in delhi

Best Android Training Institute In delhi

Android Training In delhi

best Android Training center In delhi

Unknown said...

Excellent!! You provided very useful information in this article. I have read many articles in various sites but this article is giving in depth explanation about Ruby Cucumber Training . Recently, I also took training on this “Ruby Cucumber Training Hyderabad '' from Excelr.
Ruby Cucumber Training Hyderabad

Unknown said...

Really very useful blog who learn selenium & Cucumber, Selenium Training in Bangalore | Software Testing Training in Bangalore

Home LIft said...

it was an awesome article. i can learn more from this. thank you for this valuable informations.
best selenium training in chennai

Mounika said...

My rather long internet lookup has at the end of the day been compensated with pleasant insight to talk about with my family and friends.
Click here:www.besanttechnologies.in/selenium-training-in-bangalore.html

Unknown said...

You made such an interesting piece to read, giving every subject enlightenment for us to gain knowledge. Thanks for sharing the such information with us
angularjs Training in marathahalli

angularjs interview questions and answers

angularjs Training in bangalore

angularjs Training in bangalore

angularjs Training in chennai

automation anywhere online Training

simbu said...

Thank you for benefiting from time to focus on this kind of, I feel firmly about it and also really like comprehending far more with this particular subject matter. In case doable, when you get know-how, is it possible to thoughts modernizing your site together with far more details? It’s extremely useful to me
Java training in Bangalore | Java training in Btm layout

Java training in Bangalore |Java training in Rajaji nagar

Java training in Bangalore | Java training in Kalyan nagar

sakthi said...

Inspiring writings and I greatly admired what you have to say , I hope you continue to provide new ideas for us all and greetings success always for you..Keep update more information.

rpa training in chennai
rpa training in bangalore
rpa course in bangalore
best rpa training in bangalore
rpa online training

Unknown said...

Thanks for splitting your comprehension with us. It’s really useful to me & I hope it helps the people who in need of this vital information. 
python course institute in bangalore
python Course in bangalore
python training institute in bangalore

Home LIft said...

Thanks for sharing your informative article. As every business owner desire to be the part of digital marketing, there is massive demand for attractive and responsive website. block chain training in chennai | Selenium training in chennai

Dharani M said...

Really very useful information
java training in Marathahalli

spring training in Marathahalli

java training institute in Marathahalli

spring and hibernate training in Marathahalli

Karthik said...

Nice to read your article in this blog and very informative to develop my future career
Best qtp training institute in Chennai
Qtp classes in chennai
qtp training institute in chennai with placement
Automation testing training in chennai
Best QTP Training Institutes in Chennai

Anoushka Sakthi said...

Thanks for the wonderful blog content.

PHP Training in Chennai
DOT NET Training in Chennai
Big Data Training in Chennai
Hadoop Training in Chennai
Android Training in Chennai
Selenium Training in Chennai
Digital Marketing Course in Chennai
JAVA Training in Chennai
Big Data Hadoop Training in Chennai

lekha mathan said...

Such an excellent and interesting blog, do post like this more with more information, This was very useful, Thank you.
Aviation Academy in Chennai
Air hostess training in Chennai
Airport management courses in Chennai
Ground staff training in Chennai
Medical coding training in Chennai
Fashion designing courses in Chennai
Interior design courses in Chennai

jefrin said...

Thanks for posting very useful
best php training institute in chennai

mobile application development said...

Awesome information keep post updated tech info,
java software development company
hire java developer
Java web development company
Java development companies
Java development companies

Jaweed Khan said...

Thanks for sharing The Information The Information shared is very valuable Please keep Updating us Time Just went on redaing the article Python Online Training AWS Online Training Devops Online Training Data Science Online Training

Test My internet Speed said...

Thanks for sharing such a great blog Keep posting..
Software Testing Training in Delhi
Software Testing Training institute in Delhi

digitalmarketinginpune said...

Just saying thanks will not just be sufficient, for the fantasti c lucidity in your writing. I will instantly grab your rss feed to stay informed of any updates. Digital marketing in pune

easylearn said...

Hi,
Good job & thank you very much for the new information, i learned something new. Very well written. It was sooo good to read and usefull to improve knowledge. Who want to learn this information most helpful. One who wanted to learn this technology IT employees will always suggest you take Hadoop training in btm. Because data science course in pune is one of the best that one can do while choosing the course.

KRNInformatix said...

Thank you for sharing useful information. Keep sharing more post
Selenium Training in Bangalore |
Cucumber Training in Bangalore |
Java Selenium Training in Bangalore |
Best Selenium Automation Training in Bangalore | Best Selenium Training in Bangalore

Vijiaajith said...

nice
interview-

questions/aptitude/permutation-and-

combination/how-many-groups-of-6-persons-can-be-

formed


tutorials/oracle/or

acle-delete


technology/chrom

e-flags-complete-guide-enhance-browsing-

experience/


interview-

questions/aptitude/time-and-work/a-alone-can-do-1-

4-of-the-work-in-2-days


interview-

questions/programming/recursion-and-

iteration/integer-a-40-b-35-c-20-d-10-comment-about-

the-output-of-the-following-two-statements


Realtime Experts said...

Thank you for your post. This is excellent information. It is amazing and wonderful to visit your site.MSBI Training in Bangalore

venkateshj said...

Thank you for writing such a great articles
Selenium Automation Training in Bangalore
Selenium Training Institutes in Bangalore
Selenium Training in Marathahalli
Best Selenium Automation Training in Bangalore
Selenium Training in Marathahalli
Best Selenium Training in Bangalore
Selenium Software Training in Bangalore
Selenium Training Institutes in Bangalore
Top 10 selenium training institutes in bangalore

SAP Training said...

Cool post..
Manual Testing Training in Chennai
QTP Training in Chennai
Software Testing Training in Chennai
LoadRunner Training in Chennai
Mobile Application Testing Training in Chennai
QC Training in Chennai
Test Complete Training in Chennai
JMeter Training in Chennai
SAP Training in Chennai
SoapUI Training in Chennai

Trishana said...

Hi...Nice Post..Today so many development tools are available for different type of environment. You should know all the features of the tool which you are using and also all the advantage and disadvantage for the same. You have shared all the details required to know about Cucumber Testing Framework. So you can easily compare it with your requirements.

nizam said...

very useful blog and it build a lot ...thanks for sharing this

BEST ANGULAR JS TRAINING IN CHENNAI WITH PLACEMENT

https://www.acte.in/angular-js-training-in-chennai
https://www.acte.in/angular-js-training-in-annanagar
https://www.acte.in/angular-js-training-in-omr
https://www.acte.in/angular-js-training-in-porur
https://www.acte.in/angular-js-training-in-tambaram
https://www.acte.in/angular-js-training-in-velachery

nizam said...

this is so easy to learn

BEST ANGULAR JS TRAINING IN CHENNAI WITH PLACEMENT

https://www.acte.in/angular-js-training-in-chennai
https://www.acte.in/angular-js-training-in-annanagar
https://www.acte.in/angular-js-training-in-omr
https://www.acte.in/angular-js-training-in-porur
https://www.acte.in/angular-js-training-in-tambaram
https://www.acte.in/angular-js-training-in-velachery

Madhuvarsha said...

It is very interesting to learn.

AngularJS training in chennai | AngularJS training in anna nagar | AngularJS training in omr | AngularJS training in porur | AngularJS training in tambaram | AngularJS training in velachery




Mithun said...

Great Articles!!!informative contents...It shows your in-depth knowledge on the content...Big Thanks
Java training in chennai | Java training in annanagar | Java training in omr | Java training in porur | Java training in tambaram | Java training in velachery

rocky said...

i learned something new. I really appreciate your hardwork.
Python Training in Chennai | Certification | Online Training Course | Python Training in Bangalore | Certification | Online Training Course | Python Training in Hyderabad | Certification | Online Training Course | Python Training in Coimbatore | Certification | Online Training Course | Python Training in Online | Python Certification Training Course

sherlie said...

Thank you for this brief explanation and very nice information.Well, got a good knowledge.
Web Designing Training in Chennai

Web Designing Course in Chennai

Web Designing Training in Bangalore

Web Designing Course in Bangalore

Web Designing Training in Hyderabad

Web Designing Course in Hyderabad

Web Designing Training in Coimbatore

Web Designing Training

Web Designing Online Training

ganesh said...

Really very nice blog information for this one and more technical skills are improve, i like that kind of post.
Angular js Training in Chennai

Angular js Training in Velachery

Angular js Training in Tambaram

Angular js Training in Porur

Angular js Training in Omr
Angular js Training in Annanagar

harini said...

This is an excellent post! It s very well explained and i can easily understand all the content that is intended. Im really grateful that you have put in all you efforts to express it. I liked this post very much
Selenium Training in Chennai

Selenium Training in Velachery

Selenium Training in Tambaram

Selenium Training in Porur

Selenium Training in Omr

Selenium Training in Annanagar

sahasrit said...

I am really happy with your blog because your article is very unique and powerful for new reader.
amazon web services aws training in chennai

microsoft azure course in chennai

workday course in chennai

android course in chennai

ios course in chennai

Hemachandran said...

This blog is very interesting. I learned so much and want to thank you for sharing it in the first place. It is really helpful for my future endeavors. Thanks for your efforts and making it available to public
Java training in chennai

python training in chennai

web designing and development training course in chennai

selenium training in chennai

digital-marketing seo training in chennai

Pushba said...

Thank you for taking the time to write about this much needed subject. I felt that your remarks on this technology is helpful and were especially timely.
IELTS Coaching in chennai

German Classes in Chennai

GRE Coaching Classes in Chennai

TOEFL Coaching in Chennai

Spoken english classes in chennai | Communication training

suresh said...

Thanks for sharing this great article. It made me understand few things about this concept which I never knew before. Keep posting such great articles so that I gain from it.
DevOps Training in Chennai

DevOps Course in Chennai

Links For You said...

Regardless of the security break detailed last year, you actually need to search for another VPN that can do precisely exact thing NordVPN does. Nord VPN Crack

Let2know said...

Connectify Hotspot Pro break is the most recent highlighted application that used to settle the things as indicated by your longing this is most recent form that works! Thums Up Connectify Me Pro Crack

Abdullah said...

Millions of ringgit Arnold is a high-performance ray-following simulator for filmmaking and cinematography.
https://fullkeygens.com/arnold-for-cinema-crack/