问题描述
当我从Eclipse运行硒测试时,我可以看到测试正在运行到浏览器中.
when i run the selenium test from Eclipse i can be able to see that tests are running into a browser.
但是当我在詹金斯(Jenkins)下运行测试时,我看不到浏览器正在进行任何测试.
But when i run the test under Jenkins, i can not see that any thing or any kind of test are going on the browsers.
但是当我查看Jenkins控制台时,我可以看到它一次又一次地运行所有测试,并且所有测试,构建都成功.
But when i look into the Jenkins console i can see that it is running all the test one after another and all the test, build are successful.
所以,我的问题是,当通过Jenkins运行测试时,为什么我看不到我的测试正在浏览器上运行.
注意:-我在 http://localhost:8080 下运行Jenkis- Windows 7的-在所有浏览器中
Note:- I am running Jenkis under http://localhost:8080- Windows 7- In all browser
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
推荐答案
您将看不到输出,因为Jenkins在后台将测试作为服务运行.
You won't see the output because Jenkins is running your tests as a service in the background.
您已登录到运行Jenkins作为服务的计算机的事实并不意味着它将在此显示输出.
The fact that you're logged into the machine running Jenkins as the service doesn't mean that it will show the output there.
这篇关于当詹金斯(Jenkins)运行硒测试时,无法在浏览器上运行硒测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!