Skip to content

Groovy Framework For Functional Testing Rest Services

Notifications You must be signed in to change notification settings

jcttrll/green-tea-test

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Green Tea Test

A Groovy framework for functional testing rest services. Intended to help you relax while you REST.

Code Samples

Note: Please review the tests for a comprehensive look at the usage.

new Tea('http://httpbin.org')
.get('/get')
.expectStatus(200)
.verifyResponse { json ->
	assert "http://httpbin.org/get" == json.url
}
.brew()

new Tea('http://httpbin.org')
.post('/post', ["name":"Value"])
.expectStatus(200)
.verifyResponse { json ->
	assert json.json.name == "Value"
}
.brew()

new Tea('http://httpbin.org')
.put("/put", ["name":"Value"])
.expectStatus(200)
.verifyResponse { json ->
	assert json.json.name == "Value"
}

new Tea('http://httpbin.org')
.delete("/delete",  ["$expectedKey":expectedValue])
.expectStatus(200)
.verifyResponse { json ->
	assert expectedValue == json.args."$expectedKey"
}
.brew()

Installation

Green-Tea-Test is deployed to Maven Central Repository

testCompile group: 'com.greenmoonsoftware', name: 'green-tea-test', version: '1.0.2'

About

Groovy Framework For Functional Testing Rest Services

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Groovy 100.0%