2012-10-08 2 views
1

나는 windowtester pro로 UI 테스트 시스템을 설정하려고합니다. Tycho 플러그인을 사용하여 테스트를 메이븐 빌드 프로세스에 연결하려고합니다. 연습 목적으로 현재 예제 프로젝트를 사용하고 있습니다.tycho surefire with windowtester pro가 올바른 창을 열지 못합니다.

내 프로젝트를 빌드하면 모든 것이 잘 컴파일 된 것처럼 보이지만 테스트가 시작되면 다음 메시지가 표시되고 기본 Eclipse 창이 팝업됩니다. 그런 다음 해당 창에서 테스트가 실행되고 -suprise-가 실패합니다.

프레임 워크 인수 :

- 신청 org.eclipse.tycho.surefire.osgibooter.uitest -testproperties의 C : \ 사용자 \ JLA \ 작업 \ com.example.addressbook.test \ 대상 \ 확실한 .properties의

- 제품 com.example.addressbook.bundle.product

명령 줄 인수 :
-debug -consolelog -data C : \ Users \ jla \ workspace \ com.example.addressbook.test \ target \ work \ data -dev 파일 :/C : /Users/jla/workspace/com.example.addressbook.test/target/dev .properties의 - 신청 org.eclipse.tycho.surefire.osgibooter.uitest -testproperties의 C : \ 사용자 \ JLA \ 작업 \ com.example.addressbook.test \ 대상 \ surefire.properties - 제품 com.example.addressbook

!ENTRY org.eclipse.ui 4 4 2012-10-12 16:00:36.984 
!MESSAGE Exception in org.eclipse.ui.internal.FolderLayout.addView(String): 

org.eclipse.ui.PartInitException을 .bundle.product :보기 기술자를 찾을 수 없습니다 : org.eclipse.ui.navigator.ProjectExplorer

!ENTRY org.eclipse.ui 4 4 2012-10-12 16:00:36.990 
!MESSAGE Exception in org.eclipse.ui.internal.FolderLayout.addView(String): 
01 23,516,

org.eclipse.ui.PartInitException :보기 기술자를 찾을 수 없습니다 org.eclipse.ui.navigator.ProjectExplorer STACK 1 org.eclipse.ui.PartInitException! 찾을 수 없습니다보기 설명 : org.eclipse.ui를. navigator.ProjectExplorer

이것은 내가 내 테스트 프로젝트에 대해 가지고있는 pom.xml 파일입니다 :

<?xml version="1.0" encoding="UTF-8"?> 
<project 
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" 
    xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
    <modelVersion>4.0.0</modelVersion> 

    <parent> 
    <groupId>com.example.addressbook</groupId> 
    <artifactId>com.example.addressbook.build</artifactId> 
    <version>1.0.0-SNAPSHOT</version> 
    <relativePath>../com.example.addressbook.build</relativePath> 
    </parent> 

    <artifactId>com.example.addressbook.test</artifactId> 
    <packaging>eclipse-test-plugin</packaging> 

    <build> 
     <plugins> 
      <plugin> 
       <groupId>org.eclipse.tycho</groupId> 
       <artifactId>tycho-surefire-plugin</artifactId> 
       <version>${tycho-version}</version> 

       <configuration> 
        <testSuite>com.example.addressbook.test</testSuite> 
        <testClass>com.example.addressbook.test.AppTest001</testClass> 

        <useUIHarness>true</useUIHarness> 
        <useUIThread>true</useUIThread> 
        <!-- use our product and application to launch the tests --> 
        <product>com.example.addressbook.bundle.product</product> 
        <!-- <application>org.eclipse.ui.ide.workbench</application>--> 

        <dependencies> 
         <dependency> 
          <type>p2-installable-unit</type> 
          <artifactId>com.windowtester.runtime.feature.group</artifactId> 
          <version>0.0.0</version> 
         </dependency> 
        </dependencies> 
       </configuration> 

      </plugin> 
     </plugins> 
    </build> 


</project> 

답변

1

나는 마침내 그것이 작동되도록하는 방법을 발견했다. tycho가 Eclipse에서 작성한 프로젝트 정보를 사용하고 있으므로 MANIFEST.MF 파일에서 테스트 할 프로젝트를 참조해야합니다.

이 내 MANIFEST.MF 파일입니다

Bundle-Name: Test Bundle 
Bundle-Version: 1.0.0.qualifier 
Bundle-SymbolicName: com.example.addressbook.test 
Manifest-Version: 1.0 
Bundle-ManifestVersion: 2 
Bundle-RequiredExecutionEnvironment: JavaSE-1.6 
Require-Bundle: org.junit, 
com.windowtester.runtime, 
com.windowtester.swt.runtime, 
com.windowtester.swing.runtime, 
org.eclipse.jface, 
org.eclipse.core.runtime, 
org.eclipse.swt, 
com.example.addressbook.bundle, 
com.example.addressbook.services 

그리고 이것은 내 pom.xml 파일의 모습입니다. 참고 : 방금 제품 태그 바로 아래에 애플리케이션 태그를 추가했습니다.

<?xml version="1.0" encoding="UTF-8"?> 
<project 
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" 
    xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
    <modelVersion>4.0.0</modelVersion> 

    <parent> 
    <groupId>com.example.addressbook</groupId> 
    <artifactId>com.example.addressbook.build</artifactId> 
    <version>1.0.0-SNAPSHOT</version> 
    <relativePath>../com.example.addressbook.build</relativePath> 
    </parent> 

    <artifactId>com.example.addressbook.test</artifactId> 
    <packaging>eclipse-test-plugin</packaging> 

    <build> 
     <plugins> 
      <plugin> 
       <groupId>org.eclipse.tycho</groupId> 
       <artifactId>tycho-surefire-plugin</artifactId> 
       <version>${tycho-version}</version> 

       <configuration> 
        <testSuite>com.example.addressbook.test</testSuite> 
        <testClass>com.example.addressbook.test.AppTest01</testClass> 

        <useUIHarness>true</useUIHarness> 
        <useUIThread>true</useUIThread> 
        <!-- use our product and application to launch the tests --> 
        <product>com.example.addressbook.bundle.product</product> 
        <application>com.example.addressbook.bundle.application</application> 

        <dependencies> 
         <dependency> 
          <type>p2-installable-unit</type> 
          <artifactId>com.windowtester.runtime.feature.group</artifactId> 
          <version>0.0.0</version> 
         </dependency> 
        </dependencies> 
       </configuration> 

      </plugin> 
     </plugins> 
    </build> 


</project> 
관련 문제