|
---|
W3Cschool
恭喜您成為首批注冊用戶
獲得88經(jīng)驗值獎勵
Test Anything Protocol (TAP) 是 Perl 與測試模塊之間所使用的簡單的基于文本的接口。下面的例子展示了 ArrayTest
中的測試所生成的 TAP 日志文件:
TAP version 13
ok 1 - testNewArrayIsEmpty(ArrayTest)
ok 2 - testArrayContainsAnElement(ArrayTest)
1..2
以下 TAP 日志文件是由名為 FailureErrorTest
的測試用例類中的兩個測試 testFailure
和 testError
所生成的,展示了失敗和錯誤是如何表示的:
TAP version 13
not ok 1 - Failure: testFailure(FailureErrorTest)
---
message: 'Failed asserting that <integer:2> matches expected value <integer:1>.'
severity: fail
data:
got: 2
expected: 1
...
not ok 2 - Error: testError(FailureErrorTest)
1..2
Copyright©2021 w3cschool編程獅|閩ICP備15016281號-3|閩公網(wǎng)安備35020302033924號
違法和不良信息舉報電話:173-0602-2364|舉報郵箱:jubao@eeedong.com
掃描二維碼
下載編程獅App
編程獅公眾號
聯(lián)系方式:
更多建議: