CINXE.COM
Home - Test Anything Protocol
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>Home - Test Anything Protocol</title> <meta name="viewport" content="width=device-width"> <!-- syntax highlighting CSS --> <link rel="stylesheet" href="/css/syntax.css"> <!-- Custom CSS --> <link rel="stylesheet" href="/css/main.css"> </head> <body> <div class="site"> <div class="header"> <h1 class="title"><a href="/"><img alt="Test Anything Protocol" src="/images/tap.png" /><!-- TestAnything.org--></a></h1> <ul> <li><a class="extra" href="/">Home</a></li> <li><a class="extra" href="/testing-with-tap">Testing with TAP</a></li> <li><a class="extra" href="/producers.html">Producers</a></li> <li><a class="extra" href="/consumers.html">Consumers</a></li> <li><a class="extra" href="/tap-version-14-specification.html">Specification</a></li> </ul> <br class="clear" /> </div> <div class="content"> <h1 id="test-anything-protocol">Test Anything Protocol</h1> <p>TAP, the Test Anything Protocol, is a simple text-based interface between testing modules in a test harness. It decouples the reporting of errors from the presentation of the reports.</p> <p>One of its major uses is for noise reduction; when you have a suite of many tests, making them TAP producers and using a TAP consumer to view them helps ensures that you will see everything you need to notice and diagnose breakage without being distracted by a flood of irrelevant success messages. It can assist other forms of analysis and statistics-gathering as well.</p> <p>TAP started life as part of the test harness for Perl but now has implementations in C, C++, Python, PHP, Perl, Java, JavaScript, Go, Rust, and others. Consumers and producers do not have to be written in the same language to interoperate.</p> <p>Here鈥檚 what a TAP test stream looks like:</p> <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>1..4 ok 1 - Input file opened not ok 2 - First line of the input valid ok 3 - Read the rest of the file not ok 4 - Summarized correctly # TODO Not written yet </code></pre></div></div> <h2 id="testing-with-tap">Testing with TAP</h2> <ul> <li><a href="/testing-with-tap">Testing with TAP</a> - How to run TAP based tests in your language of choice</li> </ul> <h2 id="tap-development">TAP Development</h2> <ul> <li><a href="/producers.html">TAP Producers</a> - Testing tools that generate TAP output</li> <li><a href="/consumers.html">TAP Consumers</a> - Test harnesses that read TAP</li> <li><a href="/philosophy.html">TAP Philosophy</a> - The Tao of TAP</li> <li><a href="/history.html">TAP History</a> - The story of TAP</li> </ul> <h2 id="specifications">Specifications</h2> <ul> <li><a href="/tap-version-14-specification.html">TAP version 14 specification</a> (Current)</li> <li><a href="/tap-version-13-specification.html">TAP version 13 specification</a></li> <li><a href="/tap-specification.html">TAP specification</a></li> </ul> <h2 id="external-resources">External Resources</h2> <ul> <li><a href="https://en.wikipedia.org/wiki/Test_Anything_Protocol">Wikipedia article on TAP</a></li> <li><a href="http://www.reddit.com/r/testanythingprotocol">The TAP subreddit</a></li> </ul> </div> <div class="footer"> <div class="contact"> <p> <a href="https://github.com/testanything">github.com/testanything</a><br /> </p> </div> </div> </div> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-48470734-1', 'testanything.org'); ga('send', 'pageview'); </script> </body> </html>