SlideShare a Scribd company logo
1 of 58
Download to read offline
Spocktacular Testing 
Russel Winder 
email: russel@winder.org.uk 
xmpp: russel@winder.org.uk 
twitter: @russel_winder 
Web: http://www.russel.org.uk 
Copyright © 2014 Russel Winder 1
Opening 
Copyright © 2014 Russel Winder 2
Copyright © 2014 Russel Winder 3
An Historical Perspective 
Copyright © 2014 Russel Winder 4
Spock 
BDD 
jBehave 
sUnit 
TestNG 
JUnit4 
JUnit 
GroovyTestCase 
RSpec 
TDD 
Copyright © 2014 Russel Winder 5
Spock is Groovy-based… 
…but can test any JVM-based code. 
Copyright © 2014 Russel Winder 6
NB Testing frameworks support integration 
and system testing as well as unit testing. 
Copyright © 2014 Russel Winder 7
Copyright © 2014 Russel Winder 8
Testing 
● Unit: 
● Test the classes, 
functions and methods 
to ensure they do 
what we need them to. 
● As lightweight and fast 
as possible. 
● Run all tests always. 
● Integration and system: 
● Test combinations or the 
whole thing to make sure 
the functionality is as 
required. 
● Separate process to create 
a “sandbox”. 
● If cannot run all tests 
always, create smoke tests. 
Copyright © 2014 Russel Winder 9
Code Under Test 
static message() { 
'Hello World.' 
} 
println message() 
helloWorld.groovy 
Copyright © 2014 Russel Winder 10
Unit Test 
@Grab('org.spockframework:spock-core:0.7-groovy-2.0') 
import spock.lang.Specification 
import helloWorld 
class Test_HelloWorld extends Specification { 
def 'ensure the message function returns hello world'() { 
expect: 
helloWorld.message() == 'Hello World.' 
} 
} 
Copyright © 2014 Russel Winder 11
System Test 
@Grab('org.spockframework:spock-core:0.7-groovy-2.0') 
import spock.lang.Specification 
class Test_HelloWorld extends Specification { 
def 'executing the script results in hello world on the standard output'() { 
given: 
def process = 'helloWorld.groovy'.execute() 
expect: 
process.waitFor() == 0 
process.in.text == 'Hello World.n' 
} 
} 
Copyright © 2014 Russel Winder 12
A bit less Groovy… 
Copyright © 2014 Russel Winder 13
Code under Test 
package uk.org.winder.spockworkshop; 
class HelloWorld { 
private static String message() { 
return "Hello World."; 
} 
public static void main(final String[] args) { 
System.out.println(message()); 
} 
} 
HelloWorld.java 
Copyright © 2014 Russel Winder 14
Unit Test 
package uk.org.winder.spockworkshop 
import spock.lang.Specification 
class Test_HelloWorld extends Specification { 
def 'ensure the message function returns hello world'() { 
expect: 
HelloWorld.message() == 'Hello World.' 
} 
} 
Copyright © 2014 Russel Winder 15
Project Structure 
. 
├── build.gradle 
└── src 
├── main 
│ └── java 
│ └── uk 
│ └── org 
│ └── winder 
│ └── spockworkshop 
│ └─- HelloWorld.java 
└── test 
└── groovy 
└── uk 
└── org 
└── winder 
└── spockworkshop 
└── unitTest_helloWorld.groovy 
Copyright © 2014 Russel Winder 16
Build — Gradle 
apply plugin: 'groovy' 
apply plugin: 'application' 
repositories { 
mavenCentral() 
} 
dependencies { 
testCompile 'org.spockframework:spock-core:0.7-groovy-2.0' 
} 
mainClassName = 'uk.org.winder.spockworkshop.HelloWorld' 
Copyright © 2014 Russel Winder 17
Copyright © 2014 Russel Winder 18
Moving On 
Copyright © 2014 Russel Winder 19
Copyright © 2014 Russel Winder 20
Spock Test Structure 
Copyright © 2014 Russel Winder 21
given: 
Copyright © 2014 Russel Winder 22
Code Under Test 
static message() { 
'Hello World.' 
} 
println message() 
helloWorld.groovy 
Copyright © 2014 Russel Winder 23
Unit Test 
@Grab('org.spockframework:spock-core:0.7-groovy-2.0') 
import spock.lang.Specification 
import helloWorld 
class Test_HelloWorld extends Specification { 
def 'ensure the message function returns hello world'() { 
expect: 
helloWorld.message() == 'Hello World.' 
} 
} 
Copyright © 2014 Russel Winder 24
Another Code Under Test 
class Stuff { 
private final data = [] 
def leftShift(datum) { 
data << datum 
} 
} 
Stuff.groovy 
Copyright © 2014 Russel Winder 25
@Grab('org.spockframework:spock-core:0.7-groovy-2.0') 
import spock.lang.Specification 
import Stuff 
class TestStuff extends Specification { 
def 'check stuff'() { 
given: 
def stuff = new Stuff() 
expect: 
stuff.data == [] 
when: 
stuff << 6 
then: 
stuff.data == [6] 
when: 
stuff << 6 
then: 
stuff.data == [6, 6] 
} 
Unit Testing It 
def 'check other stuff'() { 
given: 
def stuff = new Stuff() 
expect: 
stuff.data == [] 
when: 
stuff.leftShift(6) 
then: 
stuff.data == [6] 
when: 
stuff.leftShift(6) 
then: 
stuff.data == [6, 6] 
} 
} 
Copyright © 2014 Russel Winder 26
Copyright © 2014 Russel Winder 27
Data-driven Testing 
Copyright © 2014 Russel Winder 28
Copyright © 2014 Russel Winder 29
given: 
Copyright © 2014 Russel Winder 30
Code Under Test 
Id.groovy 
class Id { 
def eval(x) { x } 
} 
Copyright © 2014 Russel Winder 31
Unit Test Code 
#! /usr/bin/env groovy 
@Grab('org.spockframework:spock-core:0.7-groovy-2.0') 
import spock.lang.Specification 
import spock.lang.Unroll 
class idTest extends Specification { 
@Unroll def 'the id eval function always return the value of the parameter'() { 
given: 
final id = new Id () 
expect: 
id.eval(i) == i 
where: 
i << [0, 1, 2, 3, 's', 'ffff', 2.05] 
} 
} 
Copyright © 2014 Russel Winder 32
Code Under Test 
class Functions { 
static square(x) { x * x } 
} 
Functions.groovy 
Copyright © 2014 Russel Winder 33
Unit Test — Variant 1 
#! /usr/bin/env groovy 
@Grab('org.spockframework:spock-core:0.7-groovy-2.0') 
import spock.lang.Specification 
import spock.lang.Unroll 
class functionsTest_alt_1 extends Specification { 
@Unroll def 'square always returns the square of the numeric parameter'() { 
expect: 
Functions.square(x) == r 
where: 
x << [0, 1, 2, 3, 1.5] 
r << [0, 1, 4, 9, 2.25] 
} 
} 
Copyright © 2014 Russel Winder 34
Unit Test — Variant 2 
#! /usr/bin/env groovy 
@Grab('org.spockframework:spock-core:0.7-groovy-2.0') 
import spock.lang.Specification 
import spock.lang.Unroll 
class functionsTest_alt_1 extends Specification { 
@Unroll def 'square always returns the square of the numeric parameter'() { 
expect: 
Functions.square(x) == r 
where: 
[x, r] << [[0. 0], [1, 1], [2, 4], [3, 9], [1.5, 2.25]] 
} 
} 
Copyright © 2014 Russel Winder 35
#! /usr/bin/env groovy Unit Test — Tabular 
@Grab('org.spockframework:spock-core:0.7-groovy-2.0') 
import spock.lang.Specification 
import spock.lang.Unroll 
class functionsTest_alt_1 extends Specification { 
@Unroll def 'square always returns the square of the numeric parameter'() { 
expect: 
Functions.square(x) == r 
where: 
x | r 
0 | 0 
1 | 1 
2 | 4 
3 | 9 
1.5 | 2.25 
} 
} 
Copyright © 2014 Russel Winder 36
Exceptions 
Copyright © 2014 Russel Winder 37
Copyright © 2014 Russel Winder 38
Code Under Test 
class Exceptional { 
def trySomething() { 
throw new RuntimeException('Stuff happens.') 
} 
} 
Exceptional.groovy 
Copyright © 2014 Russel Winder 39
Unit Test 
#! /usr/bin/env groovy 
@Grab('org.spockframework:spock-core:0.7-groovy-2.0') 
import spock.lang.Specification 
class ExceptionalTest extends Specification { 
def 'trying something always results in an exception'() { 
given: 
final e = new Exceptional () 
when: 
e.trySomething() 
then: 
thrown(RuntimeException) 
} 
} 
Copyright © 2014 Russel Winder 40
Now we can do data validation 
and 
testing of error situations. 
Copyright © 2014 Russel Winder 41
Copyright © 2014 Russel Winder 42
Being More Adventurous 
Copyright © 2014 Russel Winder 43
Copyright © 2014 Russel Winder 44
Spock 
BDD 
sUnit 
TestNG 
JUnit4 
JUnit 
GroovyTestCase 
jBehave 
RSpec 
TDD 
Copyright © 2014 Russel Winder 45
Specify Behaviours – 1/4 
@Grab('org.spockframework:spock-core:0.7-groovy-2.0') 
import spock.lang.Specification 
class StackSpecification extends Specification { 
def 'newly created stacks are empty'() { 
given: 'a newly created stack' 
expect: 'the resulting stack to be empty.' 
} 
Copyright © 2014 Russel Winder 46
Specify Behaviours – 2/4 
def 'removing an item from a non-empty stack gives a value and changes the stack.'() { 
given: 'a new stack' 
and: 'an item to put on the stack' 
when: 'the item is added' 
then: 'the stack is not empty' 
when: 'an item is removed' 
then: 'the item we retrieved is the original and the stack is empty' 
} 
} 
Copyright © 2014 Russel Winder 47
Specify Behaviours – 3/4 
@Grab('org.spockframework:spock-core:0.7-groovy-2.0') 
import spock.lang.Specification 
class StackSpecification extends Specification { 
def 'newly created stacks are empty'() { 
given: 'a newly created stack' 
def stack = new Stack () 
expect: 'the resulting stack to be empty.' 
stack.size() == 0 
} 
Copyright © 2014 Russel Winder 48
Specify Behaviours – 4/4 
def 'removing an item from a non-empty stack gives a value and changes the stack.'() { 
given: 'a new stack' 
def stack = new Stack () 
and: 'an item to put on the stack' 
def item = 25 
and: 'a variable to store the result of activity' 
def result 
when: 'the item is added' 
stack.push(item) 
then: 'the stack is not empty' 
stack.size() == 1 
when: 'an item is removed' 
result = stack.pop() 
then: 'the item we retrieved is the original and the stack is empty' 
result == item && stack.size() == 0 
} 
} 
Copyright © 2014 Russel Winder 49
Copyright © 2014 Russel Winder 50
Closing 
Copyright © 2014 Russel Winder 51
Hopefully everyone has had some fun 
and 
learnt some useful things. 
Copyright © 2014 Russel Winder 52
Copyright © 2014 Russel Winder 53
Copyright © 2014 Russel Winder 54
Copyright © 2014 Russel Winder 55
Copyright © 2014 Russel Winder 56
The End 
Copyright © 2014 Russel Winder 57
Spocktacular Testing 
Russel Winder 
email: russel@winder.org.uk 
xmpp: russel@winder.org.uk 
twitter: @russel_winder 
Web: http://www.russel.org.uk 
Copyright © 2014 Russel Winder 58

More Related Content

What's hot

Spock Testing Framework - The Next Generation
Spock Testing Framework - The Next GenerationSpock Testing Framework - The Next Generation
Spock Testing Framework - The Next GenerationBTI360
 
Unit testing with Spock Framework
Unit testing with Spock FrameworkUnit testing with Spock Framework
Unit testing with Spock FrameworkEugene Dvorkin
 
The Ring programming language version 1.7 book - Part 8 of 196
The Ring programming language version 1.7 book - Part 8 of 196The Ring programming language version 1.7 book - Part 8 of 196
The Ring programming language version 1.7 book - Part 8 of 196Mahmoud Samir Fayed
 
The Ring programming language version 1.4 book - Part 19 of 30
The Ring programming language version 1.4 book - Part 19 of 30The Ring programming language version 1.4 book - Part 19 of 30
The Ring programming language version 1.4 book - Part 19 of 30Mahmoud Samir Fayed
 
Resilence patterns kr
Resilence patterns krResilence patterns kr
Resilence patterns krJisung Ahn
 
PuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of PuppetPuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of PuppetWalter Heck
 
JJUG CCC 2011 Spring
JJUG CCC 2011 SpringJJUG CCC 2011 Spring
JJUG CCC 2011 SpringKiyotaka Oku
 
Oscon Java Testing on the Fast Lane
Oscon Java Testing on the Fast LaneOscon Java Testing on the Fast Lane
Oscon Java Testing on the Fast LaneAndres Almiray
 
The Ring programming language version 1.10 book - Part 13 of 212
The Ring programming language version 1.10 book - Part 13 of 212The Ring programming language version 1.10 book - Part 13 of 212
The Ring programming language version 1.10 book - Part 13 of 212Mahmoud Samir Fayed
 
Слава Бобик «NancyFx для самых маленьких»
Слава Бобик «NancyFx для самых маленьких»Слава Бобик «NancyFx для самых маленьких»
Слава Бобик «NancyFx для самых маленьких»SpbDotNet Community
 
Everything you wanted to know about Stack Traces and Heap Dumps
Everything you wanted to know about Stack Traces and Heap DumpsEverything you wanted to know about Stack Traces and Heap Dumps
Everything you wanted to know about Stack Traces and Heap DumpsAndrei Pangin
 
The Ring programming language version 1.10 book - Part 12 of 212
The Ring programming language version 1.10 book - Part 12 of 212The Ring programming language version 1.10 book - Part 12 of 212
The Ring programming language version 1.10 book - Part 12 of 212Mahmoud Samir Fayed
 
Varnish presentation for the Symfony Zaragoza user group
Varnish presentation for the Symfony Zaragoza user groupVarnish presentation for the Symfony Zaragoza user group
Varnish presentation for the Symfony Zaragoza user groupJorge Nerín
 
Non-blocking synchronization — what is it and why we (don't?) need it
Non-blocking synchronization — what is it and why we (don't?) need itNon-blocking synchronization — what is it and why we (don't?) need it
Non-blocking synchronization — what is it and why we (don't?) need itAlexey Fyodorov
 
The Ring programming language version 1.7 book - Part 92 of 196
The Ring programming language version 1.7 book - Part 92 of 196The Ring programming language version 1.7 book - Part 92 of 196
The Ring programming language version 1.7 book - Part 92 of 196Mahmoud Samir Fayed
 
Deterministic simulation testing
Deterministic simulation testingDeterministic simulation testing
Deterministic simulation testingFoundationDB
 

What's hot (20)

Gradle Introduction
Gradle IntroductionGradle Introduction
Gradle Introduction
 
Spock Testing Framework - The Next Generation
Spock Testing Framework - The Next GenerationSpock Testing Framework - The Next Generation
Spock Testing Framework - The Next Generation
 
Unit testing with Spock Framework
Unit testing with Spock FrameworkUnit testing with Spock Framework
Unit testing with Spock Framework
 
The Ring programming language version 1.7 book - Part 8 of 196
The Ring programming language version 1.7 book - Part 8 of 196The Ring programming language version 1.7 book - Part 8 of 196
The Ring programming language version 1.7 book - Part 8 of 196
 
The Ring programming language version 1.4 book - Part 19 of 30
The Ring programming language version 1.4 book - Part 19 of 30The Ring programming language version 1.4 book - Part 19 of 30
The Ring programming language version 1.4 book - Part 19 of 30
 
Resilence patterns kr
Resilence patterns krResilence patterns kr
Resilence patterns kr
 
PuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of PuppetPuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of Puppet
 
JJUG CCC 2011 Spring
JJUG CCC 2011 SpringJJUG CCC 2011 Spring
JJUG CCC 2011 Spring
 
Oscon Java Testing on the Fast Lane
Oscon Java Testing on the Fast LaneOscon Java Testing on the Fast Lane
Oscon Java Testing on the Fast Lane
 
The Ring programming language version 1.10 book - Part 13 of 212
The Ring programming language version 1.10 book - Part 13 of 212The Ring programming language version 1.10 book - Part 13 of 212
The Ring programming language version 1.10 book - Part 13 of 212
 
Слава Бобик «NancyFx для самых маленьких»
Слава Бобик «NancyFx для самых маленьких»Слава Бобик «NancyFx для самых маленьких»
Слава Бобик «NancyFx для самых маленьких»
 
Everything you wanted to know about Stack Traces and Heap Dumps
Everything you wanted to know about Stack Traces and Heap DumpsEverything you wanted to know about Stack Traces and Heap Dumps
Everything you wanted to know about Stack Traces and Heap Dumps
 
Apache ZooKeeper
Apache ZooKeeperApache ZooKeeper
Apache ZooKeeper
 
The Ring programming language version 1.10 book - Part 12 of 212
The Ring programming language version 1.10 book - Part 12 of 212The Ring programming language version 1.10 book - Part 12 of 212
The Ring programming language version 1.10 book - Part 12 of 212
 
Tugas 2
Tugas 2Tugas 2
Tugas 2
 
Varnish presentation for the Symfony Zaragoza user group
Varnish presentation for the Symfony Zaragoza user groupVarnish presentation for the Symfony Zaragoza user group
Varnish presentation for the Symfony Zaragoza user group
 
Testing with PostgreSQL
Testing with PostgreSQLTesting with PostgreSQL
Testing with PostgreSQL
 
Non-blocking synchronization — what is it and why we (don't?) need it
Non-blocking synchronization — what is it and why we (don't?) need itNon-blocking synchronization — what is it and why we (don't?) need it
Non-blocking synchronization — what is it and why we (don't?) need it
 
The Ring programming language version 1.7 book - Part 92 of 196
The Ring programming language version 1.7 book - Part 92 of 196The Ring programming language version 1.7 book - Part 92 of 196
The Ring programming language version 1.7 book - Part 92 of 196
 
Deterministic simulation testing
Deterministic simulation testingDeterministic simulation testing
Deterministic simulation testing
 

Similar to Spocktacular Testing - Russel Winder

Effective testing for spark programs Strata NY 2015
Effective testing for spark programs   Strata NY 2015Effective testing for spark programs   Strata NY 2015
Effective testing for spark programs Strata NY 2015Holden Karau
 
Gradleintroduction 111010130329-phpapp01
Gradleintroduction 111010130329-phpapp01Gradleintroduction 111010130329-phpapp01
Gradleintroduction 111010130329-phpapp01Tino Isnich
 
Construire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradleConstruire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradleThierry Wasylczenko
 
Spock: A Highly Logical Way To Test
Spock: A Highly Logical Way To TestSpock: A Highly Logical Way To Test
Spock: A Highly Logical Way To TestHoward Lewis Ship
 
Cool JVM Tools to Help You Test
Cool JVM Tools to Help You TestCool JVM Tools to Help You Test
Cool JVM Tools to Help You TestSchalk Cronjé
 
10 Cool Facts about Gradle
10 Cool Facts about Gradle10 Cool Facts about Gradle
10 Cool Facts about GradleEvgeny Goldin
 
Refactoring In Tdd The Missing Part
Refactoring In Tdd The Missing PartRefactoring In Tdd The Missing Part
Refactoring In Tdd The Missing PartGabriele Lana
 
The Groovy Way of Testing with Spock
The Groovy Way of Testing with SpockThe Groovy Way of Testing with Spock
The Groovy Way of Testing with SpockNaresha K
 
Unit testing in iOS featuring OCUnit, GHUnit & OCMock
Unit testing in iOS featuring OCUnit, GHUnit & OCMockUnit testing in iOS featuring OCUnit, GHUnit & OCMock
Unit testing in iOS featuring OCUnit, GHUnit & OCMockRobot Media
 
Jggug 2010 330 Grails 1.3 観察
Jggug 2010 330 Grails 1.3 観察Jggug 2010 330 Grails 1.3 観察
Jggug 2010 330 Grails 1.3 観察Tsuyoshi Yamamoto
 
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...Paul King
 
Atlassian Groovy Plugins
Atlassian Groovy PluginsAtlassian Groovy Plugins
Atlassian Groovy PluginsPaul King
 
Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)Soshi Nemoto
 
Commencer avec le TDD
Commencer avec le TDDCommencer avec le TDD
Commencer avec le TDDEric Hogue
 

Similar to Spocktacular Testing - Russel Winder (20)

Agile Swift
Agile SwiftAgile Swift
Agile Swift
 
Effective testing for spark programs Strata NY 2015
Effective testing for spark programs   Strata NY 2015Effective testing for spark programs   Strata NY 2015
Effective testing for spark programs Strata NY 2015
 
Gradleintroduction 111010130329-phpapp01
Gradleintroduction 111010130329-phpapp01Gradleintroduction 111010130329-phpapp01
Gradleintroduction 111010130329-phpapp01
 
Construire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradleConstruire une application JavaFX 8 avec gradle
Construire une application JavaFX 8 avec gradle
 
Unit testing
Unit testingUnit testing
Unit testing
 
Unit Testing with Foq
Unit Testing with FoqUnit Testing with Foq
Unit Testing with Foq
 
Spock: A Highly Logical Way To Test
Spock: A Highly Logical Way To TestSpock: A Highly Logical Way To Test
Spock: A Highly Logical Way To Test
 
Cool JVM Tools to Help You Test
Cool JVM Tools to Help You TestCool JVM Tools to Help You Test
Cool JVM Tools to Help You Test
 
10 Cool Facts about Gradle
10 Cool Facts about Gradle10 Cool Facts about Gradle
10 Cool Facts about Gradle
 
Refactoring In Tdd The Missing Part
Refactoring In Tdd The Missing PartRefactoring In Tdd The Missing Part
Refactoring In Tdd The Missing Part
 
The Groovy Way of Testing with Spock
The Groovy Way of Testing with SpockThe Groovy Way of Testing with Spock
The Groovy Way of Testing with Spock
 
Unit testing in iOS featuring OCUnit, GHUnit & OCMock
Unit testing in iOS featuring OCUnit, GHUnit & OCMockUnit testing in iOS featuring OCUnit, GHUnit & OCMock
Unit testing in iOS featuring OCUnit, GHUnit & OCMock
 
Python testing
Python  testingPython  testing
Python testing
 
Jggug 2010 330 Grails 1.3 観察
Jggug 2010 330 Grails 1.3 観察Jggug 2010 330 Grails 1.3 観察
Jggug 2010 330 Grails 1.3 観察
 
Tdd & unit test
Tdd & unit testTdd & unit test
Tdd & unit test
 
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...
 
Atlassian Groovy Plugins
Atlassian Groovy PluginsAtlassian Groovy Plugins
Atlassian Groovy Plugins
 
Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)
 
Commencer avec le TDD
Commencer avec le TDDCommencer avec le TDD
Commencer avec le TDD
 
JRuby hacking guide
JRuby hacking guideJRuby hacking guide
JRuby hacking guide
 

More from JAXLondon2014

GridGain 6.0: Open Source In-Memory Computing Platform - Nikita Ivanov
GridGain 6.0: Open Source In-Memory Computing Platform - Nikita IvanovGridGain 6.0: Open Source In-Memory Computing Platform - Nikita Ivanov
GridGain 6.0: Open Source In-Memory Computing Platform - Nikita IvanovJAXLondon2014
 
Performance Metrics for your Delivery Pipeline - Wolfgang Gottesheim
Performance Metrics for your Delivery Pipeline - Wolfgang GottesheimPerformance Metrics for your Delivery Pipeline - Wolfgang Gottesheim
Performance Metrics for your Delivery Pipeline - Wolfgang GottesheimJAXLondon2014
 
How to randomly access data in close-to-RAM speeds but a lower cost with SSD’...
How to randomly access data in close-to-RAM speeds but a lower cost with SSD’...How to randomly access data in close-to-RAM speeds but a lower cost with SSD’...
How to randomly access data in close-to-RAM speeds but a lower cost with SSD’...JAXLondon2014
 
Conditional Logging Considered Harmful - Sean Reilly
Conditional Logging Considered Harmful - Sean ReillyConditional Logging Considered Harmful - Sean Reilly
Conditional Logging Considered Harmful - Sean ReillyJAXLondon2014
 
Finding your Way in the Midst of the NoSQL Haze - Abdelmonaim Remani
Finding your Way in the Midst of the NoSQL Haze - Abdelmonaim RemaniFinding your Way in the Midst of the NoSQL Haze - Abdelmonaim Remani
Finding your Way in the Midst of the NoSQL Haze - Abdelmonaim RemaniJAXLondon2014
 
API Management - a hands on workshop - Paul Fremantle
API Management - a hands on workshop - Paul FremantleAPI Management - a hands on workshop - Paul Fremantle
API Management - a hands on workshop - Paul FremantleJAXLondon2014
 
'Bootiful' Code with Spring Boot - Josh Long
'Bootiful' Code with Spring Boot - Josh Long'Bootiful' Code with Spring Boot - Josh Long
'Bootiful' Code with Spring Boot - Josh LongJAXLondon2014
 
The Full Stack Java Developer - Josh Long
The Full Stack Java Developer - Josh LongThe Full Stack Java Developer - Josh Long
The Full Stack Java Developer - Josh LongJAXLondon2014
 
The Economies of Scaling Software - Josh Long and Abdelmonaim Remani
The Economies of Scaling Software - Josh Long and Abdelmonaim RemaniThe Economies of Scaling Software - Josh Long and Abdelmonaim Remani
The Economies of Scaling Software - Josh Long and Abdelmonaim RemaniJAXLondon2014
 
Dataflow, the Forgotten Way - Russel Winder
Dataflow, the Forgotten Way - Russel WinderDataflow, the Forgotten Way - Russel Winder
Dataflow, the Forgotten Way - Russel WinderJAXLondon2014
 
Habits of Highly Effective Technical Teams - Martijn Verburg
Habits of Highly Effective Technical Teams - Martijn VerburgHabits of Highly Effective Technical Teams - Martijn Verburg
Habits of Highly Effective Technical Teams - Martijn VerburgJAXLondon2014
 
The Lazy Developer's Guide to Cloud Foundry - Holly Cummins
The Lazy Developer's Guide to Cloud Foundry - Holly CumminsThe Lazy Developer's Guide to Cloud Foundry - Holly Cummins
The Lazy Developer's Guide to Cloud Foundry - Holly CumminsJAXLondon2014
 
Testing within an Agile Environment - Beyza Sakir and Chris Gollop
Testing within an Agile Environment - Beyza Sakir and Chris GollopTesting within an Agile Environment - Beyza Sakir and Chris Gollop
Testing within an Agile Environment - Beyza Sakir and Chris GollopJAXLondon2014
 
Testing the Enterprise Layers - the A, B, C's of Integration Testing - Aslak ...
Testing the Enterprise Layers - the A, B, C's of Integration Testing - Aslak ...Testing the Enterprise Layers - the A, B, C's of Integration Testing - Aslak ...
Testing the Enterprise Layers - the A, B, C's of Integration Testing - Aslak ...JAXLondon2014
 
Squeezing Performance of out of In-Memory Data Grids - Fuad Malikov
Squeezing Performance of out of In-Memory Data Grids - Fuad MalikovSqueezing Performance of out of In-Memory Data Grids - Fuad Malikov
Squeezing Performance of out of In-Memory Data Grids - Fuad MalikovJAXLondon2014
 
Server Side JavaScript on the Java Platform - David Delabassee
Server Side JavaScript on the Java Platform - David DelabasseeServer Side JavaScript on the Java Platform - David Delabassee
Server Side JavaScript on the Java Platform - David DelabasseeJAXLondon2014
 
Reflection Madness - Dr. Heinz Kabutz
Reflection Madness - Dr. Heinz KabutzReflection Madness - Dr. Heinz Kabutz
Reflection Madness - Dr. Heinz KabutzJAXLondon2014
 
Rapid Web Application Development with MongoDB and the JVM - Trisha Gee
Rapid Web Application Development with MongoDB and the JVM - Trisha GeeRapid Web Application Development with MongoDB and the JVM - Trisha Gee
Rapid Web Application Development with MongoDB and the JVM - Trisha GeeJAXLondon2014
 
Pushing Java EE outside of the Enterprise: Home Automation and IoT - David De...
Pushing Java EE outside of the Enterprise: Home Automation and IoT - David De...Pushing Java EE outside of the Enterprise: Home Automation and IoT - David De...
Pushing Java EE outside of the Enterprise: Home Automation and IoT - David De...JAXLondon2014
 
Personal Retrospectives - Johannes Thönes
Personal Retrospectives - Johannes ThönesPersonal Retrospectives - Johannes Thönes
Personal Retrospectives - Johannes ThönesJAXLondon2014
 

More from JAXLondon2014 (20)

GridGain 6.0: Open Source In-Memory Computing Platform - Nikita Ivanov
GridGain 6.0: Open Source In-Memory Computing Platform - Nikita IvanovGridGain 6.0: Open Source In-Memory Computing Platform - Nikita Ivanov
GridGain 6.0: Open Source In-Memory Computing Platform - Nikita Ivanov
 
Performance Metrics for your Delivery Pipeline - Wolfgang Gottesheim
Performance Metrics for your Delivery Pipeline - Wolfgang GottesheimPerformance Metrics for your Delivery Pipeline - Wolfgang Gottesheim
Performance Metrics for your Delivery Pipeline - Wolfgang Gottesheim
 
How to randomly access data in close-to-RAM speeds but a lower cost with SSD’...
How to randomly access data in close-to-RAM speeds but a lower cost with SSD’...How to randomly access data in close-to-RAM speeds but a lower cost with SSD’...
How to randomly access data in close-to-RAM speeds but a lower cost with SSD’...
 
Conditional Logging Considered Harmful - Sean Reilly
Conditional Logging Considered Harmful - Sean ReillyConditional Logging Considered Harmful - Sean Reilly
Conditional Logging Considered Harmful - Sean Reilly
 
Finding your Way in the Midst of the NoSQL Haze - Abdelmonaim Remani
Finding your Way in the Midst of the NoSQL Haze - Abdelmonaim RemaniFinding your Way in the Midst of the NoSQL Haze - Abdelmonaim Remani
Finding your Way in the Midst of the NoSQL Haze - Abdelmonaim Remani
 
API Management - a hands on workshop - Paul Fremantle
API Management - a hands on workshop - Paul FremantleAPI Management - a hands on workshop - Paul Fremantle
API Management - a hands on workshop - Paul Fremantle
 
'Bootiful' Code with Spring Boot - Josh Long
'Bootiful' Code with Spring Boot - Josh Long'Bootiful' Code with Spring Boot - Josh Long
'Bootiful' Code with Spring Boot - Josh Long
 
The Full Stack Java Developer - Josh Long
The Full Stack Java Developer - Josh LongThe Full Stack Java Developer - Josh Long
The Full Stack Java Developer - Josh Long
 
The Economies of Scaling Software - Josh Long and Abdelmonaim Remani
The Economies of Scaling Software - Josh Long and Abdelmonaim RemaniThe Economies of Scaling Software - Josh Long and Abdelmonaim Remani
The Economies of Scaling Software - Josh Long and Abdelmonaim Remani
 
Dataflow, the Forgotten Way - Russel Winder
Dataflow, the Forgotten Way - Russel WinderDataflow, the Forgotten Way - Russel Winder
Dataflow, the Forgotten Way - Russel Winder
 
Habits of Highly Effective Technical Teams - Martijn Verburg
Habits of Highly Effective Technical Teams - Martijn VerburgHabits of Highly Effective Technical Teams - Martijn Verburg
Habits of Highly Effective Technical Teams - Martijn Verburg
 
The Lazy Developer's Guide to Cloud Foundry - Holly Cummins
The Lazy Developer's Guide to Cloud Foundry - Holly CumminsThe Lazy Developer's Guide to Cloud Foundry - Holly Cummins
The Lazy Developer's Guide to Cloud Foundry - Holly Cummins
 
Testing within an Agile Environment - Beyza Sakir and Chris Gollop
Testing within an Agile Environment - Beyza Sakir and Chris GollopTesting within an Agile Environment - Beyza Sakir and Chris Gollop
Testing within an Agile Environment - Beyza Sakir and Chris Gollop
 
Testing the Enterprise Layers - the A, B, C's of Integration Testing - Aslak ...
Testing the Enterprise Layers - the A, B, C's of Integration Testing - Aslak ...Testing the Enterprise Layers - the A, B, C's of Integration Testing - Aslak ...
Testing the Enterprise Layers - the A, B, C's of Integration Testing - Aslak ...
 
Squeezing Performance of out of In-Memory Data Grids - Fuad Malikov
Squeezing Performance of out of In-Memory Data Grids - Fuad MalikovSqueezing Performance of out of In-Memory Data Grids - Fuad Malikov
Squeezing Performance of out of In-Memory Data Grids - Fuad Malikov
 
Server Side JavaScript on the Java Platform - David Delabassee
Server Side JavaScript on the Java Platform - David DelabasseeServer Side JavaScript on the Java Platform - David Delabassee
Server Side JavaScript on the Java Platform - David Delabassee
 
Reflection Madness - Dr. Heinz Kabutz
Reflection Madness - Dr. Heinz KabutzReflection Madness - Dr. Heinz Kabutz
Reflection Madness - Dr. Heinz Kabutz
 
Rapid Web Application Development with MongoDB and the JVM - Trisha Gee
Rapid Web Application Development with MongoDB and the JVM - Trisha GeeRapid Web Application Development with MongoDB and the JVM - Trisha Gee
Rapid Web Application Development with MongoDB and the JVM - Trisha Gee
 
Pushing Java EE outside of the Enterprise: Home Automation and IoT - David De...
Pushing Java EE outside of the Enterprise: Home Automation and IoT - David De...Pushing Java EE outside of the Enterprise: Home Automation and IoT - David De...
Pushing Java EE outside of the Enterprise: Home Automation and IoT - David De...
 
Personal Retrospectives - Johannes Thönes
Personal Retrospectives - Johannes ThönesPersonal Retrospectives - Johannes Thönes
Personal Retrospectives - Johannes Thönes
 

Recently uploaded

Microsoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AIMicrosoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AITatiana Gurgel
 
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...NETWAYS
 
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdf
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdfCTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdf
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdfhenrik385807
 
Simulation-based Testing of Unmanned Aerial Vehicles with Aerialist
Simulation-based Testing of Unmanned Aerial Vehicles with AerialistSimulation-based Testing of Unmanned Aerial Vehicles with Aerialist
Simulation-based Testing of Unmanned Aerial Vehicles with AerialistSebastiano Panichella
 
Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdfOpen Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdfhenrik385807
 
Genesis part 2 Isaiah Scudder 04-24-2024.pptx
Genesis part 2 Isaiah Scudder 04-24-2024.pptxGenesis part 2 Isaiah Scudder 04-24-2024.pptx
Genesis part 2 Isaiah Scudder 04-24-2024.pptxFamilyWorshipCenterD
 
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...NETWAYS
 
Philippine History cavite Mutiny Report.ppt
Philippine History cavite Mutiny Report.pptPhilippine History cavite Mutiny Report.ppt
Philippine History cavite Mutiny Report.pptssuser319dad
 
SBFT Tool Competition 2024 -- Python Test Case Generation Track
SBFT Tool Competition 2024 -- Python Test Case Generation TrackSBFT Tool Competition 2024 -- Python Test Case Generation Track
SBFT Tool Competition 2024 -- Python Test Case Generation TrackSebastiano Panichella
 
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...Salam Al-Karadaghi
 
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...henrik385807
 
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...Krijn Poppe
 
The 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software EngineeringThe 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software EngineeringSebastiano Panichella
 
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...NETWAYS
 
Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝
Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝
Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝soniya singh
 
call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@vikas rana
 
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...NETWAYS
 
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...Pooja Nehwal
 
NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)
NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)
NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)Basil Achie
 

Recently uploaded (20)

Microsoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AIMicrosoft Copilot AI for Everyone - created by AI
Microsoft Copilot AI for Everyone - created by AI
 
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
Open Source Camp Kubernetes 2024 | Running WebAssembly on Kubernetes by Alex ...
 
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdf
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdfCTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdf
CTAC 2024 Valencia - Henrik Hanke - Reduce to the max - slideshare.pdf
 
Simulation-based Testing of Unmanned Aerial Vehicles with Aerialist
Simulation-based Testing of Unmanned Aerial Vehicles with AerialistSimulation-based Testing of Unmanned Aerial Vehicles with Aerialist
Simulation-based Testing of Unmanned Aerial Vehicles with Aerialist
 
Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Rohini Delhi 💯Call Us 🔝8264348440🔝
 
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdfOpen Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
Open Source Strategy in Logistics 2015_Henrik Hankedvz-d-nl-log-conference.pdf
 
Genesis part 2 Isaiah Scudder 04-24-2024.pptx
Genesis part 2 Isaiah Scudder 04-24-2024.pptxGenesis part 2 Isaiah Scudder 04-24-2024.pptx
Genesis part 2 Isaiah Scudder 04-24-2024.pptx
 
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
OSCamp Kubernetes 2024 | Zero-Touch OS-Infrastruktur für Container und Kubern...
 
Philippine History cavite Mutiny Report.ppt
Philippine History cavite Mutiny Report.pptPhilippine History cavite Mutiny Report.ppt
Philippine History cavite Mutiny Report.ppt
 
SBFT Tool Competition 2024 -- Python Test Case Generation Track
SBFT Tool Competition 2024 -- Python Test Case Generation TrackSBFT Tool Competition 2024 -- Python Test Case Generation Track
SBFT Tool Competition 2024 -- Python Test Case Generation Track
 
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
Exploring protein-protein interactions by Weak Affinity Chromatography (WAC) ...
 
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
CTAC 2024 Valencia - Sven Zoelle - Most Crucial Invest to Digitalisation_slid...
 
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
Presentation for the Strategic Dialogue on the Future of Agriculture, Brussel...
 
The 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software EngineeringThe 3rd Intl. Workshop on NL-based Software Engineering
The 3rd Intl. Workshop on NL-based Software Engineering
 
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
OSCamp Kubernetes 2024 | SRE Challenges in Monolith to Microservices Shift at...
 
Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝
Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝
Call Girls in Sarojini Nagar Market Delhi 💯 Call Us 🔝8264348440🔝
 
call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@call girls in delhi malviya nagar @9811711561@
call girls in delhi malviya nagar @9811711561@
 
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...
Open Source Camp Kubernetes 2024 | Monitoring Kubernetes With Icinga by Eric ...
 
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
Navi Mumbai Call Girls Service Pooja 9892124323 Real Russian Girls Looking Mo...
 
NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)
NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)
NATIONAL ANTHEMS OF AFRICA (National Anthems of Africa)
 

Spocktacular Testing - Russel Winder

  • 1. Spocktacular Testing Russel Winder email: russel@winder.org.uk xmpp: russel@winder.org.uk twitter: @russel_winder Web: http://www.russel.org.uk Copyright © 2014 Russel Winder 1
  • 2. Opening Copyright © 2014 Russel Winder 2
  • 3. Copyright © 2014 Russel Winder 3
  • 4. An Historical Perspective Copyright © 2014 Russel Winder 4
  • 5. Spock BDD jBehave sUnit TestNG JUnit4 JUnit GroovyTestCase RSpec TDD Copyright © 2014 Russel Winder 5
  • 6. Spock is Groovy-based… …but can test any JVM-based code. Copyright © 2014 Russel Winder 6
  • 7. NB Testing frameworks support integration and system testing as well as unit testing. Copyright © 2014 Russel Winder 7
  • 8. Copyright © 2014 Russel Winder 8
  • 9. Testing ● Unit: ● Test the classes, functions and methods to ensure they do what we need them to. ● As lightweight and fast as possible. ● Run all tests always. ● Integration and system: ● Test combinations or the whole thing to make sure the functionality is as required. ● Separate process to create a “sandbox”. ● If cannot run all tests always, create smoke tests. Copyright © 2014 Russel Winder 9
  • 10. Code Under Test static message() { 'Hello World.' } println message() helloWorld.groovy Copyright © 2014 Russel Winder 10
  • 11. Unit Test @Grab('org.spockframework:spock-core:0.7-groovy-2.0') import spock.lang.Specification import helloWorld class Test_HelloWorld extends Specification { def 'ensure the message function returns hello world'() { expect: helloWorld.message() == 'Hello World.' } } Copyright © 2014 Russel Winder 11
  • 12. System Test @Grab('org.spockframework:spock-core:0.7-groovy-2.0') import spock.lang.Specification class Test_HelloWorld extends Specification { def 'executing the script results in hello world on the standard output'() { given: def process = 'helloWorld.groovy'.execute() expect: process.waitFor() == 0 process.in.text == 'Hello World.n' } } Copyright © 2014 Russel Winder 12
  • 13. A bit less Groovy… Copyright © 2014 Russel Winder 13
  • 14. Code under Test package uk.org.winder.spockworkshop; class HelloWorld { private static String message() { return "Hello World."; } public static void main(final String[] args) { System.out.println(message()); } } HelloWorld.java Copyright © 2014 Russel Winder 14
  • 15. Unit Test package uk.org.winder.spockworkshop import spock.lang.Specification class Test_HelloWorld extends Specification { def 'ensure the message function returns hello world'() { expect: HelloWorld.message() == 'Hello World.' } } Copyright © 2014 Russel Winder 15
  • 16. Project Structure . ├── build.gradle └── src ├── main │ └── java │ └── uk │ └── org │ └── winder │ └── spockworkshop │ └─- HelloWorld.java └── test └── groovy └── uk └── org └── winder └── spockworkshop └── unitTest_helloWorld.groovy Copyright © 2014 Russel Winder 16
  • 17. Build — Gradle apply plugin: 'groovy' apply plugin: 'application' repositories { mavenCentral() } dependencies { testCompile 'org.spockframework:spock-core:0.7-groovy-2.0' } mainClassName = 'uk.org.winder.spockworkshop.HelloWorld' Copyright © 2014 Russel Winder 17
  • 18. Copyright © 2014 Russel Winder 18
  • 19. Moving On Copyright © 2014 Russel Winder 19
  • 20. Copyright © 2014 Russel Winder 20
  • 21. Spock Test Structure Copyright © 2014 Russel Winder 21
  • 22. given: Copyright © 2014 Russel Winder 22
  • 23. Code Under Test static message() { 'Hello World.' } println message() helloWorld.groovy Copyright © 2014 Russel Winder 23
  • 24. Unit Test @Grab('org.spockframework:spock-core:0.7-groovy-2.0') import spock.lang.Specification import helloWorld class Test_HelloWorld extends Specification { def 'ensure the message function returns hello world'() { expect: helloWorld.message() == 'Hello World.' } } Copyright © 2014 Russel Winder 24
  • 25. Another Code Under Test class Stuff { private final data = [] def leftShift(datum) { data << datum } } Stuff.groovy Copyright © 2014 Russel Winder 25
  • 26. @Grab('org.spockframework:spock-core:0.7-groovy-2.0') import spock.lang.Specification import Stuff class TestStuff extends Specification { def 'check stuff'() { given: def stuff = new Stuff() expect: stuff.data == [] when: stuff << 6 then: stuff.data == [6] when: stuff << 6 then: stuff.data == [6, 6] } Unit Testing It def 'check other stuff'() { given: def stuff = new Stuff() expect: stuff.data == [] when: stuff.leftShift(6) then: stuff.data == [6] when: stuff.leftShift(6) then: stuff.data == [6, 6] } } Copyright © 2014 Russel Winder 26
  • 27. Copyright © 2014 Russel Winder 27
  • 28. Data-driven Testing Copyright © 2014 Russel Winder 28
  • 29. Copyright © 2014 Russel Winder 29
  • 30. given: Copyright © 2014 Russel Winder 30
  • 31. Code Under Test Id.groovy class Id { def eval(x) { x } } Copyright © 2014 Russel Winder 31
  • 32. Unit Test Code #! /usr/bin/env groovy @Grab('org.spockframework:spock-core:0.7-groovy-2.0') import spock.lang.Specification import spock.lang.Unroll class idTest extends Specification { @Unroll def 'the id eval function always return the value of the parameter'() { given: final id = new Id () expect: id.eval(i) == i where: i << [0, 1, 2, 3, 's', 'ffff', 2.05] } } Copyright © 2014 Russel Winder 32
  • 33. Code Under Test class Functions { static square(x) { x * x } } Functions.groovy Copyright © 2014 Russel Winder 33
  • 34. Unit Test — Variant 1 #! /usr/bin/env groovy @Grab('org.spockframework:spock-core:0.7-groovy-2.0') import spock.lang.Specification import spock.lang.Unroll class functionsTest_alt_1 extends Specification { @Unroll def 'square always returns the square of the numeric parameter'() { expect: Functions.square(x) == r where: x << [0, 1, 2, 3, 1.5] r << [0, 1, 4, 9, 2.25] } } Copyright © 2014 Russel Winder 34
  • 35. Unit Test — Variant 2 #! /usr/bin/env groovy @Grab('org.spockframework:spock-core:0.7-groovy-2.0') import spock.lang.Specification import spock.lang.Unroll class functionsTest_alt_1 extends Specification { @Unroll def 'square always returns the square of the numeric parameter'() { expect: Functions.square(x) == r where: [x, r] << [[0. 0], [1, 1], [2, 4], [3, 9], [1.5, 2.25]] } } Copyright © 2014 Russel Winder 35
  • 36. #! /usr/bin/env groovy Unit Test — Tabular @Grab('org.spockframework:spock-core:0.7-groovy-2.0') import spock.lang.Specification import spock.lang.Unroll class functionsTest_alt_1 extends Specification { @Unroll def 'square always returns the square of the numeric parameter'() { expect: Functions.square(x) == r where: x | r 0 | 0 1 | 1 2 | 4 3 | 9 1.5 | 2.25 } } Copyright © 2014 Russel Winder 36
  • 37. Exceptions Copyright © 2014 Russel Winder 37
  • 38. Copyright © 2014 Russel Winder 38
  • 39. Code Under Test class Exceptional { def trySomething() { throw new RuntimeException('Stuff happens.') } } Exceptional.groovy Copyright © 2014 Russel Winder 39
  • 40. Unit Test #! /usr/bin/env groovy @Grab('org.spockframework:spock-core:0.7-groovy-2.0') import spock.lang.Specification class ExceptionalTest extends Specification { def 'trying something always results in an exception'() { given: final e = new Exceptional () when: e.trySomething() then: thrown(RuntimeException) } } Copyright © 2014 Russel Winder 40
  • 41. Now we can do data validation and testing of error situations. Copyright © 2014 Russel Winder 41
  • 42. Copyright © 2014 Russel Winder 42
  • 43. Being More Adventurous Copyright © 2014 Russel Winder 43
  • 44. Copyright © 2014 Russel Winder 44
  • 45. Spock BDD sUnit TestNG JUnit4 JUnit GroovyTestCase jBehave RSpec TDD Copyright © 2014 Russel Winder 45
  • 46. Specify Behaviours – 1/4 @Grab('org.spockframework:spock-core:0.7-groovy-2.0') import spock.lang.Specification class StackSpecification extends Specification { def 'newly created stacks are empty'() { given: 'a newly created stack' expect: 'the resulting stack to be empty.' } Copyright © 2014 Russel Winder 46
  • 47. Specify Behaviours – 2/4 def 'removing an item from a non-empty stack gives a value and changes the stack.'() { given: 'a new stack' and: 'an item to put on the stack' when: 'the item is added' then: 'the stack is not empty' when: 'an item is removed' then: 'the item we retrieved is the original and the stack is empty' } } Copyright © 2014 Russel Winder 47
  • 48. Specify Behaviours – 3/4 @Grab('org.spockframework:spock-core:0.7-groovy-2.0') import spock.lang.Specification class StackSpecification extends Specification { def 'newly created stacks are empty'() { given: 'a newly created stack' def stack = new Stack () expect: 'the resulting stack to be empty.' stack.size() == 0 } Copyright © 2014 Russel Winder 48
  • 49. Specify Behaviours – 4/4 def 'removing an item from a non-empty stack gives a value and changes the stack.'() { given: 'a new stack' def stack = new Stack () and: 'an item to put on the stack' def item = 25 and: 'a variable to store the result of activity' def result when: 'the item is added' stack.push(item) then: 'the stack is not empty' stack.size() == 1 when: 'an item is removed' result = stack.pop() then: 'the item we retrieved is the original and the stack is empty' result == item && stack.size() == 0 } } Copyright © 2014 Russel Winder 49
  • 50. Copyright © 2014 Russel Winder 50
  • 51. Closing Copyright © 2014 Russel Winder 51
  • 52. Hopefully everyone has had some fun and learnt some useful things. Copyright © 2014 Russel Winder 52
  • 53. Copyright © 2014 Russel Winder 53
  • 54. Copyright © 2014 Russel Winder 54
  • 55. Copyright © 2014 Russel Winder 55
  • 56. Copyright © 2014 Russel Winder 56
  • 57. The End Copyright © 2014 Russel Winder 57
  • 58. Spocktacular Testing Russel Winder email: russel@winder.org.uk xmpp: russel@winder.org.uk twitter: @russel_winder Web: http://www.russel.org.uk Copyright © 2014 Russel Winder 58