Maven mvn不在appCenter上运行测试
我想在AppCenter上运行我的appium测试,我已经遵循了这些文档 当我在appCenter上运行appium脚本时,它不会显示任何错误,但会以Maven mvn不在appCenter上运行测试,maven,visual-studio-app-center,Maven,Visual Studio App Center,我想在AppCenter上运行我的appium测试,我已经遵循了这些文档 当我在appCenter上运行appium脚本时,它不会显示任何错误,但会以 [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------
[INFO] Building run-test 1.0-SNAPSHOT
[INFO] ----------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ run-test ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ run-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ run-test ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ run-test ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.20:test (default-test) @ run-test ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.testscripts.RegressionTest
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.247 s - in com.testscripts.RegressionTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ run-test ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: target/run-test-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- maven-failsafe-plugin:2.20:integration-test (default) @ run-test ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent! The file encoding for reports output files should be provided by the POM property ${project.reporting.outputEncoding}.
[INFO]
[INFO] --- maven-failsafe-plugin:2.20:verify (default) @ run-test ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.623 s
[INFO] Finished at: 2018-08-06T07:39:58+02:00
[INFO] Final Memory: 17M/214M
[INFO] ------------------------------------------------------------------------
POM.xml
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>Cure.fit</groupId>
<artifactId>Cure.fit</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>Automation Test Project</name>
<description>Automation Test Project</description>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<includes>
<include>**/*Test.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.appium/java-client -->
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>6.1.0</version>
</dependency>
<dependency>
<groupId>com.microsoft.appcenter</groupId>
<artifactId>appium-test-extension</artifactId>
<version>1.3</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>jcenter</id>
<url>https://jcenter.bintray.com/</url>
</repository>
</repositories>
<profiles>
<profile>
<id>repl</id>
<dependencies>
<dependency>
<groupId>com.javarepl</groupId>
<artifactId>javarepl</artifactId>
<version>428</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<configuration>
<executable>java</executable>
<classpathScope>test</classpathScope>
<arguments>
<argument>-Djansi.passthrough=true</argument>
<argument>-classpath</argument>
<classpath />
<argument>javarepl.Main</argument>
</arguments>
</configuration>
<executions>
<execution>
<id>runRepl</id>
<phase>process-test-classes</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!-- Added for AppCenter/Test runs -->
<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>
<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>
</project>
4.0.0
治愈
治愈
0.0.1-快照
自动化测试项目
自动化测试项目
1.8
1.8
org.apache.maven.plugins
maven surefire插件
2.19.1
**/*Test.java
朱尼特
朱尼特
4.12
木卫一
java客户端
6.1.0
com.microsoft.appcenter
appium测试扩展
1.3
jcenter
https://jcenter.bintray.com/
答复
com.javarepl
javarepl
428
org.codehaus.mojo
execmaven插件
JAVA
测试
-Djansi.passthrough=true
-类路径
javarepl.Main
runRepl
过程测试类
执行官
准备上传
org.apache.maven.plugins
maven依赖插件
2.10
复制依赖项
包裹
复制依赖项
${project.build.directory}/upload/dependency jars/
真的
真的
真的
org.apache.maven.plugins
maven帮助插件
2.2
生成聚甲醛
包裹
有效聚甲醛
${project.build.directory}/upload/pom.xml
org.apache.maven.plugins
maven资源插件
复制测试类
包裹
测试资源
${project.build.directory}/upload/test类
${project.build.testOutputDirectory}
当我运行与mvn测试相同的项目时,我能够运行测试
我在src/test/java下保留了我的JUnit测试用例名为RegressionTest.java,它扩展了Support.java,它也是JUnit文件
谁能帮我一下我犯了什么错误 您好,我建议您在Intercom(appcenter.ms右下角的小部件)中询问这个问题。您从
mvn-DskipTests-P prepare for upload package
中得到了什么输出?还需要仔细检查准备文档中的所有要求:不支持TestNG,不支持Android 4.2或更高版本,Maven版本必须至少为3.3.9,仅支持Appium版本1.7.1,JUnit 4.9或更高版本,不支持自动化浏览器或WebView上下文,当前不支持启动多个应用或不启动应用的测试。测试必须只启动一个应用程序。mvn-DskipTests-P prepare for upload package
以“[INFO]BUILD SUCCESS”的形式输出。此外,在本地,我的脚本工作正常。甚至他们的示例也尝试过,这也很好。当执行完成时,它会给出以下错误代码error:cannotruntests。返回退出代码2。
不确定退出代码2的含义。甚至不确定,这是app Center退出代码还是Maven用全新的眼光看待这一点-我认为您的POM文件可能缺少一个开始标记?