質問

私は拡張しています svunit (Rのユニットテストスイート、の一部 Sciviews)ハドソンが読むことができる出力も生成するように。実際、私はすでにこれを行う何かを持っていますが、それは「非アクティブ化された」テストを処理しません。

私が意味することを見るために、 protocol_junit.svTestData の方法 svtestdata.R ファイル。

問題は、ハドソンが受け入れたスキーマの定義を見つけることができなかったことであり、テストスイートがAを追加するように、Javaプロジェクトに失敗とエラーを説得することができたことです。 <failure/><error/> いくつかの内部の要素 <testcase/> 要素ですが、私は何が起こるかを見ることができませんでした @Ignore @Test 装飾。

たとえば、他の多くの人がこの同じ質問をしています こちらも, 、しかし、最終的には到達します このページ これは良い出発点ですが、完全ではありません。たとえば、それは言及されていません <error/> 試行錯誤で発見した要素。

ハドソンの読み取りソースを読み込もうとしましたが、どこから始めればいいのかわかりませんでした。

ヒントはありますか?

役に立ちましたか?

解決

ハドソンの情報源を詳しく見てみました(特に、 Caseresult.java)私はそれを含むことを見ました <skipped/> aの要素 <testcase/> 要素は私が探していたものです。

そして、今後の参照のために、私が生成しているスキーマのリラックスNGコンパクトな構文(編集/維持してください):

junit.rnc:
#----------------------------------------
start = testsuite

property = element property {
   attribute name {text},
   attribute value {text}
}

properties = element properties {
   property*
}

failure = element failure {
   attribute message {text},
   attribute type {text},
   text
}

error = element error {
   attribute message {text},
   attribute type {text},
   text
}

skipped = element skipped {
   text
}

testcase = element testcase {
   attribute classname {text},
   attribute name {text},
   attribute time {text},
   (failure|error)?,
   skipped?
}

testsuite = element testsuite {
   attribute errors {xsd:integer},
   attribute failures {xsd:integer},
   attribute hostname {text},
   attribute name {text},
   attribute tests {xsd:integer},
   attribute time {xsd:double},
   attribute timestamp {xsd:dateTime},
   properties,
   testcase*,
   element system-out {text},
   element system-err {text}
}
#----------------------------------------


and junitreport.rnc
#----------------------------------------
include "junit.rnc" {
   start = testsuites
   testsuite = element testsuite {
      attribute errors {xsd:integer},
      attribute failures {xsd:integer},
      attribute hostname {text},
      attribute name {text},
      attribute tests {xsd:integer},
      attribute time {xsd:double},
      attribute timestamp {xsd:dateTime},
      attribute id {text},
      attribute package {text},
      properties,
      testcase*,
      element system-out {text},
      element system-err {text}
   }
}

testsuites = element testsuites {
   testsuite*
}
#----------------------------------------
ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top