All Projects → kkapelon → Java Testing With Spock

kkapelon / Java Testing With Spock

Code samples from the book "Java testing with Spock"

Programming Languages

java
68154 projects - #9 most used programming language
groovy
2714 projects

Projects that are alternatives of or similar to Java Testing With Spock

eat
Json based scenario testing tool(which can have test for functional and non-functional)
Stars: ✭ 41 (-82.33%)
Mutual labels:  test-framework, test-driven-development
Bandit
Human-friendly unit testing for C++11
Stars: ✭ 240 (+3.45%)
Mutual labels:  test-framework, test-driven-development
exactly
Exactly - tests a command line program by executing it in a temporary sandbox directory and inspecting its result.
Stars: ✭ 30 (-87.07%)
Mutual labels:  test-framework, test-driven-development
PixelTest
Fast, modern, simple iOS snapshot testing written purely in Swift.
Stars: ✭ 56 (-75.86%)
Mutual labels:  test-framework, test-driven-development
bdd-for-c
A simple BDD library for the C language
Stars: ✭ 90 (-61.21%)
Mutual labels:  test-framework, test-driven-development
Webtau
Webtau (short for web test automation) is a testing API, command line tool and a framework to write unit, integration and end-to-end tests. Test across REST-API, Graph QL, Browser, Database, CLI and Business Logic with consistent set of matchers and concepts. REPL mode speeds-up tests development. Rich reporting cuts down investigation time.
Stars: ✭ 156 (-32.76%)
Mutual labels:  rest, test-framework
Bash unit
bash unit testing enterprise edition framework for professionals
Stars: ✭ 419 (+80.6%)
Mutual labels:  test-framework, test-driven-development
Nunit
NUnit 3 Framework
Stars: ✭ 2,131 (+818.53%)
Mutual labels:  test-framework, test-driven-development
Node Hbase
Asynchronous HBase client for NodeJs using REST
Stars: ✭ 226 (-2.59%)
Mutual labels:  rest
Jshistory Cn
🇨🇳 《JavaScript 二十年》中文版
Stars: ✭ 3,686 (+1488.79%)
Mutual labels:  book
Guzzle Services
Provides an implementation of the Guzzle Command library that uses Guzzle service descriptions to describe web services, serialize requests, and parse responses into easy to use model structures.
Stars: ✭ 226 (-2.59%)
Mutual labels:  rest
Flask Restplus
Fully featured framework for fast, easy and documented API development with Flask
Stars: ✭ 2,585 (+1014.22%)
Mutual labels:  rest
Spife
🍛 🍴 a jshttp based µframework 🍴 🍝
Stars: ✭ 230 (-0.86%)
Mutual labels:  rest
Junit Dataprovider
A TestNG like dataprovider runner for JUnit with many additional features
Stars: ✭ 226 (-2.59%)
Mutual labels:  test-driven-development
Bear.sunday
A resource-oriented application framework
Stars: ✭ 230 (-0.86%)
Mutual labels:  rest
Hiverunner
An Open Source unit test framework for Hive queries based on JUnit 4 and 5
Stars: ✭ 225 (-3.02%)
Mutual labels:  test-framework
Rested
A REST client for browsers
Stars: ✭ 225 (-3.02%)
Mutual labels:  rest
Jbook
Notes about programming, advices, algorithms and a lot of good stuff with Java
Stars: ✭ 233 (+0.43%)
Mutual labels:  book
Horaires Ratp Api
Webservice pour les horaires et trafic RATP en temps réel
Stars: ✭ 232 (+0%)
Mutual labels:  rest
Rubyfu
Rubyfu, where Ruby goes evil!
Stars: ✭ 228 (-1.72%)
Mutual labels:  book

Java Testing with Spock

Current build status: Build Status

Java Testing with book cover

Description

This GIT repository contains all source code for the book Java Testing With Spock published by Manning. Each chapter is offered as an independent Maven project.

Free chapter 1 - (intro to testing)

You can get an overview of Spock and read a brief discussion on its features in the first chapter of the book. This chapter is freely available in PDF format.

Free chapter 3 - (comparison with JUnit)

The book contains a comparison of JUnit and Spock using semi-real world code examples. If you are a die-hard JUnit believer, you will find this part of the book very interesting. This chapter is also freely available in PDF format.

Requirements

To use the code samples you need the following:

  • Java Development Kit version 7+
  • Maven installed (mvn should be available in the command line)
  • Internet access (for fetching library dependencies)

Usage

You can checkout/run any chapter on its own. You can either work directly on Github or download the code as a ZIP file For each chapter entering the command mvn test will compile and run all JUnit/Spock tests.

IDE support

Each chapter is self-contained. There is no super POM file. This repository is NOT a multimodule project. If you use Eclipse just import any chapter as a Maven project. If you use IntelliJ make sure that you import each chapter on its own project (and not as modules in a single project). To gain syntax highlighting you also need to install Groovy support in your IDE. This is optional because the build is fully automated via Maven.

Gradle Support

There are also build.gradle files along side each maven pom.xml file in each chapter if you would like to see what an analogous gradle build file looks like. You also do not have to download and install Gradle either as the gradle wrapper files are also included in this repository. Simply type ./gradlew clean test at the project root and Gradle will build the project and run the tests.

You can also import the build.gradle files into Eclipse if you have the Gradle Buildship plugin installed. If you are using Intellij IDEA, you can also import each chapter on its own similar to how Maven projects are imported. The idea and eclipse plugins are also configured in each build.gradle file if you want to generate the metadata files for Eclipse and IDEA projects.

Note that Gradle support was contributed by [Mike Smithson] (https://github.com/mikesmithson) and is considered a bonus feature. I will provide no support for Gradle and any related issues, i.e., you are on your own.

Code listings

Chapter 1

Chapter 2

Chapter 3

Chapter 4

Chapter 5

Chapter 6

Chapter 7

Chapter 8

Issues with the code.

If you find a problem with the code feel free to open an issue. If you feel like contributing you can even create a pull request!

Issues with the book

If you have comments and suggestions for the book please use the Manning forum. I monitor it regularly and it is helpful if other readers can see and respond to your comments.

Enjoy!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].