-
Notifications
You must be signed in to change notification settings - Fork 218
Test Automation
- Trigger the execution
- Run the tests
- Publish the results
Expected: Should trigger the execution of the tests on iOS, Android and some browsers after each commit in the cocos2d-js-tests
Current Status: Not started
Expected: All the tests should be run
Current Status:
- "Automated Test" button should be pressed
- Different test files should be executed manually
- Once each test file is opened, all the tests defined in that module are executed automatically
Expected: Results of the tests should be published in... TBD
Current Status: Not started
In order to reuse the current cocos2d tests, an ad-hoc automation test was developed. This is a simple framework that iterates all over the tests that are defined in each test file.
The requirement is that each test should be a subclass of BaseTestLayer, and the following functions and properties shall be overridden:
getExpectedResult:function() {
return "Expected value";
},
getCurrentResult:function() {
return "Current value";
}If the expected result is equal (string wise) to the current result, the test will be marked as Ok, otherwise as a Fail.
You can override the compare function too, in case you don't want to do an string-wise comparison:
// Default comparison. Override to have a comparison.
// return true if current and expected are the same
// return false otherwise
compareResults:function(current, expected) {
return (current == expected);
},