0
我想要這個問題的反面:How do I turn off 1-line error reporting in Failsafe?,所以我做了相反的,因爲它在那裏解釋,我把<trimStackTrace>true</trimStackTrace>
的<configuration>
部分的「maven-surefire插件」,但我仍然沒有得到「1線這裏所描述的錯誤摘要」:The 1-line error summary,我得到這個輸出,當我鍵入:如何獲取maven輸出中的1行錯誤摘要?
mvn clean test
或生成HTML報告:
mvn surefire-report:report site -DgenerateReports=false -Dtest=TestWebPcQubitArV5
與這兩個合作mmands我得到這個詳細程度對於每個失敗的測試用例:
Running tv.qubit.suites.TestWebPcQubitCoV5
Tests run: 5, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 196.798 sec <<< FAILURE! - in tv.qubit.suites.TestWebPcQubitCoV5
testLandingPage(tv.qubit.suites.TestWebPcQubitCoV5) Time elapsed: 40.344 sec <<< ERROR!
org.openqa.selenium.NoSuchElementException:
no such element: Unable to locate element: {"method":"link text","selector":"Comenzá tu mes gratis"}
(Session info: chrome=53.0.2785.92)
(Driver info: chromedriver=2.23.409687 (c46e862757edc04c06b1bd88724d15a5807b84d1),platform=Linux 4.7.2-1-ARCH x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 30.06 seconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: 'unknown', revision: '31c43c8', time: '2016-08-02 21:57:56 -0700'
System info: host: 'arch', ip: '127.0.0.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.7.2-1-ARCH', java.version: '1.8.0_102'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Capabilities [{applicationCacheEnabled=false, rotatable=false, mobileEmulationEnabled=false, networkConnectionEnabled=false, chrome={chromedriverVersion=2.23.409687 (c46e862757edc04c06b1bd88724d15a5807b84d1), userDataDir=/tmp/.org.chromium.Chromium.m22jAs}, takesHeapSnapshot=true, databaseEnabled=false, handlesAlerts=true, hasTouchScreen=false, version=53.0.2785.92, platform=LINUX, browserConnectionEnabled=false, nativeEvents=true, acceptSslCerts=true, locationContextEnabled=true, webStorageEnabled=true, browserName=chrome, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 036114974517a8f9c7215f2e615ffb27
*** Element info: {Using=link text, value=Comenzá tu mes gratis}
at tv.qubit.suites.TestWebPcQubitCoV5.testLandingPage(TestWebPcQubitCoV5.java:67)
當我想我得到類似的文件說:
Failed tests:
Test1.assertion1:59 Bending maths expected:<[123]> but was:<[312]>
Test1.assertion2:64 True is false
Tests in error:
Test1.nullPointerInLibrary:38 » NullPointer
Test1.failInMethod:43->innerFailure:68 NullPointer Fail here
Test1.failInLibInMethod:48 » NullPointer
Test1.failInNestedLibInMethod:54->nestedLibFailure:72 » NullPointer
Test2.test6281:33 Runtime FailHere
上面的輸出'對於文檔...'是來自seleinum ...並且來自Maven .. – khmarbaise
是的,兩個輸出都是,第一個是我得到的maven的輸出,但也是硒輸出 –