2013-08-07 4 views
1

SWTBot-Test에서받은 SWTException:Invalid thread access입니다. 그들은 일식에서 시작했을 때 모두 녹색으로 바뀌므로 문제는 반드시 pom.xml 안에 있어야합니다. 어떻게 해결할 수 있을까요?SWTBot-Test의 SWTException : 왜 Tycho + Surefire에 던져 집니까?

<!-- language: lang-xml --> 
<build> 
<plugins> 
<plugin> 
<groupId>org.eclipse.tycho</groupId> 
<artifactId>tycho-surefire-plugin</artifactId> 
<version>${tycho.version}</version> 
<configuration> 
    <testFailureIgnore>true</testFailureIgnore> 
    <failIfNoTests>false</failIfNoTests> 
    <forkedProcessTimeoutInSeconds>300</forkedProcessTimeoutInSeconds> 
    <useUIHarness>true</useUIHarness> 
    <useUIThread>false</useUIThread> 
    <showEclipseLog>true</showEclipseLog> 
    <dependencies> 
     <dependency> 
      <type>eclipse-plugin</type> 
      <artifactId>my.host.ui.bundle</artifactId> 
      <version>0.0.0</version> 
     </dependency> 
     <dependency> 
      <type>p2-installable-unit</type> 
      <artifactId>org.hamcrest</artifactId> 
      <version>1.1.0</version> 
     </dependency> 
     <dependency> 
      <type>installable-unit</type> 
      <artifactId>org.eclipse.ui</artifactId> 
      <version>0.0.0</version> 
     </dependency> 
     <dependency> 
      <type>installable-unit</type> 
      <artifactId>org.eclipse.ui.workbench</artifactId> 
      <version>0.0.0</version> 
     </dependency> 
     <dependency> 
      <type>p2-installable-unit</type> 
      <artifactId>org.eclipse.swtbot.eclipse.core</artifactId> 
      <version>2.0.4</version> 
     </dependency> 
     <dependency> 
      <type>p2-installable-unit</type> 
      <artifactId>org.eclipse.swtbot.eclipse.finder</artifactId> 
      <version>2.0.4</version> 
     </dependency> 
     <dependency> 
      <type>p2-installable-unit</type> 
      <artifactId>org.eclipse.swtbot.junit4_x</artifactId> 
      <version>2.0.4</version> 
     </dependency> 
     <dependency> 
      <type>p2-installable-unit</type> 
      <artifactId>org.eclipse.swtbot.swt.finder</artifactId> 
      <version>2.0.4</version> 
     </dependency> 
     <dependency> 
      <type>p2-installable-unit</type> 
      <artifactId>org.eclipse.swtbot.eclipse.finder</artifactId> 
      <version>2.0.4</version> 
     </dependency> 
     <dependency> 
      <type>p2-nstallable-unit</type> 
      <artifactId>org.eclipse.ui.navigator</artifactId> 
      <version>0.0.0</version> 
     </dependency> 
     <dependency> 
      <type>p2-installable-unit</type> 
      <artifactId>org.eclipse.ui.views</artifactId> 
      <version>0.0.0</version> 
     </dependency> 
    </dependencies> 
</configuration> 
</plugin> 
</plugins> 
</build> 

답변

0

당신은 OSX에 있다면, 참조 :

나는 시험 - 조각의 pom.xml 파일에 다음 인수 및 종속성을 사용 this thread

그렇지 않으면, pls. 실패한 테스트에 대한 자세한 내용을 제공하십시오.

+0

StackTrace 이외의 유용한 세부 정보는 무엇입니까? – Chriss

+0

나는 테스트에서 실제 코드를 의미했다. 스택 추적의 처음 몇 줄도 도움이 될 수 있습니다. –

0

어떤 테스트를 실행할 것인지 어떻게 말합니까? 다음과 같이 구성 했습니까?

<configuration> 
       ... 
       <testSuite>bundle.symbolic.name.of.test.plugin</testSuite> 
       <testClass>package.of.test.suite.YourTestSuiteOrClass</testClass> 
       ... 
</configuration>