Не запускаються через Maven, отримую таку відповідь:
[INFO] Scanning for projects…
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building GmailProject 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] — maven-resources-plugin:2.5:resources (default-resources) @ GmailProject —
[debug] execute contextualize
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO]
[INFO] — maven-compiler-plugin:2.3.2:compile (default-compile) @ GmailProject —
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] — maven-resources-plugin:2.5:testResources (default-testResources) @ GmailProject —
[debug] execute contextualize
[INFO] Using ‘UTF-8’ encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] — maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ GmailProject —
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] — maven-surefire-plugin:2.10:test (default-test) @ GmailProject —
[INFO] Surefire report directory: F:\IdeaProjects\TestGmailProject\target\surefire-reports
T E S T S
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.202s
[INFO] Finished at: Thu Jun 18 09:01:46 EEST 2015
[INFO] Final Memory: 8M/92M
[INFO] ------------------------------------------------------------------------
Process finished with exit code 0
Вручну, по одному тести виконуються. Файл pop.xml має такий вигляд:
<?xml version="1.0" encoding="UTF-8"?>
<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>groupId</groupId>
<artifactId>GmailProject</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.45.0</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.1.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.46.0</version>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<compiler.version>1.7</compiler.version>
<surefire.plugin.version>2.18.1</surefire.plugin.version>
</properties>
<profiles>
<profile>
<id>ui_test</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>selenium-maven-plugin</artifactId>
<version>2.3</version>
<configuration>
<browser>*googlechrome</browser>
<suite>${project.basedir}/src/test/resources/${suite}.xml</suite>
<startURL>http://google.com</startURL>
</configuration>
<executions>
<execution>
<id>run-selenium-tests</id>
<phase>test</phase>
<goals>
<goal>selenese</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
html зі списком тестів так виглядає:
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="Safari Health Check" verbose="2">
<test name="Login And Logout test">
<classes>
<class name="LogInAndLogOut"/>
</classes>
</test>
<test name="Create Folder In GoogleDrive test">
<classes>
<class name="CreatFolderInGoogleDrive"/>
</classes>
</test>
<test name="Login On Gmail test">
<classes>
<class name="LoginOnGmail"/>
</classes>
</test>
</suite>
Підкажіть, в чому проблема? Може Maven не коректно налаштований? Настройки виконав по цій- статті. Якщо створити проект мавена через консоль - то тест виконується:
mvn archetype:generate -DgroupId=com.mycompany.app -DartifactId=my-app -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false
Буду дуже вдячний за допомогу!