• Liked Debasish Ghosh
    keyboard_arrow_down

    Property based testing for functional domain models

    Debasish Ghosh
    Debasish Ghosh
    schedule 2 years ago
    Sold Out!
    45 mins
    Talk
    Intermediate

    Manual testing is something that's error prone, incomplete and impossible to replicate on a large scale. We have instead been using xUnit style of testing for quite some time now. This approach has a number of drawbacks like (a) We need to write test cases by hand which again doesn't scale for large systems (b) We may miss out some of the edge cases (c) Safeguarding missing cases with coverage metrics doesn't help, since metrics are mostly based on heuristics (d) maintaining test cases and test data is a real pain.

    In property based testing we write properties and not low level test cases. And let the system generate test cases which validate such properties. There are 2 main advantages with this approach:

    1. You think in terms of properties (or specifications) of the domain model which is the right granularity to think about
    2. You don't need to manage test cases, which is completely done by the system that generates a large collection of test data

    This approach is ideal for the functional programming paradigm, which focuses on pure functions. Using functional programming it's easier to reason about your model - hence it's easier to test functional programs using properties. In this talk I will take some real world examples of property validation and verification using scalacheck (the property based testing library for Scala) and a real world domain model.

  • Liked Naresha K
    keyboard_arrow_down

    Discovering Functional Treasure in Idiomatic Groovy

    Naresha K
    Naresha K
    schedule 2 years ago
    Sold Out!
    45 mins
    Demonstration
    Intermediate

    Groovy is a dynamic language on the JVM. Groovy supports programming in multiple paradigms - imperative, object oriented and even functional programming. 

    When I started using Groovy with Java background, the code used to be mostly imperative. As I explored the language in detail, I realized the power of idiomatic code. While the attempt to write idiomatic Groovy code helped me to realise the benefits of functional approach, thinking functionally resulted in better code too.

    In this talk, I will demonstrate functional programming constructs in Groovy and show how to use them effectively. I will provide plently of examples to help the audience realize the benefits.

Sorry, no proposals found under this section.