在Visual Studio App Center上执行iOS设备的自动化脚本时出现问题(分叉过程中发生错误)

我正在Visual Studio App Center云的真实设备上执行自动化脚本。 我正在错误以下。  错误:存在测试失败 分叉过程中出现错误 Sun.reflect.annotation.TypeNotPresentExceptionProxy org.apache.maven.surefire.booter.SurefireBooterForkException:分叉过程中发生错误 sun.reflect.annotation.TypeNotPresentExceptionProxy

我可以在本地设备上使用Maven执行相同的代码,但是在Visual Studio应用程序中心失败。 我的文件夹结构是  src / main / java -所有用于存储定位器的java文件。 src /测试/ java -所有测试文件都存储在此位置。

这是我的pom.xml文件,其中添加了所有依赖项

    <dependency>
        <groupId>com.microsoft.appcenter</groupId>
        <artifactId>appium-test-extension</artifactId>
        <version>1.5</version>
    </dependency>
    <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.1.6.RELEASE</version>
    </dependency>
</dependencies>
<repositories>
    <repository>
        <id>jcenter</id>
        <url>https://jcenter.bintray.com/</url>
    </repository>
</repositories>
<build>
    <plugins>
        <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.0</version>
            <configuration>
                <source>1.6</source>
                <target>1.6</target>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>3.0.0-M3</version>
            <configuration>
                <includes>
                    <include>${runSuite}</include>
                </includes>
                <useSystemClassLoader>false</useSystemClassLoader>
            </configuration>
        </plugin>

        <!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> 
            <version>2.12.4</version> <configuration> <includes> <include>${runSuite}</include> 
            </includes> <parallel>methods</parallel> <threadCount>20</threadCount> <redirectTestOutputToFile>true</redirectTestOutputToFile> 
            </configuration> </plugin> -->
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>3.0.0-M1</version>
            <executions>
                <execution>
                    <phase>integration-test</phase>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

<profiles>
    <profile>
        <id>prepare-for-upload</id>
        <build>
            <plugins>               
                <plugin>

                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>2.10</version>
                    <executions>
                        <execution>
                            <id>copy-dependencies</id>
                            <phase>package</phase>
                            <goals>
                                <goal>copy-dependencies</goal>
                            </goals>
                            <configuration>
                                <outputDirectory>${project.build.directory}/upload/dependency-jars/</outputDirectory>
                                <useRepositoryLayout>true</useRepositoryLayout>
                                <copypom>true</copypom>
                                <addParentPoms>true</addParentPoms>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-help-plugin</artifactId>
                    <version>2.2</version>
                    <executions>
                        <execution>
                            <id>generate-pom</id>
                            <phase>package</phase>
                            <goals>
                                <goal>effective-pom</goal>
                            </goals>
                            <configuration>
                                <output>${project.build.directory}/upload/pom.xml</output>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.0.2</version>
                    <executions>
                        <execution>
                            <id>copy-testclasses</id>
                            <phase>package</phase>
                            <goals>
                                <goal>testResources</goal>
                            </goals>
                            <configuration>
                                <outputDirectory>${project.build.directory}/upload/test-classes</outputDirectory>
                                <resources>
                                    <resource>
                                        <directory>
                                            ${project.build.testOutputDirectory}
                                        </directory>
                                    </resource>
                                </resources>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
    </profile>
</profiles>

owensun0306 回答:在Visual Studio App Center上执行iOS设备的自动化脚本时出现问题(分叉过程中发生错误)

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3147695.html

大家都在问