• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java SMTRunnerConsoleProperties类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.intellij.execution.testframework.sm.runner.SMTRunnerConsoleProperties的典型用法代码示例。如果您正苦于以下问题:Java SMTRunnerConsoleProperties类的具体用法?Java SMTRunnerConsoleProperties怎么用?Java SMTRunnerConsoleProperties使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SMTRunnerConsoleProperties类属于com.intellij.execution.testframework.sm.runner包,在下文中一共展示了SMTRunnerConsoleProperties类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getConsoleView

import com.intellij.execution.testframework.sm.runner.SMTRunnerConsoleProperties; //导入依赖的package包/类
public static SMTRunnerConsoleView getConsoleView(
    Project project,
    BlazeCommandRunConfiguration configuration,
    Executor executor,
    BlazeTestUiSession testUiSession) {
  SMTRunnerConsoleProperties properties =
      new BlazeTestConsoleProperties(configuration, executor, testUiSession);
  SMTRunnerConsoleView console =
      (SMTRunnerConsoleView)
          SMTestRunnerConnectionUtil.createConsole(BLAZE_FRAMEWORK, properties);
  Disposer.register(project, console);
  console
      .getResultsViewer()
      .getTreeView()
      .getSelectionModel()
      .setSelectionMode(TreeSelectionModel.DISCONTIGUOUS_TREE_SELECTION);
  return console;
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:19,代码来源:SmRunnerUtils.java


示例2: execute

import com.intellij.execution.testframework.sm.runner.SMTRunnerConsoleProperties; //导入依赖的package包/类
@Nullable
public ExecutionResult execute(@NotNull Executor executor, @NotNull ProgramRunner runner) throws ExecutionException {
  final TestConsoleProperties testConsoleProperties =
      new SMTRunnerConsoleProperties(jsTestDriverConfiguration, "jsTestDriver", executor);
  final CountDownLatch receivingSocketOpen = new CountDownLatch(1);
  Future<ProcessData> data = attachExecutor.submit(new Callable<ProcessData>() {
    public ProcessData call() throws Exception {
      // Let the receiver start before we write anything to it.
      receivingSocketOpen.await();
      ProcessHandler processHandler = startProcess();
      BaseTestsOutputConsoleView consoleView =
          attachRunner(project.getName(), processHandler, testConsoleProperties, getRunnerSettings(), getConfigurationSettings());
      return new ProcessData((SMTRunnerConsoleView) consoleView, processHandler);
    }
  });
  TestListenerContext context = new TestListenerContext(data);
  final RemoteTestListener listener = new RemoteTestListener(context);
  testResultReceiverExecutor.submit(
      new RemoteTestResultReceiver(listener, testResultPort, receivingSocketOpen));
  return new DefaultExecutionResult(context.consoleView(), context.processHandler(),
      createActions(context.consoleView(), context.processHandler()));
}
 
开发者ID:BladeRunnerJS,项目名称:brjs-JsTestDriver,代码行数:23,代码来源:TestRunnerState.java


示例3: actionPerformed

import com.intellij.execution.testframework.sm.runner.SMTRunnerConsoleProperties; //导入依赖的package包/类
@Override
public void actionPerformed(AnActionEvent e) {
  final Project project = e.getProject();
  LOG.assertTrue(project != null);
  final VirtualFile file = getFile(project);
  if (file != null) {
    try {
      final ImportRunProfile profile = new ImportRunProfile(file, project);
      SMTRunnerConsoleProperties properties = profile.getProperties();
      if (properties == null) {
        properties = myProperties;
        LOG.info("Failed to detect test framework in " + file.getPath() +
                 "; use " + (properties != null ? properties.getTestFrameworkName() + " from toolbar" : "no properties"));
      }
      final Executor executor = properties != null ? properties.getExecutor() 
                                                   : ExecutorRegistry.getInstance().getExecutorById(DefaultRunExecutor.EXECUTOR_ID);
      ExecutionEnvironmentBuilder builder = ExecutionEnvironmentBuilder.create(project, executor, profile);
      ExecutionTarget target = profile.getTarget();
      if (target != null) {
        builder = builder.target(target);
      }
      final RunConfiguration initialConfiguration = profile.getInitialConfiguration();
      final ProgramRunner runner =
        initialConfiguration != null ? RunnerRegistry.getInstance().getRunner(executor.getId(), initialConfiguration) : null;
      if (runner != null) {
        builder = builder.runner(runner);
      }
      builder.buildAndExecute();
    }
    catch (ExecutionException e1) {
      Messages.showErrorDialog(project, e1.getMessage(), "Import Failed");
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:35,代码来源:AbstractImportTestsAction.java


示例4: execute

import com.intellij.execution.testframework.sm.runner.SMTRunnerConsoleProperties; //导入依赖的package包/类
@Nullable
@Override
public ExecutionResult execute(Executor executor, @NotNull ProgramRunner runner) throws ExecutionException {
  final MyEmptyProcessHandler handler = new MyEmptyProcessHandler();
  final SMTRunnerConsoleProperties properties = myRunProfile.getProperties();
  RunProfile configuration;
  final String frameworkName;
  if (properties != null) {
    configuration = properties.getConfiguration();
    frameworkName = properties.getTestFrameworkName();
  }
  else {
    configuration = myRunProfile;
    frameworkName = "Import Test Results";
  }
  final ImportedTestConsoleProperties consoleProperties = new ImportedTestConsoleProperties(properties, myFile, handler, myRunProfile.getProject(),
                                                                                            configuration, frameworkName, executor);
  final BaseTestsOutputConsoleView console = SMTestRunnerConnectionUtil.createConsole(consoleProperties.getTestFrameworkName(), 
                                                                                      consoleProperties);
  final JComponent component = console.getComponent();
  AbstractRerunFailedTestsAction rerunFailedTestsAction = null;
  if (component instanceof TestFrameworkRunningModel) {
    rerunFailedTestsAction = consoleProperties.createRerunFailedTestsAction(console);
    if (rerunFailedTestsAction != null) {
      rerunFailedTestsAction.setModelProvider(new Getter<TestFrameworkRunningModel>() {
        @Override
        public TestFrameworkRunningModel get() {
          return (TestFrameworkRunningModel)component;
        }
      });
    }
  }
  
  console.attachToProcess(handler);
  final DefaultExecutionResult result = new DefaultExecutionResult(console, handler);
  if (rerunFailedTestsAction != null) {
    result.setRestartActions(rerunFailedTestsAction);
  }
  return result;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:41,代码来源:ImportedTestRunnableState.java


示例5: ImportedTestConsoleProperties

import com.intellij.execution.testframework.sm.runner.SMTRunnerConsoleProperties; //导入依赖的package包/类
public ImportedTestConsoleProperties(@Nullable SMTRunnerConsoleProperties properties,
                                     File file,
                                     ProcessHandler handler,
                                     Project project, RunProfile runConfiguration,
                                     String frameworkName,
                                     Executor executor) {
  super(project, runConfiguration, frameworkName, executor);
  myProperties = properties;
  myFile = file;
  myHandler = handler;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:ImportedTestConsoleProperties.java


示例6: MyRenderer

import com.intellij.execution.testframework.sm.runner.SMTRunnerConsoleProperties; //导入依赖的package包/类
public MyRenderer(final boolean isPaused,
                  final UITestUtil.FragmentsContainer fragmentsContainer) {
  super(new SMTRunnerConsoleProperties(createRunConfiguration(), "SMRunnerTests", DefaultDebugExecutor.getDebugExecutorInstance()) {
    @Override
    public boolean isPaused() {
      return isPaused;
    }
  });
  myFragmentsContainer = fragmentsContainer;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:TestsPresentationUtilTest.java


示例7: useSmRunner

import com.intellij.execution.testframework.sm.runner.SMTRunnerConsoleProperties; //导入依赖的package包/类
private ExecutionResult useSmRunner(Executor executor, JUnitProcessHandler handler) {
  TestConsoleProperties testConsoleProperties = new SMTRunnerConsoleProperties(
    new RuntimeConfigurationProducer.DelegatingRuntimeConfiguration<JUnitConfiguration>(
      (JUnitConfiguration)myEnvironment.getRunProfile()),
    JUNIT_TEST_FRAMEWORK_NAME,
    executor
  );

  testConsoleProperties.setIfUndefined(TestConsoleProperties.HIDE_PASSED_TESTS, false);

  BaseTestsOutputConsoleView smtConsoleView = SMTestRunnerConnectionUtil.createConsoleWithCustomLocator(
    JUNIT_TEST_FRAMEWORK_NAME,
    testConsoleProperties,
    myEnvironment, null);


  Disposer.register(myProject, smtConsoleView);

  final ConsoleView consoleView = smtConsoleView;
  consoleView.attachToProcess(handler);

  final RerunFailedTestsAction rerunFailedTestsAction = new RerunFailedTestsAction(consoleView);
  rerunFailedTestsAction.init(testConsoleProperties, myEnvironment);
  rerunFailedTestsAction.setModelProvider(new Getter<TestFrameworkRunningModel>() {
    @Override
    public TestFrameworkRunningModel get() {
      return ((SMTRunnerConsoleView)consoleView).getResultsViewer();
    }
  });

  final DefaultExecutionResult result = new DefaultExecutionResult(consoleView, handler);
  result.setRestartActions(rerunFailedTestsAction);
  return result;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:35,代码来源:TestObject.java


示例8: actionPerformed

import com.intellij.execution.testframework.sm.runner.SMTRunnerConsoleProperties; //导入依赖的package包/类
@Override
public void actionPerformed(AnActionEvent e) {
  final Project project = e.getProject();
  LOG.assertTrue(project != null);
  final VirtualFile file = getFile(project);
  if (file != null) {
    try {
      final ImportRunProfile profile = new ImportRunProfile(file, project);
      SMTRunnerConsoleProperties properties = profile.getProperties();
      if (properties == null) {
        properties = myProperties;
        LOG.info("Failed to detect test framework in " + file.getPath() +
                 "; use " + (properties != null ? properties.getTestFrameworkName() + " from toolbar" : "no properties"));
      }
      final Executor executor = properties != null ? properties.getExecutor()
                                                   : ExecutorRegistry.getInstance().getExecutorById(DefaultRunExecutor.EXECUTOR_ID);
      ExecutionEnvironmentBuilder builder = ExecutionEnvironmentBuilder.create(project, executor, profile);
      ExecutionTarget target = profile.getTarget();
      if (target != null) {
        builder = builder.target(target);
      }
      final RunConfiguration initialConfiguration = profile.getInitialConfiguration();
      final ProgramRunner runner =
              initialConfiguration != null ? RunnerRegistry.getInstance().getRunner(executor.getId(), initialConfiguration) : null;
      if (runner != null) {
        builder = builder.runner(runner);
      }
      builder.buildAndExecute();
    }
    catch (ExecutionException e1) {
      Messages.showErrorDialog(project, e1.getMessage(), "Import Failed");
    }
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:35,代码来源:AbstractImportTestsAction.java


示例9: execute

import com.intellij.execution.testframework.sm.runner.SMTRunnerConsoleProperties; //导入依赖的package包/类
@Nullable
@Override
public ExecutionResult execute(Executor executor, @Nonnull ProgramRunner runner) throws ExecutionException {
  final MyEmptyProcessHandler handler = new MyEmptyProcessHandler();
  final SMTRunnerConsoleProperties properties = myRunProfile.getProperties();
  RunProfile configuration;
  final String frameworkName;
  if (properties != null) {
    configuration = properties.getConfiguration();
    frameworkName = properties.getTestFrameworkName();
  }
  else {
    configuration = myRunProfile;
    frameworkName = "Import Test Results";
  }
  final ImportedTestConsoleProperties consoleProperties = new ImportedTestConsoleProperties(properties, myFile, handler, myRunProfile.getProject(),
                                                                                            configuration, frameworkName, executor);
  final BaseTestsOutputConsoleView console = SMTestRunnerConnectionUtil.createConsole(consoleProperties.getTestFrameworkName(),
                                                                                      consoleProperties);
  final JComponent component = console.getComponent();
  AbstractRerunFailedTestsAction rerunFailedTestsAction = null;
  if (component instanceof TestFrameworkRunningModel) {
    rerunFailedTestsAction = consoleProperties.createRerunFailedTestsAction(console);
    if (rerunFailedTestsAction != null) {
      rerunFailedTestsAction.setModelProvider(new Getter<TestFrameworkRunningModel>() {
        @Override
        public TestFrameworkRunningModel get() {
          return (TestFrameworkRunningModel)component;
        }
      });
    }
  }

  console.attachToProcess(handler);
  final DefaultExecutionResult result = new DefaultExecutionResult(console, handler);
  if (rerunFailedTestsAction != null) {
    result.setRestartActions(rerunFailedTestsAction);
  }
  return result;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:41,代码来源:ImportedTestRunnableState.java


示例10: ImportedTestConsoleProperties

import com.intellij.execution.testframework.sm.runner.SMTRunnerConsoleProperties; //导入依赖的package包/类
public ImportedTestConsoleProperties(@javax.annotation.Nullable SMTRunnerConsoleProperties properties,
                                     File file,
                                     ProcessHandler handler,
                                     Project project, RunProfile runConfiguration,
                                     String frameworkName,
                                     Executor executor) {
  super(project, runConfiguration, frameworkName, executor);
  myProperties = properties;
  myFile = file;
  myHandler = handler;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:12,代码来源:ImportedTestConsoleProperties.java


示例11: createTestConsoleProperties

import com.intellij.execution.testframework.sm.runner.SMTRunnerConsoleProperties; //导入依赖的package包/类
@Override
public SMTRunnerConsoleProperties createTestConsoleProperties(Executor executor) {
  return myDelegate.createTestConsoleProperties(executor);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:TestDiscoveryConfiguration.java


示例12: ImportTestsFromFileAction

import com.intellij.execution.testframework.sm.runner.SMTRunnerConsoleProperties; //导入依赖的package包/类
public ImportTestsFromFileAction(SMTRunnerConsoleProperties properties) {
  super(properties, (properties == null ? "" : "Import ") + "From File ...", "Import tests from file", null);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:ImportTestsFromFileAction.java


示例13: AbstractImportTestsAction

import com.intellij.execution.testframework.sm.runner.SMTRunnerConsoleProperties; //导入依赖的package包/类
public AbstractImportTestsAction(SMTRunnerConsoleProperties properties, @Nullable String text, @Nullable String description, @Nullable Icon icon) {
  this(text, description, icon);
  myProperties = properties;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:AbstractImportTestsAction.java


示例14: getProperties

import com.intellij.execution.testframework.sm.runner.SMTRunnerConsoleProperties; //导入依赖的package包/类
public SMTRunnerConsoleProperties getProperties() {
  return myProperties;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:AbstractImportTestsAction.java


示例15: ImportTestsGroup

import com.intellij.execution.testframework.sm.runner.SMTRunnerConsoleProperties; //导入依赖的package包/类
public ImportTestsGroup(SMTRunnerConsoleProperties properties) {
  this();
  myProperties = properties;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:ImportTestsGroup.java


示例16: ImportTestsFromHistoryAction

import com.intellij.execution.testframework.sm.runner.SMTRunnerConsoleProperties; //导入依赖的package包/类
public ImportTestsFromHistoryAction(@Nullable SMTRunnerConsoleProperties properties, Project project, String name) {
  super(properties, getPresentableText(project, name), getPresentableText(project, name), getIcon(project, name));
  myFileName = name;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:ImportTestsFromHistoryAction.java


示例17: createTestConsoleProperties

import com.intellij.execution.testframework.sm.runner.SMTRunnerConsoleProperties; //导入依赖的package包/类
@Override
public SMTRunnerConsoleProperties createTestConsoleProperties(Executor executor) {
  return new TestNGConsoleProperties(this, executor);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:TestNGConfiguration.java


示例18: createTestConsoleProperties

import com.intellij.execution.testframework.sm.runner.SMTRunnerConsoleProperties; //导入依赖的package包/类
@Override
public SMTRunnerConsoleProperties createTestConsoleProperties(Executor executor) {
  return new JUnitConsoleProperties(this, executor);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:JUnitConfiguration.java


示例19: execute

import com.intellij.execution.testframework.sm.runner.SMTRunnerConsoleProperties; //导入依赖的package包/类
@Nullable
@Override
@RequiredDispatchThread
public ExecutionResult execute(Executor executor, @NotNull ProgramRunner runner) throws ExecutionException
{
	Unity3dTestConfiguration profile = (Unity3dTestConfiguration) myEnvironment.getRunProfile();

	TestConsoleProperties testConsoleProperties = new SMTRunnerConsoleProperties(profile, TEST_FRAMEWORK_NAME, executor);

	testConsoleProperties.setIfUndefined(TestConsoleProperties.HIDE_PASSED_TESTS, false);

	String splitterPropertyName = SMTestRunnerConnectionUtil.getSplitterPropertyName(TEST_FRAMEWORK_NAME);

	final SMTRunnerConsoleView consoleView = new SMTRunnerConsoleView(testConsoleProperties, splitterPropertyName);

	final Ref<UUID> ref = Ref.create();

	consoleView.addAttachToProcessListener(new AttachToProcessListener()
	{
		@Override
		public void onAttachToProcess(@NotNull ProcessHandler processHandler)
		{
			SMTestRunnerResultsForm resultsForm = consoleView.getResultsViewer();

			ref.set(attachEventsProcessors(consoleView.getProperties(), resultsForm, resultsForm.getStatisticsPane(), processHandler, TEST_FRAMEWORK_NAME));
		}
	});
	consoleView.setHelpId("reference.runToolWindow.testResultsTab");
	consoleView.initUI();

	final ProcessHandler osProcessHandler = new DefaultDebugProcessHandler();

	consoleView.attachToProcess(osProcessHandler);

	UnityRunTest runTest = new UnityRunTest();
	runTest.uuid = ref.get().toString();
	runTest.type = "";

	if(!UnityEditorCommunication.request(profile.getProject(), runTest, true))
	{
		ApplicationManager.getApplication().executeOnPooledThread(new Runnable()
		{
			@Override
			public void run()
			{
				osProcessHandler.notifyTextAvailable("UnityEditor dont received request, maybe is not run", ProcessOutputTypes.STDERR);
				osProcessHandler.destroyProcess();
			}
		});
	}

	return new DefaultExecutionResult(consoleView, osProcessHandler);
}
 
开发者ID:consulo,项目名称:consulo-unity3d,代码行数:54,代码来源:Unity3dTestRunState.java


示例20: createRunState

import com.intellij.execution.testframework.sm.runner.SMTRunnerConsoleProperties; //导入依赖的package包/类
@NotNull
@Override
protected NodeJSRunState createRunState(@NotNull Module module,
		@NotNull Sdk targetSdk,
		@NotNull final Executor executor,
		@NotNull final ExecutionEnvironment executionEnvironment) throws ExecutionException
{
	VirtualFile mocha = NpmRunUtil.findNpmModule(module, MochaPsiElementUtil.MOCHA);
	if(mocha == null)
	{
		throw new ExecutionException("'mocha' module is not installed");
	}

	VirtualFile fileOrDirectory = getFileOrDirectory();
	if(fileOrDirectory == null)
	{
		throw new ExecutionException((myTargetType == TargetType.DIRECTORY ? "Directory" : "File") + " is not set");
	}

	NodeJSRunState state = new NodeJSRunState(module, targetSdk, this)
	{
		@NotNull
		@Override
		public ConsoleView createConsole(OSProcessHandler processHandler)
		{
			SMTRunnerConsoleProperties testConsoleProperties = new SMTRunnerConsoleProperties(MochaConfiguration.this, "Mocha", executor);
			testConsoleProperties.setIdBasedTestTree(true);

			testConsoleProperties.setIfUndefined(TestConsoleProperties.HIDE_PASSED_TESTS, false);

			return SMTestRunnerConnectionUtil.createConsole("Mocha", testConsoleProperties);
		}
	};
	state.addArgument(mocha.getPath() + "/bin/_mocha");

	File pluginPath = PluginManager.getPluginPath(MochaConfiguration.class);

	File mochaReporter = new File(pluginPath, "mocha-consulo");
	if(mochaReporter.exists())
	{
		state.addArgument("--reporter");
		state.addArgument(new File(mochaReporter, "lib/mochaIntellijReporter.js").getPath());

		state.addArgument("--ui");
		state.addArgument("bdd");
	}

	switch(myTargetType)
	{
		case DIRECTORY:
			state.addArgument("--recursive");
			state.addArgument(getDirectoryPath());
			break;
		case FILE:
			state.addArgument(getFilePath());
			break;
	}
	return state;
}
 
开发者ID:consulo,项目名称:consulo-nodejs,代码行数:60,代码来源:MochaConfiguration.java



注:本文中的com.intellij.execution.testframework.sm.runner.SMTRunnerConsoleProperties类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java VoiceMessage类代码示例发布时间:2022-05-22
下一篇:
Java Repository类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap