Example #1
0
  public SMTestRunnerResultsForm(
      @NotNull final JComponent console,
      AnAction[] consoleActions,
      final TestConsoleProperties consoleProperties,
      @Nullable String splitterPropertyName) {
    super(
        console,
        consoleActions,
        consoleProperties,
        StringUtil.notNullize(splitterPropertyName, DEFAULT_SM_RUNNER_SPLITTER_PROPERTY),
        0.2f);
    myProject = consoleProperties.getProject();

    // Create tests common suite root
    //noinspection HardCodedStringLiteral
    myTestsRootNode = new SMTestProxy.SMRootTestProxy();
    // todo myTestsRootNode.setOutputFilePath(runConfiguration.getOutputFilePath());

    // Fire selection changed and move focus on SHIFT+ENTER
    // TODO[romeo] improve
    /*
    final ArrayList<Component> components = new ArrayList<Component>();
    components.add(myTreeView);
    components.add(myTabs.getComponent());
    myContentPane.setFocusTraversalPolicy(new MyFocusTraversalPolicy(components));
    myContentPane.setFocusCycleRoot(true);
    */
  }
Example #2
0
 public MySaveHistoryTask(
     TestConsoleProperties consoleProperties,
     SMTestProxy.SMRootTestProxy root,
     RunConfiguration configuration) {
   super(consoleProperties.getProject(), "Save Test Results", true);
   myConsoleProperties = consoleProperties;
   myRoot = root;
   myConfiguration = configuration;
 }
Example #3
0
  public static void addLabel(final TestFrameworkRunningModel model) {
    String label;
    int color;

    if (model.getRoot().isDefect()) {
      color = RED.getRGB();
      label = ExecutionBundle.message("junit.runing.info.tests.failed.label");
    } else {
      color = GREEN.getRGB();
      label = ExecutionBundle.message("junit.runing.info.tests.passed.label");
    }
    final TestConsoleProperties consoleProperties = model.getProperties();
    String name = label + " " + consoleProperties.getConfiguration().getName();
    LocalHistory.getInstance().putSystemLabel(consoleProperties.getProject(), name, color);
  }