Movatterモバイル変換


[0]ホーム

URL:


tap4j-parent


Built by Maven

TAP Consumer

A TAP Consumer can interpret the output of a TAP Producer to determine how many tests were run, which tests succeedded, and which dianostic information might be usefully reported to the user. In tap4j the consumers are created using the classTapConsumerFactory.

TapConsumer consumer = TapConsumerFactory.makeTap13Consumer();TapConsumer consumer = TapConsumerFactory.makeTap13YamlConsumer();TapConsumer consumer = TapConsumerFactory.makeTap13YamlConsumerWithoutSubtests();

The consumer interprets a TAP Stream and transforms it into aTestSet object. A TAP Stream consists of one test set. A test set, by its turn, consists of zero or more test results and exactly one plan. A test set can be determined to have failed or passed.

TestSet testSet = consumer.load(    "1..2\n" +     "ok 1 - no error" +     "not ok 2 - io error");System.out.println( "Number of tests found: " + testSet.getNumberOfTestResults() );System.out.println( "Test Set failed? " + testSet.containsNotOk() );

Reading TAP using a TAP Consumer fromTest Anything Protocol Wiki.



[8]ページ先頭

©2009-2025 Movatter.jp