testtube.HttpTestHistory¶
HttpTestHistory
manages http
request and response history for a HttpTest
.
Class¶
-
class
testtube.
HttpTestHistory
()
Methods¶
- ¶
addReqSpec Arguments - name (
string
) – a handle that can later be used to retrieve thereqSpec
- reqSpec (
object
) – thereqSpec
to record
Description Add a reqSpec
to the history.- name (
- ¶
addResSpec Arguments - name (
string
) – a handle that can later be used to retrieve theresSpec
- resSpec (
object
) – theresSpec
to record
Description Add a resSpec
to the history.- name (
- ¶
addReq Arguments - name (
string
) – a handle that can later be used to retrieve thereq
- req (
object
) – thereq
to record
Description Add a req
to the history.- name (
- ¶
addRes Arguments - name (
string
) – a handle that can later be used to retrieve theres
- req (
object
) – theres
to record
Description Add a res
to the history.- name (
- ¶
getReqSpec Arguments - index (
string
|integer
) – the index of thereqSpec
to retrieve
Returns reqSpec
Raises RangeError
Description Retrieve the reqSpec
atindex
, where index can be a test name, a negativeinteger
to walk backward from the current request/response cycle, or a positiveinteger
to walk forward from the beginning of the test suite.- index (
- ¶
getResSpec Arguments - index (
string
|integer
) – the index of theresSpec
to retrieve
Returns resSpec
Raises RangeError
Description Retrieve the resSpec
atindex
(seegetReqSpec
for description ofindex
).- index (
- ¶
getReq Arguments - index (
string
|integer
) – the index of thereq
to retrieve
Returns req
Raises RangeError
Description Retrieve the req
atindex
(seegetReqSpec
for description ofindex
).- index (
- ¶
getRes Arguments - index (
string
|integer
) – the index of theres
to retrieve
Returns res
Raises RangeError
Description Retrieve the res
atindex
(seegetReqSpec
for description ofindex
).- index (
- ¶
get Arguments - index (
string
|integer
) – the index of the request/response cycle to retrieve
Returns an object that contains the reqSpec
,resSpec
,req
, andres
forindex
Raises RangeError
Description Retrieve all history at index
(seegetReqSpec
for description ofindex
).- index (