Permalink
Browse files

Updated book structure. Removed chapter 8 (Selenium).

  • Loading branch information...
1 parent 388818f commit 9be5d583cad11ac9b1f7a81e267bda7d78ecea15 @kinow kinow committed May 26, 2011
Showing with 507 additions and 533 deletions.
  1. +1 −3 src/main/book/book.xml
  2. +0 −83 src/main/book/ch00.xml
  3. +72 −9 src/main/book/ch01.xml
  4. +9 −18 src/main/book/ch02.xml
  5. +15 −22 src/main/book/ch03.xml
  6. +26 −224 src/main/book/ch04.xml
  7. +194 −135 src/main/book/ch05.xml
  8. +159 −27 src/main/book/ch06.xml
  9. +31 −12 src/main/book/ch07.xml
View
@@ -5,10 +5,8 @@
<xi:include href="bookinfo.xml" />
- <xi:include href="ch00.xml" />
-
<xi:include href="ch01.xml" />
-
+
<xi:include href="ch02.xml" />
<xi:include href="ch03.xml" />
View
@@ -1,83 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<chapter version="5.0" xmlns="http://docbook.org/ns/docbook"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:xi="http://www.w3.org/2001/XInclude"
- xmlns:ns5="http://www.w3.org/2000/svg"
- xmlns:ns4="http://www.w3.org/1998/Math/MathML"
- xmlns:ns3="http://www.w3.org/1999/xhtml">
-
- <title>An Introduction to TAP</title>
-
- <para>The Test Anything Protocol (TAP) is a standard output format
- for test results. A producer generates TAP streams and then a
- consumer can read these streams and use them for different purposes.
- In a Java test project with TestNG, for instance, the TestNG tests would
- be the producer and an utility that interprets the results and build
- reports would be the consumer.</para>
-
- <para>Following is an example of a simple TAP Stream with three tests.</para>
-
- <programlisting><![CDATA[1..4
-ok 1 - Input file opened
-not ok 2
-ok 3 - Read the rest of the file
-# Yeah, you can comment your TAP Stream
-not ok 4 - Summarized correctly # TODO Not written yet]]>
- </programlisting>
-
- <section>
-
- <title>History</title>
-
- <para>TAP was created by the Perl community. It surged as the
- output format of the Test::Harness module and was used later by
- Test::More. TAP is present in Perl since Perl's first version.</para>
-
- <para>In the beginning TAP didn't have this name. Actually, it didn't
- have any name, it was usually referred to as the Test::More protocol.
- No, TAP wasn't named in a Pub conversation, although it is a good place
- to have great ideas. TAP was named in a chat with many members of the
- Perl community.</para>
-
- <para>The current version of the protocol is 13. The first version
- was committed in Perl 1 by Larry Wall on January the 30th, as part
- of t/TEST.</para>
-
- </section>
-
- <section>
-
- <title>Why would you use TAP in your Java programs?</title>
-
- <para>Below you will find a list with some reasons why you would use
- TAP in your Java programs. We only listed a few reasons, but there are
- other good reasons to use TAP. Just remember that if you are
- not integrating your test results with any other tool, then using TAP
- may be just waste of time.</para>
-
- <itemizedlist>
- <listitem>
- <para>You need more information in your Continuous Integration
- server.</para>
- </listitem>
- <listitem>
- <para>You need to take a specific action based on a certain
- output property of your tests.</para>
- </listitem>
- <listitem>
- <para>You need better control over your test execution.</para>
- </listitem>
- <listitem>
- <para>You need to attach other files (such as log files) to your
- test results.</para>
- </listitem>
- <listitem>
- <para>Your test results are going to be read by a program
- written in another language (specially if this language is
- Perl).</para>
- </listitem>
- </itemizedlist>
-
- </section>
-
-</chapter>
View
@@ -5,16 +5,79 @@
xmlns:ns5="http://www.w3.org/2000/svg"
xmlns:ns4="http://www.w3.org/1998/Math/MathML"
xmlns:ns3="http://www.w3.org/1999/xhtml">
- <title>Where is TAP being used?</title>
- <para>As mentioned in Chapter 1, TAP was created within the Perl community
- and is thus used by many Perl programmers as default output format for their
- tests. However TAP was later ported for PHP, Python, C, C++, Shell, Ruby,
- Java, Lua, among other programming languages.</para>
+ <title>An Introduction to TAP</title>
- <para>The Jenkins TestLink Plug-in is a consumer of TAP Streams. This
- plug-in executes automated tests integrated with TestLink and reads the
- test results (files with TAP Streams) and uploads test results back
- to TestLink.</para>
+ <para>The Test Anything Protocol (TAP) is a standard output format
+ for test results. A producer generates TAP streams and then a
+ consumer can read these streams and use them for different purposes.
+ In a Java test project with TestNG, for instance, the TestNG tests would
+ be the producer and an utility that interprets the results and build
+ reports would be the consumer.</para>
+
+ <para>Following is an example of a simple TAP Stream with three tests.</para>
+
+ <programlisting><![CDATA[1..4
+ok 1 - Input file opened
+not ok 2
+ok 3 - Read the rest of the file
+# Yeah, you can comment your TAP Stream
+not ok 4 - Summarized correctly # TODO Not written yet]]>
+ </programlisting>
+
+ <section>
+
+ <title>History</title>
+
+ <para>TAP was created by the Perl community. It surged as the
+ output format of the Test::Harness module and was used later by
+ Test::More. TAP is present in Perl since Perl's first version.</para>
+
+ <para>In the beginning TAP didn't have this name. Actually, it didn't
+ have any name, it was usually referred to as the Test::More protocol.
+ No, TAP wasn't named in a Pub conversation, although it is a good place
+ to have great ideas. TAP was named in a chat with many members of the
+ Perl community.</para>
+
+ <para>The current version of the protocol is 13. The first version
+ was committed in Perl 1 by Larry Wall on January the 30th, as part
+ of t/TEST.</para>
+
+ </section>
+
+ <section>
+
+ <title>Why would you use TAP in your Java programs?</title>
+
+ <para>Below you will find a list with some reasons why you would use
+ TAP in your Java programs. We only listed a few reasons, but there are
+ other good reasons to use TAP. Just remember that if you are
+ not integrating your test results with any other tool, then using TAP
+ may be just waste of time.</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>You need more information in your Continuous Integration
+ server.</para>
+ </listitem>
+ <listitem>
+ <para>You need to take a specific action based on a certain
+ output property of your tests.</para>
+ </listitem>
+ <listitem>
+ <para>You need better control over your test execution.</para>
+ </listitem>
+ <listitem>
+ <para>You need to attach other files (such as log files) to your
+ test results.</para>
+ </listitem>
+ <listitem>
+ <para>Your test results are going to be read by a program
+ written in another language (specially if this language is
+ Perl).</para>
+ </listitem>
+ </itemizedlist>
+
+ </section>
</chapter>
View
@@ -5,25 +5,16 @@
xmlns:ns5="http://www.w3.org/2000/svg"
xmlns:ns4="http://www.w3.org/1998/Math/MathML"
xmlns:ns3="http://www.w3.org/1999/xhtml">
-
- <title>Alternatives to TAP</title>
+ <title>Where is TAP being used?</title>
- <para>The first alternative to TAP would be the 'not TAP', where you
- simply keep using your current output format. Say you are using JUnit,
- then you keep using JUnit.</para>
+ <para>As mentioned in Chapter 1, TAP was created within the Perl community
+ and is thus used by many Perl programmers as default output format for their
+ tests. However TAP was later ported for PHP, Python, C, C++, Shell, Ruby,
+ Java, Lua, among other programming languages.</para>
- <para>However, if you are looking for another standard for an output format
- for your tests, then you may have a look at
- <link xlink:href="http://launchpad.net/subunit">Subunit</link>.</para>
-
- <blockquote>
- <para>Subunit is a streaming protocol for test results.
- The protocol is human readable and easily generated and parsed.
- By design all the components of the protocol conceptually fit
- into the xUnit TestCase->TestResult interaction.</para>
- <address><xref xlink:href="http://launchpad.net/subunit"/></address>
- </blockquote>
-
- <para>Subunit also contains a small tool that converts TAP to Subunit.</para>
+ <para>The Jenkins TestLink Plug-in is a consumer of TAP Streams. This
+ plug-in executes automated tests integrated with TestLink and reads the
+ test results (files with TAP Streams) and uploads test results back
+ to TestLink.</para>
</chapter>
View
@@ -6,31 +6,24 @@
xmlns:ns4="http://www.w3.org/1998/Math/MathML"
xmlns:ns3="http://www.w3.org/1999/xhtml">
- <title>How to use TAP in Java</title>
+ <title>Alternatives to TAP</title>
- <para>At the moment this book was being written there were two
- implementations of TAP for Java: JTap and tap4j.</para>
+ <para>The first alternative to TAP would be the 'not TAP', where you
+ simply keep using your current output format. Say you are using JUnit,
+ then you keep using JUnit.</para>
- <para>JTap is a port of libtap (Perl) to Java by Patrick LeBoutillier
- (patl@cpan.org). It is the oldest implementation of the protocol to Java,
- however it doesn't outputs TAP, i.e. JTap is only a producer, not a
- consumer.</para>
+ <para>However, if you are looking for another standard for an output format
+ for your tests, then you may have a look at
+ <link xlink:href="http://launchpad.net/subunit">Subunit</link>.</para>
- <para>tap4j was created in 2010 by Bruno P. Kinoshita. It contains both a
- consumer and a producer in Java. The current version of tap4j is 2.0 and
- it is already deployed to Maven central repository. What is interesting is
- that the author of tap4 contacted JTap's author and after some talk Patrick
- sent metatap to Bruno. Using this Perl script you can say what you expect
- (2 success test results and 1 that failed) and it will check if a given TAP
- Stream is according to what you are expecting.</para>
+ <blockquote>
+ <para>Subunit is a streaming protocol for test results.
+ The protocol is human readable and easily generated and parsed.
+ By design all the components of the protocol conceptually fit
+ into the xUnit TestCase->TestResult interaction.</para>
+ <address><xref xlink:href="http://launchpad.net/subunit"/></address>
+ </blockquote>
- <para>The current parser of tap4j is a Regular Expressions parser. The tap4j
- team is using snakeyaml parser as basis to write a recursive descent parser.
- And the team also has plans of submitting tap4j to Apache Incubator.</para>
-
- <para>tap4j is low level API. You can use it directly or abstract TAP and
- plug it with JUnit or TestNG test frameworks. Both APIs contain extension
- points that let you extend its functionality. tap4j contains extensions
- for both test frameworks.</para>
+ <para>Subunit also contains a small tool that converts TAP to Subunit.</para>
</chapter>
Oops, something went wrong.

0 comments on commit 9be5d58

Please sign in to comment.