2016-09-03 24 views
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 
+0

上面的输出'对于文档...'是来自seleinum ...并且来自Maven .. – khmarbaise

+0

是的,两个输出都是,第一个是我得到的maven的输出,但也是硒输出 –

回答

0

我的坏...的1线输出,显示如下每个错误的完整跟踪。由于我使用Maven一个初学者,我错误地认为鑫卡特的输出将只显示1行简短的错误,而不是一切......

下面是行家全力输出的以下部分:

Results : 

Tests in error: 
tv.qubit.suites.TestWebPcQubitCoV5.testLandingPage(tv.qubit.suites.TestWebPcQubitCoV5) 
    Run 1: TestWebPcQubitCoV5.testLandingPage:67 » NoSuchElement no such element: Unable ... 
    Run 2: TestWebPcQubitCoV5.testLandingPage:67 » NoSuchElement no such element: Unable ... 
    Run 3: TestWebPcQubitCoV5.testLandingPage:67 » NoSuchElement no such element: Unable ...