Есть отличная удаленная работа для php+codeception+jenkins+allure+docker спецов. 100% remote! Присоединиться к проекту

Проблема с запуском тестов в TeamCity (Java+WebDriwer+TestNG)

team-city
testng
webdriver
Теги: #<Tag:0x00007f7b64b2b538> #<Tag:0x00007f7b64b2b3f8> #<Tag:0x00007f7b64b2b2b8>

(Шевченко Владислав) #1

Написал несколько тестов, которые локально запускаются на "ура" так , как мне нужно.

Решил перенести запуск на сервер непрерывной интеграции TeamCity, который используется в нашем проекте.

Подноготную самих тестов пока описывать не буду. 

Для сборки проекта использую мавен.

На сервере тимсити сделал чекаут из свн своего проекта и проверил что все работает через mvn test.

Создал в тимсити билд конфиг на два шага : в одном запускаю мавен плагин compiler:compile, в дркгом : surefire:test

 

 

Не могу понять в чем причина, может кто-то подскажет в каком направлении копать.

Приложу билд лог того что получается

 

 

[19:59:20]Checking for changes
[19:59:21]Publishing internal artifacts (2s)
[19:59:24][Publishing internal artifacts] Sending build.start.properties.gz file
[19:59:21]Clearing temporary directory: C:\TeamCity\buildAgent\temp\buildTmp
[19:59:21]Checkout directory: C:\TeamCity\buildAgent\work\3134f9811001a660
[19:59:21]Updating sources: agent side checkout (4s)
[19:59:21][Updating sources] VCS Root: https://sentinel2.luxoft.com/svn/repos/INTHR2/TA (4s)
[19:59:21][VCS Root: https://sentinel2.luxoft.com/svn/repos/INTHR2/TA] revision: 2181_2013/01/10 17:21:01 +0300
[19:59:22][VCS Root: https://sentinel2.luxoft.com/svn/repos/INTHR2/TA] Fast SVN update is enabled
[19:59:26]Parameter "env.UserName" is undefined.
[19:59:26]Step 1/2: Compile (Maven) (8s)
[19:59:26][Step 1/2] ##teamcity[buildNumber '1.0.7']
[19:59:26][Step 1/2] Using watcher: C:\TeamCity\buildAgent\plugins\mavenPlugin\maven-watcher\maven-watcher-agent.jar
[19:59:26][Step 1/2] Initial M2_HOME = C:\Program Files\apache-maven-3.0.4
[19:59:26][Step 1/2] Current M2_HOME = C:\Program Files\apache-maven-3.0.4
[19:59:26][Step 1/2] PATH = C:\Program Files\apache-maven-3.0.4\bin;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Program Files\CollabNet\Subversion Client;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\ c:\Program Files\Java\jdk1.7.0_09\\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\Program Files\Java\jdk1.7.0_09\\bin;C:\Program Files\apache-maven-3.0.4\bin;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static
[19:59:27][Step 1/2] Initial MAVEN_OPTS not set
[19:59:27][Step 1/2] Current MAVEN_OPTS not set
[19:59:27][Step 1/2] Starting: "C:\Program Files\Java\jdk1.7.0_09\bin\java.exe" -DFxCopCmdFileVersion=10.0.30319.1 "-DFxCopRoot=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop" "-DMSTest.10.0=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe" -Dagent.home.dir=C:\TeamCity\buildAgent -Dagent.name=IntHR-CI -Dagent.ownPort=9090 -Dagent.work.dir=C:\TeamCity\buildAgent\work -Dbuild.number=1.0.7 -Dbuild.vcs.number=2181 -Dbuild.vcs.number.1=2181 -Dbuild.vcs.number.https___sentinel2_luxoft_com_svn_repos_INTHR2_TA=2181 -Dclassworlds.conf=C:\TeamCity\buildAgent\temp\buildTmp\teamcity.m2.conf -Dcom.jetbrains.maven.watcher.report.file=C:\TeamCity\buildAgent\temp\buildTmp\maven-build-info.xml -Dfile.encoding=Cp1251 -Dfile.separator=\ -Djava.io.tmpdir=C:\TeamCity\buildAgent\temp\buildTmp "-Dmaven.home=C:\Program Files\apache-maven-3.0.4" -Dmaven.repo.local=C:/Users/vshevchenko/.m2/repository -Dos.arch=x86 "-Dos.name=Windows 7" -Dos.version=6.1 -Dpath.separator=; -Dteamcity.agent.cpuBenchmark=470 -Dteamcity.agent.dotnet.agent_url=http://localhost:9090/RPC2 -Dteamcity.agent.dotnet.build_id=1768 -Dteamcity.auth.password=C6AI1L8SMlNJSdEz2T2fPy4hWUGgB4YP -Dteamcity.auth.userId=TeamCityBuildId=1768 -Dteamcity.build.changedFiles.file=C:\TeamCity\buildAgent\temp\buildTmp\changedFiles1489906246700230396.txt -Dteamcity.build.checkoutDir=C:\TeamCity\buildAgent\work\3134f9811001a660 -Dteamcity.build.id=1768 -Dteamcity.build.properties.file=C:\TeamCity\buildAgent\temp\buildTmp\teamcity.build346308489348972946.properties -Dteamcity.build.tempDir=C:\TeamCity\buildAgent\temp\buildTmp -Dteamcity.build.workingDir=C:\TeamCity\buildAgent\work\3134f9811001a660 -Dteamcity.buildConfName=AutomationTestCompile -Dteamcity.buildType.id=bt12 -Dteamcity.configuration.properties.file=C:\TeamCity\buildAgent\temp\buildTmp\teamcity.config4112943368847315965.properties -Dteamcity.dotnet.nunitaddin=C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.TeamCity.NUnitAddin-NUnit -Dteamcity.dotnet.nunitlauncher=C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe -Dteamcity.dotnet.nunitlauncher.msbuild.task=C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.MSBuildLoggers.dll -Dteamcity.dotnet.nunitlauncher1.1=C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher1.1.exe -Dteamcity.dotnet.nunitlauncher2.0=C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher2.0.exe -Dteamcity.dotnet.nunitlauncher2.0.vsts=C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher2.0.VSTS.exe -Dteamcity.dotnet.platform=C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.TeamCity.PlatformProcessRunner.1.1.exe -Dteamcity.maven.watcher.home=C:\TeamCity\buildAgent\plugins\mavenPlugin\maven-watcher -Dteamcity.projectName=IntHR -Dteamcity.runner.properties.file=C:\TeamCity\buildAgent\temp\buildTmp\teamcity.runner5680823700398857139.properties -Dteamcity.tests.recentlyFailedTests.file=C:\TeamCity\buildAgent\temp\buildTmp\testsToRunFirst4060227872866423603.txt "-Dteamcity.version=7.1.1 (build 24074)" -Duser.country=RU -Duser.home=C:\Users\vshevchenko -Duser.language=ru -Duser.name=VShevchenko -Duser.timezone=Europe/Minsk -Duser.variant= -classpath "C:\Program Files\apache-maven-3.0.4\boot\plexus-classworlds-2.4.jar;" org.codehaus.plexus.classworlds.launcher.Launcher -f C:\TeamCity\buildAgent\work\3134f9811001a660\pom.xml -B compiler:compile
[19:59:27][Step 1/2] in directory: C:\TeamCity\buildAgent\work\3134f9811001a660
[19:59:31][Step 1/2] [INFO] Scanning for projects...
[19:59:31][Step 1/2] [INFO]
[19:59:31][Step 1/2] [INFO] ------------------------------------------------------------------------
[19:59:31][Step 1/2] [INFO] Building IntHR 1.0
[19:59:31][Step 1/2] [INFO] ------------------------------------------------------------------------
[19:59:31][Step 1/2] IntHR:IntHR (2s)
[19:59:31][IntHR:IntHR] Importing data from 'C:/TeamCity/buildAgent/work/3134f9811001a660/target/surefire-reports/TEST-*.xml' with 'surefire' processor
[19:59:31][IntHR:IntHR] Surefire report watcher
[19:59:31][Surefire report watcher] Watching paths:
[19:59:31][Surefire report watcher] C:\TeamCity\buildAgent\work\3134f9811001a660\target\surefire-reports\TEST-*.xml
[19:59:33][IntHR:IntHR] [INFO]
[19:59:33][IntHR:IntHR] [INFO] --- maven-compiler-plugin:2.3.2:compile (default-cli) @ IntHR ---
[19:59:33][IntHR:IntHR] [INFO] Nothing to compile - all classes are up to date
[19:59:33][Step 1/2] [INFO] ------------------------------------------------------------------------
[19:59:33][Step 1/2] [INFO] BUILD SUCCESS
[19:59:33][Step 1/2] [INFO] ------------------------------------------------------------------------
[19:59:33][Step 1/2] [INFO] Total time: 2.417s
[19:59:33][Step 1/2] [INFO] Finished at: Fri Jan 11 19:59:33 FET 2013
[19:59:33][Step 1/2] [INFO] Final Memory: 7M/108M
[19:59:33][Step 1/2] [INFO] ------------------------------------------------------------------------
[19:59:33][Step 1/2] Process exited with code 0
[19:59:33][Step 1/2] Publishing artifacts
[19:59:33][Publishing artifacts] Collecting files to publish: [C:\TeamCity\buildAgent\temp\buildTmp\.tc-maven-bi\maven-build-info.xml.gz => .teamcity]
[19:59:33][Publishing artifacts] Sending C:/TeamCity/buildAgent/temp/buildTmp/.tc-maven-bi/maven-build-info.xml.gz
[19:59:34]Step 2/2: Maven
[19:59:34][Step 2/2] Using watcher: C:\TeamCity\buildAgent\plugins\mavenPlugin\maven-watcher\maven-watcher-agent.jar
[19:59:34][Step 2/2] Initial M2_HOME = C:\Program Files\apache-maven-3.0.4
[19:59:34][Step 2/2] Current M2_HOME = C:\Program Files\apache-maven-3.0.4
[19:59:34][Step 2/2] PATH = C:\Program Files\apache-maven-3.0.4\bin;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Program Files\CollabNet\Subversion Client;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\ c:\Program Files\Java\jdk1.7.0_09\\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Windows\System32\WindowsPowerShell\v1.0\;c:\Program Files\Java\jdk1.7.0_09\\bin;C:\Program Files\apache-maven-3.0.4\bin;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static
[19:59:34][Step 2/2] Initial MAVEN_OPTS not set
[19:59:34][Step 2/2] Current MAVEN_OPTS not set
[19:59:34][Step 2/2] Starting: "C:\Program Files\Java\jdk1.7.0_09\bin\java.exe" -DFxCopCmdFileVersion=10.0.30319.1 "-DFxCopRoot=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop" "-DMSTest.10.0=C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe" -Dagent.home.dir=C:\TeamCity\buildAgent -Dagent.name=IntHR-CI -Dagent.ownPort=9090 -Dagent.work.dir=C:\TeamCity\buildAgent\work -Dbuild.number=1.0.7 -Dbuild.vcs.number=2181 -Dbuild.vcs.number.1=2181 -Dbuild.vcs.number.https___sentinel2_luxoft_com_svn_repos_INTHR2_TA=2181 -Dclassworlds.conf=C:\TeamCity\buildAgent\temp\buildTmp\teamcity.m2.conf -Dcom.jetbrains.maven.watcher.report.file=C:\TeamCity\buildAgent\temp\buildTmp\maven-build-info.xml -Dfile.encoding=Cp1251 -Dfile.separator=\ -Djava.io.tmpdir=C:\TeamCity\buildAgent\temp\buildTmp "-Dmaven.home=C:\Program Files\apache-maven-3.0.4" -Dmaven.repo.local=C:/Users/vshevchenko/.m2/repository -Dos.arch=x86 "-Dos.name=Windows 7" -Dos.version=6.1 -Dpath.separator=; -Dteamcity.agent.cpuBenchmark=470 -Dteamcity.agent.dotnet.agent_url=http://localhost:9090/RPC2 -Dteamcity.agent.dotnet.build_id=1768 -Dteamcity.auth.password=C6AI1L8SMlNJSdEz2T2fPy4hWUGgB4YP -Dteamcity.auth.userId=TeamCityBuildId=1768 -Dteamcity.build.changedFiles.file=C:\TeamCity\buildAgent\temp\buildTmp\changedFiles1489906246700230396.txt -Dteamcity.build.checkoutDir=C:\TeamCity\buildAgent\work\3134f9811001a660 -Dteamcity.build.id=1768 -Dteamcity.build.properties.file=C:\TeamCity\buildAgent\temp\buildTmp\teamcity.build346308489348972946.properties -Dteamcity.build.tempDir=C:\TeamCity\buildAgent\temp\buildTmp -Dteamcity.build.workingDir=C:\TeamCity\buildAgent\work\3134f9811001a660 -Dteamcity.buildConfName=AutomationTestCompile -Dteamcity.buildType.id=bt12 -Dteamcity.configuration.properties.file=C:\TeamCity\buildAgent\temp\buildTmp\teamcity.config4112943368847315965.properties -Dteamcity.dotnet.nunitaddin=C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.TeamCity.NUnitAddin-NUnit -Dteamcity.dotnet.nunitlauncher=C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher.exe -Dteamcity.dotnet.nunitlauncher.msbuild.task=C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.MSBuildLoggers.dll -Dteamcity.dotnet.nunitlauncher1.1=C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher1.1.exe -Dteamcity.dotnet.nunitlauncher2.0=C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher2.0.exe -Dteamcity.dotnet.nunitlauncher2.0.vsts=C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.BuildServer.NUnitLauncher2.0.VSTS.exe -Dteamcity.dotnet.platform=C:\TeamCity\buildAgent\plugins\dotnetPlugin\bin\JetBrains.TeamCity.PlatformProcessRunner.1.1.exe -Dteamcity.maven.watcher.home=C:\TeamCity\buildAgent\plugins\mavenPlugin\maven-watcher -Dteamcity.projectName=IntHR -Dteamcity.runner.properties.file=C:\TeamCity\buildAgent\temp\buildTmp\teamcity.runner5680823700398857139.properties -Dteamcity.tests.recentlyFailedTests.file=C:\TeamCity\buildAgent\temp\buildTmp\testsToRunFirst4060227872866423603.txt "-Dteamcity.version=7.1.1 (build 24074)" -Duser.country=RU -Duser.home=C:\Users\vshevchenko -Duser.language=ru -Duser.name=VShevchenko -Duser.timezone=Europe/Minsk -Duser.variant= -classpath "C:\Program Files\apache-maven-3.0.4\boot\plexus-classworlds-2.4.jar;" org.codehaus.plexus.classworlds.launcher.Launcher -f C:\TeamCity\buildAgent\work\3134f9811001a660\pom.xml -B surefire:test
[19:59:34][Step 2/2] in directory: C:\TeamCity\buildAgent\work\3134f9811001a660
[19:59:35][Step 2/2] [INFO] Scanning for projects...
[19:59:35][Step 2/2] [INFO]
[19:59:35][Step 2/2] [INFO] ------------------------------------------------------------------------
[19:59:35][Step 2/2] [INFO] Building IntHR 1.0
[19:59:35][Step 2/2] [INFO] ------------------------------------------------------------------------
[19:59:35][Step 2/2] IntHR:IntHR (2s)
[19:59:35][IntHR:IntHR] Importing data from 'C:/TeamCity/buildAgent/work/3134f9811001a660/target/surefire-reports/TEST-*.xml' with 'surefire' processor
[19:59:35][IntHR:IntHR] Surefire report watcher
[19:59:35][Surefire report watcher] Watching paths:
[19:59:35][Surefire report watcher] C:\TeamCity\buildAgent\work\3134f9811001a660\target\surefire-reports\TEST-*.xml
[19:59:36][IntHR:IntHR] [INFO]
[19:59:36][IntHR:IntHR] [INFO] --- maven-surefire-plugin:2.12.4:test (default-cli) @ IntHR ---
[19:59:38][IntHR:IntHR] [INFO] No tests to run.
[19:59:38][Step 2/2] [INFO] ------------------------------------------------------------------------
[19:59:38][Step 2/2] [INFO] BUILD SUCCESS
[19:59:38][Step 2/2] [INFO] ------------------------------------------------------------------------
[19:59:38][Step 2/2] [INFO] Total time: 2.633s
[19:59:38][Step 2/2] [INFO] Finished at: Fri Jan 11 19:59:38 FET 2013
[19:59:38][Step 2/2] [INFO] Final Memory: 7M/105M
[19:59:38][Step 2/2] [INFO] ------------------------------------------------------------------------
[19:59:38][Step 2/2] Process exited with code 0
[19:59:38][Step 2/2] Publishing artifacts
[19:59:38][Publishing artifacts] Collecting files to publish: [C:\TeamCity\buildAgent\temp\buildTmp\.tc-maven-bi\maven-build-info.1.xml.gz => .teamcity]
[19:59:38][Publishing artifacts] Sending C:/TeamCity/buildAgent/temp/buildTmp/.tc-maven-bi/maven-build-info.1.xml.gz
[19:59:38]Waiting for 2 service processes to complete
[19:59:38]Publishing internal artifacts
[19:59:38][Publishing internal artifacts] Sending build.finish.properties.gz file
[19:59:39]Build finished
    •  

(Mykhailo Poliarush) #2

такой ощущение, что в первом случае классы не компилируются

соответственно, вторая задача не видит, что прогонять, так как тесты не скомпилировались.

проверьте, что в результате компилирования созданны файлы для тестовых классов


(Шевченко Владислав) #3

[IntHR:IntHR] [INFO] Compiling 29 source files to C:\TeamCity\buildAgent\work\3134f9811001a660\target\clases

При переходе в эту папку были обнаружены файлы .class всех PageObject.

Но почему то не видно скомпилированых тестовых классов.

Делаю вывод - что они не скомпилировались совсем. Возможно проблема в этом.

 

 


(Mykhailo Poliarush) #4

да вы верно рассуждаете, тестовые классы должны быть скомпилированны

тогда maven пройдется по файлам и соберет тесты, которые там есть

вам надо копать в эту сторону