Introduction to lambda behave

17

Click here to load reader

description

Are you a Java developer and you've seen the fluent and modern specification frameworks available in other programming languages such as spock or jasmine and wondering why we can't have the same thing? Then Lambda Behave is made for you! It uses numerous Java 8 features in order to enable cleaner and more readable tests and specifications. This quickie will introduce the framework, explain why you would want to use it over junit and cover some of its cool features, including: * How to write fluent and clean specifications in your domain language * How to write data driven specifications * How to integrate these into your build tool or IDE * How IDE usage can influence library design for the better http://richardwarburton.github.io/lambda-behave/

Transcript of Introduction to lambda behave

Page 1: Introduction to lambda behave

Lambda BehaveA modern testing and behavioural specification framework for Java 8

@richardwarburto

Page 2: Introduction to lambda behave
Page 3: Introduction to lambda behave

Talk Outline

What do I want in a testing framework?

Live Coding Examples

Comparison with other frameworks

Summary

Page 4: Introduction to lambda behave

What do I want in a testing framework?

Page 5: Introduction to lambda behave

Write a feature description in business domain terms

Page 6: Introduction to lambda behave

Parameterise different configurations

Page 7: Introduction to lambda behave

Property Based Testing:

Automatically generate your testcases based upon a property

Page 8: Introduction to lambda behave

Live Coding

Page 9: Introduction to lambda behave

Conclusions & Summary

Page 10: Introduction to lambda behave

Junit doesn’t offer the fluency or features of lambda-behave

Page 11: Introduction to lambda behave

Cucumber: Regex some text in order to execute code

Page 12: Introduction to lambda behave

Spock & ScalaTest are great but not Java based

Page 13: Introduction to lambda behave

Conclusions & Summary

Page 14: Introduction to lambda behave

Future Improvements

● Plugin API○ Support for Spring & Vertx

● Improved generators & mocking

● HTML Reports

● Expectation logs

● Heisentest Detector

● Support parallel runners

● Support concurrent tests better

Page 15: Introduction to lambda behave

Summary

● Existing testing solutions either unreadable or convoluted

● Lambda Behave offers a fluent and modern testing style

● Rapidly adding features○ Help welcome and wanted!○ Github issues + pull requests○ https://github.com/RichardWarburton/lambda-

behave

Page 16: Introduction to lambda behave

Links & Info

Project Website:http://richardwarburton.github.io/lambda-behave/

Maven Central Coordinatescom.insightfullogic:lambda-behave:0.3

Bookhttp://tinyurl.com/java8lambdas

Training Websitehttp://java8training.com/

Bloghttp://insightfullogic.com

Page 17: Introduction to lambda behave

Questions?@richardwarburto