文件名称: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. 在html文件引入其它html文件的几种方法

    1.IFrame引入,看看下面的代码 <IFRAME NAME="content_frame" width=100% height=600 marginwidth=0 mar ...

  2. 目标检测之积分图---integral image 积分图2

    前面在图像处理一栏中涉及到boxfilter 的时候,简单介绍过积分图,就是每个像素点是左边和上边的累加和,这样的话可以方便均值和方差,以及直方图统计的相关运算,这里再次结合网络资源重新单独对积分图做 ...

  3. 关于wpf中popup跟随鼠标移动显示

    最近在做一个画图工具,里面有一个功能是需要实现,当鼠标移动的时候在,鼠标的旁边显示坐标信息. 第一反应是想到了tooltip,但是tooltip有许多的限制,查询资料的过程中看到了popup,popu ...

  4. javascript 获取当前日期 月份 时间

    <script type="text/javascript"> function getDate() { var date = new Date(); //得到当前日期 ...

  5. Maximum Memory and CPU Limitations for Linux Server

    grep NR_CPUS /boot/config-`uname -r` [webdev@test apache-flume-1.8.0-bin]$ grep NR_CPUS /boot/config ...

  6. Rethinking the Inception Architecture for Computer Vision

    https://arxiv.org/abs/1512.00567 Convolutional networks are at the core of most state-of-the-art com ...

  7. Oracle Meger into 函数

    Oracle 在 9i 引入了 merge 命令, 通过这个 merge 能够在一个SQL 语句中对一个表同时执行 inserts 和 updates 操作.Merge into 可以实现用 B 表来 ...

  8. jquery带按钮的图片切换效果

    <!doctype html> <html> <head> <meta charset="gb2312"> <title> ...

  9. [CPP - STL] swap技巧

    最近在看<Effective STL>,[条款17:使用“交换技巧”修整过剩容量]中提到容器的成函数void swap(container& from),即实现容器对象与from对 ...

  10. 基于BASYS2的VHDL程序与烧写——按键消抖程序

    请尊重作者版权,转载请注明源地址http://www.cnblogs.com/connorzx/p/3548364.html 按键在按下的过程中通常会产生一段时间的抖动,为了消除这种抖动,一般采取两种 ...