Page History
...
style | display:none |
---|
...
Div | ||||
---|---|---|---|---|
| ||||
Servoy has built-in support for Unit Testing. The integration adds the following to the Servoy environment:
Creating testcases is as straightforward as creating a function with a name that starts with 'test_':
The JSUnit node in the Solution Explorer provides easy access to the different supported assert functions Testcases can be added on application level in the global scope of on form level in the form scope. Each scope can contain a setUp and/or tearDown function. The setUp function is called BEFORE running each testcase in the scope and the tearDown function is called AFTER running each test in the scope. The setUp and tearDown function allow the developer to create the right circumstances for testcases to run and cleanup afterwards. Note that the setUp() and tearDown() methods are called before and after EACH test methods, as each single test is supposed to be independant.
|
...
padding | 0px |
---|---|
width | 80px |
...
Table Row (tr) | |||||
---|---|---|---|---|---|
| |||||
|
Table Row (tr) | ||||
---|---|---|---|---|
|
Table Row (tr) | ||||
---|---|---|---|---|
|
Table Row (tr) | ||||
---|---|---|---|---|
|
Table Row (tr) | ||||
---|---|---|---|---|
|
Table Row (tr) | ||||
---|---|---|---|---|
|
Table Row (tr) | ||||
---|---|---|---|---|
|
Table Row (tr) | ||||
---|---|---|---|---|
|
Table Row (tr) | ||||
---|---|---|---|---|
|
Table Row (tr) | ||||
---|---|---|---|---|
|
Table Row (tr) | ||||
---|---|---|---|---|
|
Table Row (tr) | ||||
---|---|---|---|---|
|
Table Row (tr) | ||||
---|---|---|---|---|
|
Table Row (tr) | ||||
---|---|---|---|---|
|
Table Row (tr) | ||||
---|---|---|---|---|
|
Table Row (tr) | ||||
---|---|---|---|---|
|
Table Row (tr) | ||||
---|---|---|---|---|
|
Table Row (tr) | ||||
---|---|---|---|---|
|
Table Row (tr) | ||||
---|---|---|---|---|
|
Table Row (tr) | ||||
---|---|---|---|---|
|
Table Row (tr) | ||||
---|---|---|---|---|
|
Table Row (tr) | ||||
---|---|---|---|---|
|
Table Row (tr) | ||||
---|---|---|---|---|
|
Table Row (tr) | ||||
---|---|---|---|---|
|
Table Row (tr) | ||||
---|---|---|---|---|
|
Table Row (tr) | ||||
---|---|---|---|---|
|
...
id | function |
---|---|
class | servoy sDetail |
...
padding | 0px |
---|---|
width | 100% |
Table Row (tr) | |||||
---|---|---|---|---|---|
| |||||
|
...
id | assertEquals-Object_Object |
---|
Table Row (tr) | ||
---|---|---|
| ||
|
Table Row (tr) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
|
...
class | lastDetailRow |
---|
...
id | assertEquals-String_Object_Object |
---|
Table Row (tr) | ||
---|---|---|
| ||
|
Table Row (tr) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
|
...
class | lastDetailRow |
---|
...
id | assertFalse-Boolean |
---|
Table Row (tr) | ||
---|---|---|
| ||
|
Table Row (tr) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
|
...
class | lastDetailRow |
---|
...
id | assertFalse-String_Boolean |
---|
Table Row (tr) | ||
---|---|---|
| ||
|
Table Row (tr) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
|
...
class | lastDetailRow |
---|
...
id | assertFloatEquals-Number_Number_Number |
---|
Table Row (tr) | ||
---|---|---|
| ||
|
Table Row (tr) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
|
...
class | lastDetailRow |
---|
...
id | assertFloatEquals-String_Number_Number_Number |
---|
Table Row (tr) | ||
---|---|---|
| ||
|
Table Row (tr) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
|
...
class | lastDetailRow |
---|
...
id | assertMatches-Object_String |
---|
Table Row (tr) | ||
---|---|---|
| ||
|
Table Row (tr) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
|
...
class | lastDetailRow |
---|
...
id | assertMatches-String_Object_String |
---|
Table Row (tr) | ||
---|---|---|
| ||
|
Table Row (tr) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
|
...
class | lastDetailRow |
---|
...
id | assertNotNull-Object |
---|
Table Row (tr) | ||
---|---|---|
| ||
|
Table Row (tr) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
|
...
class | lastDetailRow |
---|
...
id | assertNotNull-String_Object |
---|
Table Row (tr) | ||
---|---|---|
| ||
|
Table Row (tr) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
|
...
class | lastDetailRow |
---|
...
id | assertNotSame-Object_Object |
---|
Table Row (tr) | ||
---|---|---|
| ||
|
Table Row (tr) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
|
...
class | lastDetailRow |
---|
...
id | assertNotSame-String_Object_Object |
---|
Table Row (tr) | ||
---|---|---|
| ||
|
Table Row (tr) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
|
...
class | lastDetailRow |
---|
...
id | assertNotUndefined-Object |
---|
Table Row (tr) | ||
---|---|---|
| ||
|
Table Row (tr) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
|
...
class | lastDetailRow |
---|
...
id | assertNotUndefined-String_Object |
---|
Table Row (tr) | ||
---|---|---|
| ||
|
Table Row (tr) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
|
...
class | lastDetailRow |
---|
...
id | assertNull-Object |
---|
Table Row (tr) | ||
---|---|---|
| ||
|
Table Row (tr) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
|
...
class | lastDetailRow |
---|
...
id | assertNull-String_Object |
---|
Table Row (tr) | ||
---|---|---|
| ||
|
Table Row (tr) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
|
...
class | lastDetailRow |
---|
...
id | assertSame-Object_Object |
---|
Table Row (tr) | ||
---|---|---|
| ||
|
Table Row (tr) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
...
id | sam |
---|
...
class | sIndent |
---|
...
language | javascript |
---|
...
Cache | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
assertEquals(expected, actual)Asserts that two values are equal. AssertionFailedError is thrown if the actual value does not match the regular expression. Parameters Supported Clients Sample assertEquals(message, expected, actual)Asserts that two values are |
...
equal. AssertionFailedError is thrown if the |
...
actual value |
...
does not |
...
class | lastDetailRow |
---|
...
id | assertSame-String_Object_Object |
---|
Table Row (tr) | ||
---|---|---|
| ||
|
Table Row (tr) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
...
id | sam |
---|
...
class | sIndent |
---|
...
language | javascript |
---|
...
match the regular expression. Parameters Supported Clients Sample assertFalse(boolean_condition)Asserts that a condition is false. AssertionFailedError is thrown if the evaluation was not false. Parameters Supported Clients Sample assertFalse(message, boolean_condition)Asserts that a condition is false. AssertionFailedError is thrown if the evaluation was not false. Parameters Supported Clients Sample assertFloatEquals(expectedFloat, actualFloat, tolerance)Asserts that two floating point values are equal to within a given tolerance. AssertionFailedError is thrown if the expected value is |
...
class | lastDetailRow |
---|
...
id | assertTrue-Boolean |
---|
Table Row (tr) | ||
---|---|---|
| ||
|
Table Row (tr) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
...
id | sam |
---|
...
class | sIndent |
---|
...
language | javascript |
---|
...
not within the tolerance of the actual one. Parameters Supported Clients Sample assertFloatEquals(message, expectedFloat, actualFloat, tolerance)Asserts that two floating point values are equal to within a given tolerance. AssertionFailedError is thrown if the expected value is not within the tolerance of the actual one. Parameters Supported Clients Sample assertMatches(regularExpression, actualString)Asserts that a regular expression matches a string. AssertionFailedError is thrown if the |
...
expected |
...
class | lastDetailRow |
---|
...
id | assertTrue-String_Boolean |
---|
Table Row (tr) | ||
---|---|---|
| ||
|
Table Row (tr) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
|
...
class | lastDetailRow |
---|
...
id | assertUndefined-Object |
---|
Table Row (tr) | ||
---|---|---|
| ||
|
Table Row (tr) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
...
id | sam |
---|
...
class | sIndent |
---|
...
language | javascript |
---|
...
value is not the actual one. Parameters Supported Clients Sample assertMatches(message, regularExpression, actualString)Asserts that a regular expression matches a string. AssertionFailedError is thrown if the expected value is not the actual one. Parameters Supported Clients Sample assertNotNull(object)Asserts that an object is not null. AssertionFailedError is thrown if the object is not null. Parameters Supported Clients Sample assertNotNull(message, object)Asserts that an object is not null. AssertionFailedError is thrown if the object is not null. Parameters Supported Clients Sample assertNotSame(notExpected, actual)Asserts that two values are not the same. AssertionFailedError is thrown if the expected |
...
value is |
...
class | lastDetailRow |
---|
...
id | assertUndefined-String_Object |
---|
Table Row (tr) | ||
---|---|---|
| ||
|
Table Row (tr) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
...
id | sam |
---|
...
class | sIndent |
---|
...
language | javascript |
---|
...
the actual one. Parameters Supported Clients Sample assertNotSame(message, notExpected, actual)Asserts that two values are not the same. AssertionFailedError is thrown if the expected value is the actual one. Parameters Supported Clients Sample assertNotUndefined(definedObject)Asserts that an object is not undefined. AssertionFailedError is thrown if the object is undefined. Parameters Supported Clients Sample assertNotUndefined(message, definedObject)Asserts that an object is not undefined. AssertionFailedError is thrown if the object is |
...
class | lastDetailRow |
---|
...
id | fail-String |
---|
Table Row (tr) | ||
---|---|---|
| ||
|
Table Row (tr) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
|
...
class | lastDetailRow |
---|
...
id | fail-String_Object |
---|
Table Row (tr) | ||
---|---|---|
| ||
|
Table Row (tr) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
|
...
class | lastDetailRow |
---|
...
id | fail-String_Object_String |
---|
Table Row (tr) | ||
---|---|---|
| ||
|
Table Row (tr) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
...
id | prs |
---|
...
class | sIndent |
---|
...
undefined. Parameters Supported Clients Sample assertNull(nullValue)Asserts that an object is null. AssertionFailedError is thrown if the object is not null. Parameters Supported Clients Sample assertNull(message, nullValue)Asserts that an object is null. AssertionFailedError is thrown if the object is not null. Parameters Supported Clients Sample assertSame(expected, actual)Asserts that two values are the same. AssertionFailedError is thrown if the expected value is not the actual one. Parameters Supported Clients Sample assertSame(message, expected, actual)Asserts that two values are the same. AssertionFailedError is thrown if the expected value is not the actual one. Parameters Supported Clients Sample assertTrue(boolean_condition)Asserts that a condition is true. AssertionFailedError is thrown if the evaluation was not true. Parameters Supported Clients Sample assertTrue(message, boolean_condition)Asserts that a condition is true. AssertionFailedError is thrown if the evaluation was not true. Parameters Supported Clients Sample assertUndefined(undefinedValue)Asserts that an object is undefined. AssertionFailedError is thrown if the object is defined. Parameters Supported Clients Sample assertUndefined(message, undefinedValue)Asserts that an object is undefined. AssertionFailedError is thrown if the object is defined. Parameters Supported Clients Sample fail(message)Fails a test. AssertionFailedError is always thrown. Parameters Supported Clients Sample fail(message, instanceOfCallStack)Fails a test. AssertionFailedError is always thrown. Parameters |
...
...
class | lastDetailRow |
---|
...
...
Table Row (tr) | |||||||
---|---|---|---|---|---|---|---|
| |||||||
|
Table Row (tr) | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
|
Supported Clients Sample fail(message, instanceOfCallStack, userMessage)Fails a test. AssertionFailedError is always thrown. Parameters Supported Clients Sample |