Testing Storm components with Groovy and Spock
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Testing Storm components with Groovy and Spock

on

  • 1,075 views

Ho to use Groovy and Spock framework for testing Java projects. Examples of using Storm testing facility.

Ho to use Groovy and Spock framework for testing Java projects. Examples of using Storm testing facility.

Statistics

Views

Total Views
1,075
Views on SlideShare
1,059
Embed Views
16

Actions

Likes
3
Downloads
15
Comments
0

1 Embed 16

https://twitter.com 16

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Testing Storm components with Groovy and Spock Presentation Transcript

  • 1. TESTING STORM COMPONENTS WITH GROOVY AND SPOCK
  • 2. About Me Architect @WebMD Java Developer Big Data and NoSQL enthusiast NYC Storm meetup organizer @edvorkin
  • 3. "It works on my machine" Testing is annoying to the typical programmer. Programmers are driven to create things, build products, add features, and make things work. Testing is just the opposite. It's about finding weaknesses, exploiting edge cases and making it breaks.
  • 4. "It works on my machine" How to make testing Java applications easy and fast?
  • 5. Groovy - more productive Java Compiles to byte code Easy to pick up by Java developers Reuse of Java semantics and API
  • 6. Concise syntax
  • 7. Concise syntax
  • 8. Differences from Java Optional typing Optional Exception handling Optional parentheses meta programming
  • 9. Lambdas -> Closures • Closures are blocks of code that can be treated as first-class objects: passed around as references, stored, executed at arbitrary times, and so on.
  • 10. Groovy Collections A lot of syntax sugar and convenience methods on collections
  • 11. JsonSlupper and XmlSlupper Builders - Xml, Json, HTTP
  • 12. Easy to work with SQL
  • 13. IDE Support
  • 14. How to get started?
  • 15. How to get started? Write tests! Not a production code, easy to get approval.
  • 16. WHICH TESTING FRAMEWORK CAN I USE WITH GROOVY? SPOCK - BEHAVIOR-DRIVEN TESTING FRAMEWORK
  • 17. Spock Testing Framework Expressive testing language Easy to Learn Reduce the line of test code Leverage Groovy Productivity Structural blocks - BDD style -context, stimulus, expectation
  • 18. BDD Style
  • 19. BDD Style
  • 20. Mock and Interaction verification
  • 21. Stubbing Stubbing is the act of making collaborators respond to method calls in a certain way.
  • 22. Testing Storm components
  • 23. Testing Storm components
  • 24. Bolt under the test
  • 25. Demo
  • 26. Test Code
  • 27. Test Code
  • 28. Some ideas Treat Storm components as regular functions Use backtype.storm.Testing Use Spock Mocks, Stubs and Interactions https://github.com/xumingming/storm-lib/blob/master/sr
  • 29. Resources
  • 30. Resources http://docs.spockframework.org/en/latest/ http://groovy.codehaus.org/ http://vimeo.com/43808772 - Venkat Subramaniam - Caring about Code Quality Storm Real-time Processing Cookbook by Quinton Anderson
  • 31. THANKS.