CategoriesTesting

Spock Framework – I – InProgress

Spock aims to be a more powerful alternative to the traditional JUnit stack, by leveraging Groovy features.

Groovy is a JVM-based language which seamlessly integrates with Java

At a glance Spock framework is ,

  • BDD style testing and specification framework
  • Which run Junit under the hood
  • For Java and Groovy applications
  • Test case writing in groovy
  • All three component combine with single library
    • Unit testing
    • Mocking
    • BDD
All three component combine with single library

Spock Features Highlights

  • Highly Expressive
  • Spock enforce a clear test structure
  • BDD style test can be expressive through the “given, when and then” blocks
  • Compatible with all major build tools and continuous integration providers
  • Inbuilt Mocking and Stubbing
  • Parameterized test and Data driven test ( Data table based and SQL table based )
Continue reading