Skip to content

Commit

Permalink
Show test case change and completion messages during test playback
Browse files Browse the repository at this point in the history
  • Loading branch information
samitbadle committed Feb 17, 2014
1 parent 88e0c41 commit fc540d3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ide/main/src/content/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -843,12 +843,15 @@ Editor.prototype.showInBrowser = function (url, newWindow) {

Editor.prototype.playCurrentTestCase = function (next, index, total) {
var self = this;
self.getUserLog().info("Playing test case " + (self.app.getTestCase().getTitle() || ''));
this.selDebugger.start(function (failed) {
self.log.debug("finished execution of test case: failed=" + failed);
var testCase = self.suiteTreeView.getCurrentTestCase();
if (testCase) {
testCase.testResult = failed ? "failed" : "passed";
self.getUserLog().info("Test case " + testCase.testResult);
} else {
self.getUserLog().error("current test case not found");
self.log.error("current test case not found");
}
self.suiteTreeView.currentRowUpdated();
Expand Down Expand Up @@ -878,6 +881,9 @@ Editor.prototype.playTestSuite = function (startIndex) {
self.suiteTreeView.scrollToRow(index);
self.app.showTestCaseFromSuite(self.app.getTestSuite().tests[index]);
self.playCurrentTestCase(arguments.callee, index, total);
} else {
//Suite done
self.getUserLog().info("Test suite completed: " + self.testSuiteProgress.runs + " played, " + (self.testSuiteProgress.failures ? self.testSuiteProgress.failures + " failed" : " all passed!"));
}
})();
};
Expand Down

0 comments on commit fc540d3

Please sign in to comment.