2014-01-30 98 views
1

我使用specs2來生成html測試報告。但是,每個規格我得到一個com.company.package.SomeSpec.html。是否有可能爲我的所有測試生成單頁html報告,或者至少生成index.html鏈接到其他測試?Specs2:生成HTML報告?

回答

3

這在用戶指南中所描述的,"How to create an index"

import org.specs2._ 
import runner.SpecificationsFinder._ 

class index extends Specification { def is = 

    examplesLinks("Example specifications") 

    // see the SpecificationsFinder trait for the parameters of the 'specifications' method 
    def examplesLinks(t: String) = t.title^specifications().map(see) 
}