Functions for registering and running automated tests.
Parameter | Type | Description |
---|---|---|
expected | undefined | |
actual | undefined |
Parameter | Type | Description |
---|---|---|
msg | undefined | |
hint | undefined |
This function determines the rough number of iterations to use to reach a particular MS threshold. This returns a deferred since tests can theoretically by async. Async tests aren't going to give great perf #s, though. The callback is passed the # of iterations to hit the requested threshold.
Parameter | Type | Description |
---|---|---|
groupName | String | |
fixture | Object | The test fixture we want to calculate iterations for. |
Parameter | Type | Description |
---|---|---|
group | undefined | |
success | undefined |
Parameter | Type | Description |
---|---|---|
groupName | undefined | |
fixture | undefined | |
e | undefined |
Parameter | Type | Description |
---|---|---|
expected | undefined | |
actual | undefined |
add the provided test function or fixture object to the specified test group.
Parameter | Type | Description |
---|---|---|
group | String | string name of the group to add the test to |
test | Function | String | Object | TODOC |
type | String |
Optional An identifier denoting the type of testing that the test performs, such as a performance test. If falsy, defaults to test.type. |
Parameter | Type | Description |
---|---|---|
groupId | undefined | |
test | undefined | |
type | undefined | |
testArgPosition | undefined | |
args | undefined | |
setUp | undefined | |
tearDown | undefined |
Parameter | Type | Description |
---|---|---|
groupName | undefined | |
fixture | undefined |
This function handles how to execute a 'performance' test which is different from a straight UT style test. These will often do numerous iterations of the same operation and gather execution statistics about it, like max, min, average, etc. It makes use of the already in place DOH deferred test handling since it is a good idea to put a pause in between each iteration to allow for GC cleanup and the like.
Parameter | Type | Description |
---|---|---|
groupName | String | The test group that contains this performance test. |
fixture | Object | The performance test fixture. |
Function to help run a generic doh test. Called from _runFixture(). These are not specialized tests, like performance groups and such.
Parameter | Type | Description |
---|---|---|
groupName | String | The groupName of the test. |
fixture | Object | The test fixture to execute. |
Parameter | Type | Description |
---|---|---|
g | undefined | |
f | undefined | |
s | undefined |
Parameter | Type | Description |
---|---|---|
group | undefined | |
fixture | undefined |
Parameter | Type | Description |
---|---|---|
group | undefined | |
fixture | undefined |
Parameter | Type | Description |
---|---|---|
p | undefined | |
success | undefined | |
group | undefined |
Parameter | Type | Description |
---|---|---|
group | undefined | |
fixture | undefined | |
unwindingBacklog | undefined |
are the passed expected and actual objects/values deeply equivalent?
Parameter | Type | Description |
---|---|---|
expected | Object | |
actual | Object | |
hint | String |
Optional
|
doNotThrow | undefined |
Test for a certain error to be thrown by the given function.
Parameter | Type | Description |
---|---|---|
expectedError | Error object | |
scope | Object | |
functionName | String | |
args | Array | |
hint | String |
Optional
|
t.assertError(dojox.data.QueryReadStore.InvalidAttributeError, store, "getValue", [item, "NOT THERE"]); t.assertError(dojox.data.QueryReadStore.InvalidItemError, store, "getValue", ["not an item", "NOT THERE"]);
is the passed item "falsey"?
Parameter | Type | Description |
---|---|---|
condition | Object | |
hint | String |
Optional
|
are the passed notexpected and actual objects/values deeply not equivalent?
Parameter | Type | Description |
---|---|---|
notExpected | Object | |
actual | Object | |
hint | String |
Optional
|
is the passed item "truthy"?
Parameter | Type | Description |
---|---|---|
condition | Object | |
hint | String |
Optional
|
Test for a certain error to be thrown by the given function.
Parameter | Type | Description |
---|---|---|
expectedError | Error object | |
scope | Object | |
functionName | String | |
args | Array | |
hint | String |
Optional
|
t.assertError(dojox.data.QueryReadStore.InvalidAttributeError, store, "getValue", [item, "NOT THERE"]); t.assertError(dojox.data.QueryReadStore.InvalidItemError, store, "getValue", ["not an item", "NOT THERE"]);
is the passed item "falsey"?
Parameter | Type | Description |
---|---|---|
condition | Object | |
hint | String |
Optional
|
are the passed expected and actual objects/values deeply equivalent?
Parameter | Type | Description |
---|---|---|
expected | Object | |
actual | Object | |
hint | String |
Optional
|
doNotThrow | undefined |
are the passed notexpected and actual objects/values deeply not equivalent?
Parameter | Type | Description |
---|---|---|
notExpected | Object | |
actual | Object | |
hint | String |
Optional
|
Parameter | Type | Description |
---|---|---|
a1 | undefined | |
a2 | undefined | |
a3 | undefined | |
a4 | undefined | |
a5 | undefined |
Deprecated. Won't work unless you manually load dojox.testing.DocTest, and likely not even then. Gets all the doctests from the given module and register each of them as a single test case here.
Parameter | Type | Description |
---|---|---|
module | undefined | dojox/dgauges/components/utils |
Deprecated. Use doh.register(group/type, tests, setUp, tearDown) instead
Parameter | Type | Description |
---|---|---|
group | String | |
tests | Array | Function | Object | |
setUp | Function | |
tearDown | Function | |
type | String |
Deprecated. Use doh.register(group/type, test) instead
Parameter | Type | Description |
---|---|---|
group | String | |
test | Array | Function | Object | |
type | String |
Deprecated. Use doh.register(group, ns) instead
Parameter | Type | Description |
---|---|---|
group | String | |
ns | Object |
Deprecated. Use doh.register(group/type, testArr) instead
Parameter | Type | Description |
---|---|---|
group | String | |
testArr | Array | |
type | String |
Adds a test type and associates a function used to initialize each test of the given type
Parameter | Type | Description |
---|---|---|
name | String | The name of the type. |
initProc | Function | Type specific test initializer; called after the test object is created. |
runs the specified test group
Parameter | Type | Description |
---|---|---|
groupName | String | |
idx | Integer |
is the passed item "truthy"?
Parameter | Type | Description |
---|---|---|
condition | Object | |
hint | String |
Optional
|
t.assertError(dojox.data.QueryReadStore.InvalidAttributeError, store, "getValue", [item, "NOT THERE"]); t.assertError(dojox.data.QueryReadStore.InvalidItemError, store, "getValue", ["not an item", "NOT THERE"]);