Ejemplo n.º 1
0
 def setThreadCallbacks(self):
     mainMethod = self.runReplay if self.isActive() else self.setUpMonitoring
     methods = [ mainMethod, self.enableJobListener, self.runOnRecordExit ]
     runners = map(self.getTestRunnerClass(), methods)
     try:
         from org.eclipse.swtbot.testscript import TestRunnableStore
         TestRunnableStore.setTestRunnables(*runners)
     except ImportError:
         sys.stderr.write("ERROR: Could not find SWTBot testscript plugin. Please install it as described at :\n" +
                          "http://www.texttest.org/index.php?page=ui_testing&n=storytext_and_swt\n")
         sys.exit(1)
Ejemplo n.º 2
0
    def setThreadCallbacks(self):
        if self.isActive():
            methods = [ self.runReplay, self.enableJobListener, self.tryTerminateCoverage ]
        else: # pragma: no cover - cannot test with replayer disabled
            methods = [ self.setUpMonitoring, self.enableJobListener, self.runOnRecordExit ]

        runners = map(TestRunner, methods)
        try:
            from org.eclipse.swtbot.testscript import TestRunnableStore
            TestRunnableStore.setTestRunnables(*runners)
        except ImportError:
            sys.stderr.write("ERROR: Could not find SWTBot testscript plugin. Please install it as described at :\n" +
                             "http://www.texttest.org/index.php?page=ui_testing&n=storytext_and_swt\n")
            sys.exit(1)
Ejemplo n.º 3
0
 def setTestRunnables(self, runner, exitRunner=None):
     from org.eclipse.swtbot.testscript import TestRunnableStore
     TestRunnableStore.setTestRunnables(runner, exitRunner)