Пример #1
0
 private void runTest() {
   if (ddTestRunner == null) return;
   displayView.startTest();
   createRuntime(
       ddTestRunner.getScriptText(), ddTestRunner.getConsole(), MarathonMode.PLAYING.getMode());
   script =
       runtime.createScript(ddTestRunner.getScriptText(), displayView.getFilePath(), false, true);
   script.setDataVariables(ddTestRunner.getDataVariables());
   player = script.getPlayer(this, playbackResultProvider.get());
   player.setAcceptCheckList(acceptingChecklists);
   boolean shouldRunFixture = state.isStoppedWithAppClosed();
   setState(State.PLAYING);
   displayView.startInserting();
   player.play(shouldRunFixture);
 }
Пример #2
0
 public String evaluateScript(String code) {
   if (state.isRecordingPaused()) {
     return runtime.evaluate(code);
   } else {
     return script.getDebugger().evaluateScriptWhenPaused(code);
   }
 }
Пример #3
0
 public void resume() {
   if (state.isRecordingPaused()) {
     runtime.startRecording(recorder);
     setState(State.RECORDING);
   } else {
     script.getDebugger().resume();
     setState(State.PLAYING);
   }
 }