testtube.HttpTest

HttpTest extends Test to make it easier to write unit tests for http based services.

Class

class testtube.HttpTest()

extends: Test

Properties

baseUrl
string
Default undefined
Description Used as the base for all relative URLs in the test suite.
tests
Array
Default []
Description Unlike testtube.Test.tests, testtube.HttpTest.tests may contain non-Test based objects that are used as shorthand for writing tests that will be issuing http requests and validating the corresponding responses. These other objects should have at least two properties: reqSpec and resSpec. At runtime, valid Test objects will be constructed and executed based on these specs (see: HttpTest guide for more information).

Example