All Projects → spockframework → Spock Example

spockframework / Spock Example

Licence: apache-2.0
Spock example specifications along with ready-to-go Gradle and Maven builds

Programming Languages

groovy
2714 projects

Projects that are alternatives of or similar to Spock Example

Reposilite
Lightweight repository management software dedicated for the Maven based artifacts (formerly NanoMaven) 📦
Stars: ✭ 222 (-62.69%)
Mutual labels:  gradle, maven
manon
🧪 Play with SpringBoot 2, JWT, Querydsl, GraphQL, Docker, ELK, PostgreSQL, MariaDB, Redis, MongoDB, Flyway, Maven, Gradle, TestNG, JUnit5, JaCoCo, GreenMail, CI, Quality Gates, Prometheus, Gatling, etc.
Stars: ✭ 26 (-95.63%)
Mutual labels:  gradle, maven
openjfx-docs
Getting started guide for JavaFX 11
Stars: ✭ 70 (-88.24%)
Mutual labels:  gradle, maven
Maven Git Versioning Extension
This extension will virtually set project versions, based on current git branch or tag.
Stars: ✭ 178 (-70.08%)
Mutual labels:  gradle, maven
Trampoline
Admin Spring Boot Locally
Stars: ✭ 325 (-45.38%)
Mutual labels:  gradle, maven
Micromodule
Rebuild multiple complete module structures within the module.
Stars: ✭ 192 (-67.73%)
Mutual labels:  gradle, maven
TwitterApiKit
Twitter's API v2 Objectified. This will save you time from creating data objects to access twitter's API v2. This library is supported on Gradle, Maven, Java, Kotlin, and Android projects.
Stars: ✭ 23 (-96.13%)
Mutual labels:  gradle, maven
Java Markdown Generator
Java library to generate markdown
Stars: ✭ 159 (-73.28%)
Mutual labels:  gradle, maven
Javapackager
📦 Gradle/Maven plugin to package Java applications as native Windows, Mac OS X, or GNU/Linux executables and create installers for them.
Stars: ✭ 285 (-52.1%)
Mutual labels:  gradle, maven
Kotlin Examples
Various examples for Kotlin
Stars: ✭ 3,014 (+406.55%)
Mutual labels:  gradle, maven
Jitpack.io
Documentation and issues of https://jitpack.io
Stars: ✭ 2,156 (+262.35%)
Mutual labels:  gradle, maven
Gradle Maven Publish Plugin
Gradle plugin that configures an uploadArchives task to automatically upload all of your Java, Kotlin or Android libraries to any Maven instance.
Stars: ✭ 392 (-34.12%)
Mutual labels:  gradle, maven
Simplenet
An easy-to-use, event-driven, asynchronous network application framework compiled with Java 11.
Stars: ✭ 164 (-72.44%)
Mutual labels:  gradle, maven
Forbidden Apis
Policeman's Forbidden API Checker
Stars: ✭ 216 (-63.7%)
Mutual labels:  gradle, maven
Sample Projects
Sample project files for JavaCPP, JavaCPP Presets, and JavaCV
Stars: ✭ 160 (-73.11%)
Mutual labels:  gradle, maven
sonatype-publish-plugin
Gradle Plugin for publishing artifacts to Sonatype and Nexus
Stars: ✭ 17 (-97.14%)
Mutual labels:  gradle, maven
Publiccms
现代化java cms,由天津黑核科技有限公司开发,轻松支撑千万数据、千万PV;支持静态化,服务器端包含; 目前已经拥有全球0.0002%的用户,语言支持中、繁、日、英;是一个已走向海外的成熟CMS产品
Stars: ✭ 1,750 (+194.12%)
Mutual labels:  gradle, maven
Spotless
Keep your code spotless
Stars: ✭ 2,285 (+284.03%)
Mutual labels:  gradle, maven
broom
A disk cleaning utility for developers.
Stars: ✭ 38 (-93.61%)
Mutual labels:  gradle, maven
Samples
JavaFX samples to run with different options and build tools
Stars: ✭ 352 (-40.84%)
Mutual labels:  gradle, maven

[.float-group]

image::https://img.shields.io/badge/License-Apache%202.0-blue.svg[link=https://github.com/spockframework/spock/blob/master/LICENSE,float=left] image::https://img.shields.io/github/checks-status/spockframework/spock-example/master.svg?label=Build[link=https://github.com/spockframework/spock-example/actions?query=workflow%3A%22CI+Builds%22+branch%3Amaster,float=left] image::https://badges.gitter.im/spockframework/spock.svg[link=https://gitter.im/spockframework/spock?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge,float=left]

== Spock Framework Example Project

The purpose of this project is to help you get started with Spock. The project includes several example specifications and build scripts for Ant, Gradle, and Maven. It also makes it easy to create an Eclipse or IDEA project, allowing you to run the example specs from within your IDE.

All three builds (Ant, Gradle, Maven) will automatically download all required dependencies, compile the project, and finally run the example specs. The Gradle build goes one step further by bootstrapping itself, alleviating the need to have a build tool preinstalled.

=== Prerequisites

  • JDK 8 or higher
  • Maven use mvnw wrapper
  • Gradle use gradlew wrapper

NOTE: This example shows the usage of Spock 2.0, which uses the JUnit Platform. If you want to see how to get Spock 1.x with JUnit 4 up and running see the https://github.com/spockframework/spock-example/tree/spock-1.x[Spock-1.x] Branch.

=== Building with Gradle Type:

./gradlew clean test

Downloaded files (including the Gradle distribution itself) will be stored in the Gradle user home directory (typically user_home/.gradle).

=== Building with Maven Type:

./mvnw clean test

Downloaded files will be stored in the local Maven repository (typically user_home/.m2/repository).

=== Creating an Eclipse project Type:

./gradlew cleanEclipse eclipse

Make sure you have a recent version of the Groovy Eclipse plugin installed. After importing the generated project into a workspace, go to Preferences->Java->Build Path->Classpath Variables and add a variable named GRADLE_CACHE with value user_home/.gradle/cache. (If you have an environment variable GRADLE_USER_HOME set, the correct value is GRADLE_USER_HOME/cache.) You should now be able to build the project, and to run the specs like you would run a JUnit test. See http://wiki.spockframework.org/GettingStarted#Eclipse for more information on how to get started with Spock and Eclipse.

=== Creating an IDEA project Just open the project directory with Intelli IDEA and it should auto-detect the project settings.

Alternatively Type:

./gradlew cleanIdea idea

Open the generated project in IDEA. You should now be able to build the project, and to run the specs like you would run a JUnit test.

NOTE: you might also want to install https://github.com/mycila/gmavenplus-intellij-plugin so that src/test/groovy is correctly recognized as a test classes root.

=== Getting hold of the Jars used in this project Type:

./gradlew collectJars

The Jars will be copied to build/output/lib. The comments in build.gradle explain what they are needed for.

=== Further Resources

If you have any comments or questions, please direct them to the Spock discussion group. We appreciate all feedback!

Happy spec'ing!

The Spock Framework Team

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].