Giter VIP home page Giter VIP logo

spock's Introduction

License Maven Central GitHub Workflow Status (branch) Jitpack Codecov Gitter Revved up by Gradle Enterprise

Spock Framework

Spock is a BDD-style developer testing and specification framework for Java and Groovy applications. To learn more about Spock, visit https://spockframework.org. To run a sample spec in your browser, go to https://meetspock.appspot.com/.

Latest Versions

  • The latest 2.0 release version is 2.0 (2.0-groovy-2.5, 2.0-groovy-3.0), released on 2021-05-17.
  • The current development version is 2.1-SNAPSHOT (2.1-groovy-2.5-SNAPSHOT, 2.1-groovy-3.0-SNAPSHOT).

NOTE: Spock 2.0 is based on the JUnit 5 Platform and require Java 8+/groovy-2.5+ (Groovy 3.0 is recommended, especially in projects using Java 12+).

Releases are available from Maven Central. Development snapshots are available from Sonatype OSS.

Ad-Hoc Intermediate Releases

For intermediate stable builds we recommend to use Jitpack (go here for instructions):

  1. Add https://jitpack.io as a repository
  2. Use org.spockframework.spock as groupId and the normal artifact-id
repositories {
    // ...
    maven { url 'https://jitpack.io' }
}

dependencies {
        compile 'org.spockframework.spock:spock-core:spock-2.0'
        compile 'org.spockframework.spock:spock-spring:spock-2.0'
}
  1. For intermediate releases you can also use the commit-hash as version, e.g. compile com.github.spockframework.spock:spock-core:d91bf785a1

Modules

  • spock-core -- Core framework. This is the only mandatory module.
  • spock-specs -- Specifications for spock-core, implemented using Spock. Not required for using Spock.
  • spock-spring -- Integration with the Spring TestContext Framework.
  • spock-tapestry -- Integration with the Tapestry 5 IoC container.
  • spock-guice -- Integration with Guice 2/3.
  • spock-unitils -- Integration with Unitils.

Building

Supported versions

Spock is supported for Java version 8+.

Spock is supported for Groovy versions 2.5 and 3.0.

The tests are testing Spock with the specific versions (variants) of Groovy and Java. Default Groovy version is 2.5.

The Groovy 2.5 and 3.0 variant should pass on all supported JDK versions:

./gradlew clean build

(Windows: gradlew clean build). All build dependencies, including the build tool itself, will be downloaded automatically (unless already present).

Contributing

Contributions are welcome! Please see the contributing page for detailed instructions.

Support

If you have any comments or questions, please direct them to the user forum. All feedback is appreciated!

Java 9 Module Names

All published jars (beginning with Spock 1.2) will contain Automatic-Module-Name manifest attribute. This allows for Spock to be used in a Java 9 Module Path.

  • spock-core -- org.spockframework.core
  • spock-spring -- org.spockframework.spring
  • spock-tapestry -- org.spockframework.tapestry
  • spock-guice -- org.spockframework.guice
  • spock-unitils -- org.spockframework.unitils

So module authors can use well known module names for the spock modules, e.g. something like this:

open module foo.bar {
  requires org.spockframework.core;
  requires org.spockframework.spring;
}

Links

Live Long And Prosper!

The Spock Framework Team

spock's People

Contributors

pniederw avatar leonard84 avatar ldaley avatar vampire avatar szpak avatar robfletcher avatar marcphilipp avatar kriegaex avatar siordache avatar sbglasius avatar fuud avatar jarl-dk avatar jochenberger avatar raphw avatar magdzikk avatar martyix avatar tawus avatar paulk-asert avatar msgilligan avatar mkutz avatar erdi avatar kiview avatar guspower avatar david-w-millar avatar burkhufnagel avatar angry-cellophane avatar shils avatar selenium34 avatar ryangardner avatar runninglvlan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.