当我从Eclipse运行selenium测试时,我可以看到测试正在运行到浏览器中。
但是当我在Jenkins下运行测试时,我看不出浏览器上有任何东西或任何类型的测试。
但是当我查看Jenkins控制台时,我可以看到它一个接一个地运行所有测试并且所有测试,构建都是成功的。
所以,我的问题是,当测试通过Jenkins运行时,我无法看到我的测试在浏览器上运行。
注意: - 我在http://localhost:8080下运行Jenkis - Windows 7的 - 在所有浏览器中
Jenkins控制台输出:
Started by user anonymous
[workspace] $ cmd /c call C:\Windows\TEMP\hudson3274622619396434505.bat
C:\Program Files (x86)\Jenkins\jobs\SS-Firefox\workspace>"C:\Selenium\workspace\SS\nosvn.bat"
C:\Program Files (x86)\Jenkins\jobs\SS-Firefox\workspace>rmdir /s /q "C:\Program Files (x86)\Jenkins\jobs\SS-Firefox\workspace\"
The process cannot access the file because it is being used by another process.
C:\Program Files (x86)\Jenkins\jobs\SS-Firefox\workspace>mkdir "C:\Program Files (x86)\Jenkins\jobs\SS-Firefox\workspace\"
A subdirectory or file C:\Program Files (x86)\Jenkins\jobs\SS-Firefox\workspace\ already exists.
C:\Program Files (x86)\Jenkins\jobs\SS-Firefox\workspace>xcopy "C:\Selenium\workspace\SS" "C:\Program Files (x86)\Jenkins\jobs\SS-Firefox\workspace" /e
C:\Selenium\workspace\SS\.classpath
C:\Selenium\workspace\SS\.project
C:\Selenium\workspace\SS\build.xml
C:\Selenium\workspace\SS\conditional-suite-build.xml
C:\Selenium\workspace\SS\nosvn.bat
C:\Selenium\workspace\SS\properties_build_clean_compile_report.xml
C:\Selenium\workspace\SS\readme.txt
C:\Selenium\workspace\SS\refactored-param-build.xml
C:\Selenium\workspace\SS\selenium.properties
C:\Selenium\workspace\SS\start_stop_selenium.xml
C:\Selenium\workspace\SS\suite-build.xml
C:\Selenium\workspace\SS\.settings\org.eclipse.jdt.core.prefs
C:\Selenium\workspace\SS\bin\com\eviltester\seleniumSimplified\calculate\CalculateTwoNumbersMultipleTests.class
C:\Selenium\workspace\SS\bin\com\eviltester\seleniumSimplified\calculate\CalculateTwoNumbersTestsTabFile.class
C:\Selenium\workspace\SS\bin\com\eviltester\seleniumSimplified\cookies\CookieTests.class
C:\Selenium\workspace\SS\bin\com\eviltester\seleniumSimplified\htmlform\Chrome_only_form_tests.class
C:\Selenium\workspace\SS\bin\com\eviltester\seleniumSimplified\htmlform\HTML_form_tests.class
C:\Selenium\workspace\SS\bin\com\eviltester\seleniumSimplified\javascript\AjaxPageTests.class
C:\Selenium\workspace\SS\bin\com\eviltester\seleniumSimplified\pageObjectModel\BasicAjaxPage.class
C:\Selenium\workspace\SS\bin\com\eviltester\seleniumSimplified\pageObjectModel\BasicHTMLForm.class
C:\Selenium\workspace\SS\bin\com\eviltester\seleniumSimplified\pageObjectModel\CalculateForm.class
C:\Selenium\workspace\SS\bin\com\eviltester\seleniumSimplified\pageObjectModel\HTMLFormResultsPage.class
C:\Selenium\workspace\SS\bin\com\eviltester\seleniumSimplified\pageObjectModel\SearchPage.class
C:\Selenium\workspace\SS\bin\com\eviltester\seleniumSimplified\search\SearchPageTests.class
C:\Selenium\workspace\SS\bin\com\eviltester\seleniumSimplified\testClasses\SeleniumSimplifiedTest$1.class
C:\Selenium\workspace\SS\bin\com\eviltester\seleniumSimplified\testClasses\SeleniumSimplifiedTest.class
C:\Selenium\workspace\SS\bin\com\eviltester\seleniumSimplified\testSuites\AllTestsAnyBrowserTestSuite.class
C:\Selenium\workspace\SS\bin\com\eviltester\seleniumSimplified\testSuites\AllTestsChromeOrFirefoxBrowserTestSuite.class
C:\Selenium\workspace\SS\bin\com\eviltester\seleniumSimplified\testSuites\AnyBrowserTestsGroup.class
C:\Selenium\workspace\SS\bin\com\eviltester\seleniumSimplified\testSuites\ChromeOrFirefoxBrowserTestsGroup.class
C:\Selenium\workspace\SS\bin\com\eviltester\seleniumSimplified\testSuites\TestSuite.class
C:\Selenium\workspace\SS\bin\com\eviltester\seleniumutils\seleniumManager\SeleniumManager.class
C:\Selenium\workspace\SS\bin\com\eviltester\seleniumutils\seleniumManager\TheSeleniumManager.class
C:\Selenium\workspace\SS\lib\junit-4.10.jar
C:\Selenium\workspace\SS\lib\readme.txt
C:\Selenium\workspace\SS\lib\selenium-server-standalone-2.14.0.jar
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-09-14\firefox_test_calculate_two_values_SeleniumException_screenshot.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-09-14\firefox_test_calculate_two_values_SeleniumException_screenshotfull.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-10-13\firefox_test_calculate_two_values_SeleniumException_screenshot.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-10-13\firefox_test_calculate_two_values_SeleniumException_screenshotfull.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-10-13\firefox_test_reverse_calculate_two_values_SeleniumException_screenshot.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-10-13\firefox_test_reverse_calculate_two_values_SeleniumException_screenshotfull.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-55-20\firefox_checkCookiesGetCreated_SeleniumException_screenshot.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-55-20\firefox_checkCookiesGetCreated_SeleniumException_screenshotfull.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-55-20\firefox_createCookieExplored_SeleniumException_screenshot.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-55-20\firefox_createCookieExplored_SeleniumException_screenshotfull.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-55-20\firefox_deleteCookieExplored_SeleniumException_screenshot.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-55-20\firefox_deleteCookieExplored_SeleniumException_screenshotfull.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-55-20\firefox_enterAnInvalidValueInBlurInputAndTriggerValidation_SeleniumException_screenshot.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-55-20\firefox_enterAnInvalidValueInBlurInputAndTriggerValidation_SeleniumException_screenshotfull.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-55-20\firefox_enterAnInvalidValueInBlurInput_SeleniumException_screenshot.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-55-20\firefox_enterAnInvalidValueInBlurInput_SeleniumException_screenshotfull.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-55-20\firefox_getCookieByNameExplored_SeleniumException_screenshot.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-55-20\firefox_getCookieByNameExplored_SeleniumException_screenshotfull.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-55-20\firefox_navigationTests_SeleniumException_screenshot.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-55-20\firefox_navigationTests_SeleniumException_screenshotfull.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-55-20\firefox_parseResultsOfGetCookieExplored_SeleniumException_screenshot.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-55-20\firefox_parseResultsOfGetCookieExplored_SeleniumException_screenshotfull.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-55-20\firefox_test_calculate_two_values_SeleniumException_screenshot.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-55-20\firefox_test_calculate_two_values_SeleniumException_screenshotfull.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-55-20\firefox_test_reverse_calculate_two_values_SeleniumException_screenshot.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-55-20\firefox_test_reverse_calculate_two_values_SeleniumException_screenshotfull.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-55-20\firefox_test_submit_form_without_clicking_submit_SeleniumException_screenshot.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-55-20\firefox_test_submit_form_without_clicking_submit_SeleniumException_screenshotfull.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-55-20\firefox_test_submit_form_with_default_values_SeleniumException_screenshot.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-55-20\firefox_test_submit_form_with_default_values_SeleniumException_screenshotfull.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-55-20\firefox_test_submit_form_with_new_details_SeleniumException_screenshot.png
C:\Selenium\workspace\SS\screenshots\2011-12-19-13-55-20\firefox_test_submit_form_with_new_details_SeleniumException_screenshotfull.png
C:\Selenium\workspace\SS\src\main\java\com\eviltester\seleniumSimplified\pageObjectModel\BasicAjaxPage.java
C:\Selenium\workspace\SS\src\main\java\com\eviltester\seleniumSimplified\pageObjectModel\BasicHTMLForm.java
C:\Selenium\workspace\SS\src\main\java\com\eviltester\seleniumSimplified\pageObjectModel\CalculateForm.java
C:\Selenium\workspace\SS\src\main\java\com\eviltester\seleniumSimplified\pageObjectModel\HTMLFormResultsPage.java
C:\Selenium\workspace\SS\src\main\java\com\eviltester\seleniumSimplified\pageObjectModel\SearchPage.java
C:\Selenium\workspace\SS\src\main\java\com\eviltester\seleniumSimplified\testClasses\SeleniumSimplifiedTest.java
C:\Selenium\workspace\SS\src\main\java\com\eviltester\seleniumutils\seleniumManager\SeleniumManager.java
C:\Selenium\workspace\SS\src\main\java\com\eviltester\seleniumutils\seleniumManager\TheSeleniumManager.java
C:\Selenium\workspace\SS\src\test\java\com\eviltester\seleniumSimplified\calculate\CalculateTwoNumbersMultipleTests.java
C:\Selenium\workspace\SS\src\test\java\com\eviltester\seleniumSimplified\calculate\CalculateTwoNumbersTestsTabFile.java
C:\Selenium\workspace\SS\src\test\java\com\eviltester\seleniumSimplified\cookies\CookieTests.java
C:\Selenium\workspace\SS\src\test\java\com\eviltester\seleniumSimplified\htmlform\Chrome_only_form_tests.java
C:\Selenium\workspace\SS\src\test\java\com\eviltester\seleniumSimplified\htmlform\HTML_form_tests.java
C:\Selenium\workspace\SS\src\test\java\com\eviltester\seleniumSimplified\javascript\AjaxPageTests.java
C:\Selenium\workspace\SS\src\test\java\com\eviltester\seleniumSimplified\search\SearchPageTests.java
C:\Selenium\workspace\SS\src\test\java\com\eviltester\seleniumSimplified\testSuites\AllTestsAnyBrowserTestSuite.java
C:\Selenium\workspace\SS\src\test\java\com\eviltester\seleniumSimplified\testSuites\AllTestsChromeOrFirefoxBrowserTestSuite.java
C:\Selenium\workspace\SS\src\test\java\com\eviltester\seleniumSimplified\testSuites\AnyBrowserTestsGroup.java
C:\Selenium\workspace\SS\src\test\java\com\eviltester\seleniumSimplified\testSuites\ChromeOrFirefoxBrowserTestsGroup.java
C:\Selenium\workspace\SS\src\test\java\com\eviltester\seleniumSimplified\testSuites\TestSuite.java
C:\Selenium\workspace\SS\src\test\resources\datafiles\calculate2numbers.tab
89 File(s) copied
[workspace] $ cmd.exe /C '"ant.bat && exit %%ERRORLEVEL%%"'
Buildfile: C:\Program Files (x86)\Jenkins\jobs\SS-Firefox\workspace\build.xml
clean:
makedir:
[mkdir] Created dir: C:\Program Files (x86)\Jenkins\jobs\SS-Firefox\workspace\build
[mkdir] Created dir: C:\Program Files (x86)\Jenkins\jobs\SS-Firefox\workspace\junit-results
[mkdir] Created dir: C:\Program Files (x86)\Jenkins\jobs\SS-Firefox\workspace\junit-report
compile:
[javac] Compiling 20 source files to C:\Program Files (x86)\Jenkins\jobs\SS-Firefox\workspace\build
[javac] Note: C:\Program Files (x86)\Jenkins\jobs\SS-Firefox\workspace\src\main\java\com\eviltester\seleniumSimplified\testClasses\SeleniumSimplifiedTest.java uses or overrides a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
all_selenium_tests:
run_param_junit_tests:
[junit] Running com.eviltester.seleniumSimplified.calculate.CalculateTwoNumbersMultipleTests
[junit] Tests run: 8, Failures: 0, Errors: 0, Time elapsed: 11,633 sec
[junit] Running com.eviltester.seleniumSimplified.calculate.CalculateTwoNumbersTestsTabFile
[junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 8,053 sec
[junit] Running com.eviltester.seleniumSimplified.cookies.CookieTests
[junit] Tests run: 5, Failures: 0, Errors: 0, Time elapsed: 18,025 sec
[junit] Running com.eviltester.seleniumSimplified.htmlform.Chrome_only_form_tests
[junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 8,444 sec
[junit] Running com.eviltester.seleniumSimplified.htmlform.HTML_form_tests
[junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 10,458 sec
[junit] Running com.eviltester.seleniumSimplified.javascript.AjaxPageTests
[junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 9,298 sec
[junit] Running com.eviltester.seleniumSimplified.search.SearchPageTests
[junit] Tests run: 4, Failures: 0, Errors: 0, Time elapsed: 6,863 sec
report-junit:
[junitreport] Processing C:\Program Files (x86)\Jenkins\jobs\SS-Firefox\workspace\junit-report\TESTS-TestSuites.xml to C:\Windows\TEMP\null931835500
[junitreport] Loading stylesheet jar:file:/C:/Program%20Files%20(x86)/WinAnt/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl
[junitreport] Transform time: 1228ms
[junitreport] Deleting: C:\Windows\TEMP\null931835500
BUILD SUCCESSFUL
Total time: 1 minute 21 seconds
Recording test results
Finished: SUCCESS
答案 0 :(得分:1)
您将看不到输出,因为Jenkins在后台将测试作为服务运行。
您登录运行Jenkins作为服务的计算机这一事实并不意味着它将在那里显示输出。
答案 1 :(得分:0)
所以你需要从CMD和用户进程启动jenkins。请找到相同的Start jenkins from command prompt