文件名称:suiteJunit.vm

文件路径:src\fitnesse\resources\templates

添加如下黑体部分内容:

<?xml version="1.0"?>
#set( $String = "" )
#macro( format $s )$String.format("%.3f", $s)#end
#set($suiteTotalRunTimeSeconds = $suiteExecutionReport.totalRunTimeInMillis / 1000.0 )
<testsuite name="#escape($suiteExecutionReport.rootPath)" tests="$suiteExecutionReport.pageHistoryReferences.size()" failures="$suiteExecutionReport.finalCounts.wrong" disabled="$suiteExecutionReport.finalCounts.ignores" errors="$suiteExecutionReport.finalCounts.exceptions" time="#format($suiteTotalRunTimeSeconds)">
#foreach ($reference in $suiteExecutionReport.pageHistoryReferences)
#set($classname = $formatter.getClassName($reference))
#set($runTimeSeconds = $reference.RunTimeInMillis / 1000.0 )
#if($reference.testSummary.exceptions > 0 || $reference.testSummary.wrong > 0 )
<testcase name="#escape($reference.pageName)" assertions="$reference.testSummary.right" time="#format($runTimeSeconds)">
#if($reference.testSummary.exceptions > 0)
<error message="$reference.testSummary.exceptions exceptions"/>
#end
#if($reference.testSummary.wrong > 0)
<failure message="$reference.testSummary.wrong errors"/>
#end
<system-out>$reference.pageName?pageHistory&amp;resultDate=$reference.resultDate</system-out>
</testcase>
#end

#end
</testsuite>

测试:

http://localhost:8001/FitNesse.SuiteAcceptanceTests.SuiteWikiPageResponderTests?responder=suite&format=junit

全部成功情况:

<?xml version="1.0"?>
<testsuite name="FitNesse.SuiteAcceptanceTests.SuiteWikiPageResponderTests" tests="6" failures="0" disabled="0" errors="0" time="4.539">
</testsuite>

部分失败情况:

<?xml version="1.0"?>
<testsuite name="FitNesse.SuiteAcceptanceTests.SuiteWikiPageResponderTests" tests="6" failures="1" disabled="0" errors="0" time="5.039">
<testcase name="FitNesse.SuiteAcceptanceTests.SuiteWikiPageResponderTests.TestBreadCrumbs" assertions="13" time="0.918">
<failure message="1 errors"/>
<system-out>FitNesse.SuiteAcceptanceTests.SuiteWikiPageResponderTests.TestBreadCrumbs?pageHistory&amp;resultDate=20160929211032</system-out>
</testcase>
</testsuite>

在junit格式的结果信息中只包含错误信息的修改方法的更多相关文章

  1. 遍历ModelState中存储的错误信息

    在服务器端验证中,有时我们添加了一个ModelError,然后还需要将该信息以JS的形式返回到客户端.如: [HttpPost] public ActionResult Index(LogOnMode ...

  2. maven的setting.xml文件中只配置本地仓库路径的方法

    maven的setting.xml文件中只配置本地仓库路径的方法 即:settings标签下只有一个 localRepository标签,其他全部注释掉即可 <?xml version=&quo ...

  3. 如何在静态博客hexo中只显示摘要信息

    默认情况下hexo博客(如本站)的首页显示的是完整的文章 – 而文章比较长的时候这无疑会带来诸多不遍. 那怎么样才能只显示个摘要呢? 方法说白了,其实很简单 – 只要加入一个<!-- more ...

  4. windows下cmd时复制dos中的内容 错误信息等

    16:28 2015/11/23小发现 windows下cmd时复制dos中的内容,错误信息等:鼠标右键选择标记,然后ctrl c 即可.

  5. django中ModelForm save方法 以及快速生成空表单或包含数据的表单 包含错误信息

    django中ModelForm学习系列一~save方法 Model代码 from django.db import models # Create your models here. class P ...

  6. ASP.Net MVC3/4中Model验证错误信息的本地化

    最近使用ASP.Net MVC4做一个B/S的管理系统,里面有N多的Action和View Model,View Model上又有N多的验证. 一开始写的时候虽然知道要实现多语言,但是没有过多考虑,本 ...

  7. spring boot中实现security错误信息本地化

    一.修改messages.properties 找源码中的messages.properties,复制一份放在classpath下,修改你要修改的内容 AbstractUserDetailsAuthe ...

  8. 统一处理jquery ajax请求过程中的异常错误信息的机制

    当jQuery ajax向服务器发送请求,服务器发生异常,比如:400.403.404.500等异常,服务器将异常响应给客户端,此时的ajax可以获取异常信息并进行处理,但此时我们一般是跳转到与异常编 ...

  9. Winform中只运行运行一个实例的方法

    在Program类的main方法按如下代码编写即可 1 static void Main() 2 { 3 if (Process.GetProcessesByName(Process.GetCurre ...

随机推荐

  1. iOS移动开发周报-第16期

    iOS移动开发周报-第16期 [摘要]:本期iOS移动开发周报带来如下内容:i​OS 8的新特性,敏感逻辑的保护方案,iOS绘图教程,WKWebView的使用等. 教程 <i​OS 8>: ...

  2. FICO credit score

    http://www.bankrate.com/finance/credit/what-is-a-fico-score.aspx Anyone who’s ever thought about loo ...

  3. 编译和使用bsdiff

    在android开发中,越到后面生成apk文件越来越大,每次用户更新都是全部下载更新,浪费时间和流量,如果能增量更新就不错了,使用bsdiff就是为了生成更新包 bsdiff下载地址:http://w ...

  4. MFC获取电脑硬盘序列号(附源代码)

    在新建的project里面加入一个类  即:下面一个类  GetHDSerial.cpp <code class="hljs cs has-numbering" style= ...

  5. HTML中级教程 元标签

    元标签对浏览器窗口中的内容不做任何事情,它们用在关于页面的像搜索引擎的归类目录信息中. 元标签meta可以使用尽可能多次如你所需,包括内容属性content(必须的).名称属性name和http-eq ...

  6. 解决Android Studio Fetching Android SDK component information失败问题【转】

    本文转载自:http://blog.csdn.net/isesar/article/details/41908089 Android Studio 安装完成后,如果直接启动,Android Studi ...

  7. java引用问题(—)

    为了美观起见,将说明性问题用注释引起来,这样只是为了美观 基本的类型只有一块存储空间(stack中),而引用类型在内存中有两块存储空间(stack和heap中). public class test ...

  8. 多线程设计模式(一) Single Threaded Execution

    这里有一座独木桥.因为桥身非常的细,一次只能允许一个人通过.当这个人没有下桥,另一个人就不能过桥.如果桥上同时又两个人,桥就会因为无法承重而破碎而掉落河里. 这就是Single Threaded Ex ...

  9. [原创]java操作word(一)

    一. 需求背景 在做项目的过程中,经常会遇到要把数据库数据导出到Word文件中的需求,因为很多情况下,我们需要将数据导出到WORD中进行打印.此需求可以通过用程序填充数据到word模板中来实现.所谓模 ...

  10. [ZJOI 2012] 网络

    [题目链接] https://www.lydsy.com/JudgeOnline/problem.php?id=2816 [算法] 对每种颜色的边建一棵LCT , 维护联通性即可 时间复杂度 : O( ...