JUnit recipes: practical methods for programmer testing
Gespeichert in:
1. Verfasser: | |
---|---|
Format: | Buch |
Sprache: | English |
Veröffentlicht: |
Greenwich, CT
Manning
2005
|
Schlagworte: | |
Online-Zugang: | Inhaltsverzeichnis |
Beschreibung: | Includes bibliographical references (p. 697-704) and index |
Beschreibung: | XXIX, 721 S. ill. 24 cm |
ISBN: | 1932394230 |
Internformat
MARC
LEADER | 00000nam a2200000zc 4500 | ||
---|---|---|---|
001 | BV019841820 | ||
003 | DE-604 | ||
005 | 00000000000000.0 | ||
007 | t | ||
008 | 050613s2005 xxua||| |||| 00||| eng d | ||
010 | |a 2005270629 | ||
015 | |a GBA444176 |2 dnb | ||
020 | |a 1932394230 |9 1-932394-23-0 | ||
035 | |a (OCoLC)56411833 | ||
035 | |a (DE-599)BVBBV019841820 | ||
040 | |a DE-604 |b ger |e aacr | ||
041 | 0 | |a eng | |
044 | |a xxu |c US | ||
049 | |a DE-1051 |a DE-522 |a DE-473 |a DE-188 | ||
050 | 0 | |a QA76.64 | |
082 | 0 | |a 005.13/3 |2 22 | |
084 | |a ST 233 |0 (DE-625)143620: |2 rvk | ||
100 | 1 | |a Rainsberger, J.B. |e Verfasser |4 aut | |
245 | 1 | 0 | |a JUnit recipes |b practical methods for programmer testing |c J. B. Rainsberger ; with contributions by Scott Stirling |
264 | 1 | |a Greenwich, CT |b Manning |c 2005 | |
300 | |a XXIX, 721 S. |b ill. |c 24 cm | ||
336 | |b txt |2 rdacontent | ||
337 | |b n |2 rdamedia | ||
338 | |b nc |2 rdacarrier | ||
500 | |a Includes bibliographical references (p. 697-704) and index | ||
650 | 7 | |a JUnit |2 swd | |
650 | 4 | |a Java (Computer program language) | |
650 | 4 | |a Object-oriented programming (Computer science) | |
650 | 0 | 7 | |a Java |g Programmiersprache |0 (DE-588)4401313-9 |2 gnd |9 rswk-swf |
651 | 7 | |a Java |0 (DE-588)4028527-3 |2 gnd |9 rswk-swf | |
689 | 0 | 0 | |a Java |0 (DE-588)4028527-3 |D g |
689 | 0 | |5 DE-604 | |
689 | 1 | 0 | |a Java |g Programmiersprache |0 (DE-588)4401313-9 |D s |
689 | 1 | |5 DE-604 | |
700 | 1 | |a Stirling, Scott |e Sonstige |4 oth | |
856 | 4 | 2 | |m Digitalisierung UB Bamberg |q application/pdf |u http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=013166698&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |3 Inhaltsverzeichnis |
999 | |a oai:aleph.bib-bvb.de:BVB01-013166698 |
Datensatz im Suchindex
_version_ | 1804133352887812096 |
---|---|
adam_text | brief
contents
IB
і
1 ■
Fundamentals
З
2 ■
Elementary tests
22
3 ■
Organizing and buiklingJUnit tests
71
4 ■
Managing test suites
102
5 ■
Working with test data
136
6 ■
RunningJUnit tests
173
7 ■
Reporting JUnit results
188
8 ■
TroubleshootingJUnit
233
Part
z, ľF.sxľNC-?
¡¡¿El·.
,,,.,...,,. ..,.......,,......., ,,,....,, .».,,..
2î
9 ■
Testing and
XML 265
10
m
Testing and JDBC
308
11
m
Testing
Enterprise JavaBeans
370
12
m
Testing web components
443
13
m TestingJ2EE applications
508
BRIEF
CONTENTS
3
Mome JUnit teci
iniques
............................ 541
14
m
Testing
design
patterns
543
15
m GSBase
572
16
m JUnit-addons
585
17
m
Odds and
ends
603
Appendices
A m
Complete
solutions
629
S
■
Essays on testing
673
С
■
Reading List
696
contents
foreword
xv
preface
xvii,
acknowledgments
xix
about this book
xxii
about the cover illustration
xxx
Part
1
The building blocks
Fundamentals
3
1.1
What is Programmer Testing?
4
1.2
Getting started with JUnit
10
1.3
A few good practices
17
1.4
Summary
20
Elementary tests
22
2.1
Test your equals method
26
2.2
Test a method that returns nothing
33
2.3
Test a constructor
37
2.4
Test a getter
41
2.5
Test a setter
44
2.6
Test an interface
48
CONTENTS
2.7 Test
a JavaBean
54
2.8 Test
throwing the right exception
56
2.9
Let collections compare themselves
61
2.10
Test, a big object, for equality
63
2.11
Test an object that instantiates other objects
66
Organizing and buildingJUnit tests
71
3.1
Place test classes in the same
package as production code
74
3.2
Create a separate source tree for test code
77
3.3
Separate test packages
from production code packages
79
3.4
Factor out a test fixture
83
3.5
Factor out a test fixture hierarchy
87
3.6
Introduce a Base Test Case
90
3.7
Move special case tests to a separate test fixture
92
3.8
Build tests from the command line
94
3.9
Build tests using Ant
96
3.10
Build tests using Eclipse
99
Managing test suites
102
4.1
Let JUnit build your test suite
103
4.2
Collect a specific set of tests
107
4.3
Collect all the tests in a package 111
4.4
Collect all the tests for your entire system
114
4.5
Scan the file system for tests
116
4.6
Separate the different kinds of test suites
120
4.7
Control the order of some of your tests
123
4.8
Build a data-driven test suite
127
4.9
Define a test suite in XML
133
CONTENTS
Working with test data
136
5.1
Use Java system properties
138
5.2
Use environment variables
142
5.3
Use an inline data file
145
5.4
Use a properties file
147
5.5
Use ResourceBundles
152
5.6
Use a file-based test data repository
154
5.7
Use XML to describe test data
156
5.8
Use Ant s <sql> task to work with a database
157
5.9
UseJUnitPP
159
5.10
Set up your fixture once for the entire suite
161
5.11
Perform environment setup once
for multiple test runs
164
5.12
UseDbUnit
170
RunningJUnit tests
173
6.1
See the name of each test as it executes
177
6.2
See the name of each test as it executes
with a text-based test runner
178
6.3
Execute a single test
180
6.4
Execute each test in its own JVM
181
6.5
Reload classes before each test
182
6.6
Ignore a test
185
ReportingJUnit results
188
7.1
Using a Base Test Case with a logger
190
7.2
Using Log4Unit
194
7.3
Getting plain text results with Ant
198
7.4
Reporting results in HTML
with Ant s <junitreport> task
202
7.5
Customizing <junit> XML reports with XSLT
205
CONTENTS
Part
2
7.6
Extending Ant s JUnit results format
208
7.7
Implementing TestListener
and extending TestRurmer
215
7.8
Reporting a count of assertions
224
TroubleshootingJUnit
233
8.1
JUnit cannot find your tests
235
8.2
JUnit does not execute your custom test suite
237
8.3
JUnit does not set up your test fixture
239
8.4
Test setup fails after overriding ruiiTest()
241
8.5
Your test stops after the first assertion fails
244
8.6
The graphical test runner does not load
your classes properly
250
8.7
JUnit fails when your test case uses JAXP
252
8.8
JUnit fails when narrowing an EJB reference
253
»TING
Έ
С),
Introduction
DesigningJ2EE applications for testability
259
The Coffee Shop application
263
Testing and XML
265
9.1
Verify the order of elements in a document
273
9.2
Ignore the order of elements in an XML document
277
9.3
Ignore certain differences in XML documents
281
9.4
Get a more detailed failure message from XMLUnit.
288
9.5
Test the content of a static web page
290
9.6
Test an XSL stylesheet in isolation
297
9.7
Validate XML documents in your tests
302
CONTENTS
j
Testing
and JDBC
308
10.1
Test making domain objects from a ResultSet
317
10.2
Verify your SQL commands
322
10.3
Test your database schema
327
10.4
Verify your tests clean up JDBC resources
335
10.5
Verify your production code
cleans up JDBC resources
343
10.6
Manage external data in your test fixture
346
10.7
Manage test data in a shared database
349
10.8
Test permissions when deploying schema objects
352
10.9
Test legacy JDBC code without the database
357
10.10
Test legacy JDBC code with the database
360
10.11
Use schema-qualified tables with DbUnit
363
10.12
Test stored procedures
366
if Testing Enterprise JavaBeans
370
љ
11.1
Test a session bean method outside the container
378
11.2
Test a legacy session bean
387
11.3
Test a session bean method in a real container
394
11.4
Test a CMP entity bean
397
11.5
Test CMP
meta data
outside the container
400
11.6
Test a BMP entity bean
408
11.7
Test a message-driven bean inside the container
414
11.8
Test a message-driven bean outside the container
420
11.9
Test a legacy message-driven bean
422
11.10
Test
a
JMS
message consumer
without the messaging server
426
11.11
Test
JMS
message-processing logic
430
11.12
Test
a
JMS
message producer
433
11.13
Test the content of yourJNDI directory
439
CONTENTS
Jmmí
Testing web components
443
12.1
Test updating session data without a container
446
12.2
Test updating the HTTP session object
452
12.3
Test rendering a JavaServer Page
456
12.4
Test rendering a Velocity template
465
12.5
Test a JSP tag handler
468
12.6
Test your JSP tag library deployment
474
12.7
Test
serviet
initialization
477
12.8
Test the ServletContext
480
12.9
Test processing a request
483
12.10
Verify web page content without a web server
491
12.11
Verify web form attributes
494
12.12
Verify the data passed to a page template
495
12.13
Test a web resource filter
500
TestingJ2EE applications
508
13.1
Test page flow
510
13.2
Test navigation rules in a Struts application
519
13.3
Test your site for broken links
522
13.4
Test web resource security
525
13.5
Test EJB resource security
530
13.6
Test container-managed transactions
536
art
Ъ
More TUnit techniques
541
Testing design patterns
543
14.1
Test an Observer (Event Listener)
545
14.2
Test an Observable (Event Source)
550
14.3
Test a Singleton
556
14.4
Test a Singleton s client
559
CONTENTS
14.5 Test an
object factory
562
14.6 Test
a template method s implementation
566
I
ű% GSBase
572
ţ
ß
■л
- 15.1
Verify events with EventCatcher
574
15.2
Test serialization
577
15.3
Test object cloning
579
15.4
Compare JavaBeans using appears equal
581
1
/^ JUnit-addons
585
Λ
,.%.,/ 161
Test your class for compareToO
587
16.2
Collect tests automatically from an archive
590
16.3
Organize test data using PropertyManager
591
16.4
Manage shared test resources
593
16.5
Ensure your shared test fixture tears itself down
597
16.6
Report the name of each test as it executes
599
Odds and ends
603
17.1
Clean up the file system between tests
605
17.2
Test your file-based application
without the file system
608
17.3
Verify your test case class syntax
614
17.4
Extract a custom assertion
617
17.5
Test a legacy method with no return value
620
17.6
Test a private method if you must
625
Complete solutions
629
A.I Define a test suite in XML
630
A.2 Parameterized Test Case overriding runTest()
634
A.3 Ignore the order of elements in an XML document
637
A.4 Test an XSL stylesheet in isolation
639
CONTENTS
A.5
Validate
XML
documents
in
your tests
645
Α.
6
Aspect-based universal Spy
649
A.7 Test a BMP entity bean
653
Essays on testing
673
B.I Too simple to break
674
B.2 Strangeness and transitivity
677
B.3 Isolate expensive tests
681
B.4 The mock objects landscape
689
Reading List
696
references
700
index
705
|
any_adam_object | 1 |
author | Rainsberger, J.B |
author_facet | Rainsberger, J.B |
author_role | aut |
author_sort | Rainsberger, J.B |
author_variant | j r jr |
building | Verbundindex |
bvnumber | BV019841820 |
callnumber-first | Q - Science |
callnumber-label | QA76 |
callnumber-raw | QA76.64 |
callnumber-search | QA76.64 |
callnumber-sort | QA 276.64 |
callnumber-subject | QA - Mathematics |
classification_rvk | ST 233 |
ctrlnum | (OCoLC)56411833 (DE-599)BVBBV019841820 |
dewey-full | 005.13/3 |
dewey-hundreds | 000 - Computer science, information, general works |
dewey-ones | 005 - Computer programming, programs, data, security |
dewey-raw | 005.13/3 |
dewey-search | 005.13/3 |
dewey-sort | 15.13 13 |
dewey-tens | 000 - Computer science, information, general works |
discipline | Informatik |
format | Book |
fullrecord | <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"><record><leader>01767nam a2200469zc 4500</leader><controlfield tag="001">BV019841820</controlfield><controlfield tag="003">DE-604</controlfield><controlfield tag="005">00000000000000.0</controlfield><controlfield tag="007">t</controlfield><controlfield tag="008">050613s2005 xxua||| |||| 00||| eng d</controlfield><datafield tag="010" ind1=" " ind2=" "><subfield code="a">2005270629</subfield></datafield><datafield tag="015" ind1=" " ind2=" "><subfield code="a">GBA444176</subfield><subfield code="2">dnb</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">1932394230</subfield><subfield code="9">1-932394-23-0</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)56411833</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(DE-599)BVBBV019841820</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">DE-604</subfield><subfield code="b">ger</subfield><subfield code="e">aacr</subfield></datafield><datafield tag="041" ind1="0" ind2=" "><subfield code="a">eng</subfield></datafield><datafield tag="044" ind1=" " ind2=" "><subfield code="a">xxu</subfield><subfield code="c">US</subfield></datafield><datafield tag="049" ind1=" " ind2=" "><subfield code="a">DE-1051</subfield><subfield code="a">DE-522</subfield><subfield code="a">DE-473</subfield><subfield code="a">DE-188</subfield></datafield><datafield tag="050" ind1=" " ind2="0"><subfield code="a">QA76.64</subfield></datafield><datafield tag="082" ind1="0" ind2=" "><subfield code="a">005.13/3</subfield><subfield code="2">22</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">ST 233</subfield><subfield code="0">(DE-625)143620:</subfield><subfield code="2">rvk</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Rainsberger, J.B.</subfield><subfield code="e">Verfasser</subfield><subfield code="4">aut</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">JUnit recipes</subfield><subfield code="b">practical methods for programmer testing</subfield><subfield code="c">J. B. Rainsberger ; with contributions by Scott Stirling</subfield></datafield><datafield tag="264" ind1=" " ind2="1"><subfield code="a">Greenwich, CT</subfield><subfield code="b">Manning</subfield><subfield code="c">2005</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">XXIX, 721 S.</subfield><subfield code="b">ill.</subfield><subfield code="c">24 cm</subfield></datafield><datafield tag="336" ind1=" " ind2=" "><subfield code="b">txt</subfield><subfield code="2">rdacontent</subfield></datafield><datafield tag="337" ind1=" " ind2=" "><subfield code="b">n</subfield><subfield code="2">rdamedia</subfield></datafield><datafield tag="338" ind1=" " ind2=" "><subfield code="b">nc</subfield><subfield code="2">rdacarrier</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">Includes bibliographical references (p. 697-704) and index</subfield></datafield><datafield tag="650" ind1=" " ind2="7"><subfield code="a">JUnit</subfield><subfield code="2">swd</subfield></datafield><datafield tag="650" ind1=" " ind2="4"><subfield code="a">Java (Computer program language)</subfield></datafield><datafield tag="650" ind1=" " ind2="4"><subfield code="a">Object-oriented programming (Computer science)</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Java</subfield><subfield code="g">Programmiersprache</subfield><subfield code="0">(DE-588)4401313-9</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="651" ind1=" " ind2="7"><subfield code="a">Java</subfield><subfield code="0">(DE-588)4028527-3</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="689" ind1="0" ind2="0"><subfield code="a">Java</subfield><subfield code="0">(DE-588)4028527-3</subfield><subfield code="D">g</subfield></datafield><datafield tag="689" ind1="0" ind2=" "><subfield code="5">DE-604</subfield></datafield><datafield tag="689" ind1="1" ind2="0"><subfield code="a">Java</subfield><subfield code="g">Programmiersprache</subfield><subfield code="0">(DE-588)4401313-9</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="1" ind2=" "><subfield code="5">DE-604</subfield></datafield><datafield tag="700" ind1="1" ind2=" "><subfield code="a">Stirling, Scott</subfield><subfield code="e">Sonstige</subfield><subfield code="4">oth</subfield></datafield><datafield tag="856" ind1="4" ind2="2"><subfield code="m">Digitalisierung UB Bamberg</subfield><subfield code="q">application/pdf</subfield><subfield code="u">http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=013166698&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA</subfield><subfield code="3">Inhaltsverzeichnis</subfield></datafield><datafield tag="999" ind1=" " ind2=" "><subfield code="a">oai:aleph.bib-bvb.de:BVB01-013166698</subfield></datafield></record></collection> |
geographic | Java (DE-588)4028527-3 gnd |
geographic_facet | Java |
id | DE-604.BV019841820 |
illustrated | Illustrated |
indexdate | 2024-07-09T20:07:21Z |
institution | BVB |
isbn | 1932394230 |
language | English |
lccn | 2005270629 |
oai_aleph_id | oai:aleph.bib-bvb.de:BVB01-013166698 |
oclc_num | 56411833 |
open_access_boolean | |
owner | DE-1051 DE-522 DE-473 DE-BY-UBG DE-188 |
owner_facet | DE-1051 DE-522 DE-473 DE-BY-UBG DE-188 |
physical | XXIX, 721 S. ill. 24 cm |
publishDate | 2005 |
publishDateSearch | 2005 |
publishDateSort | 2005 |
publisher | Manning |
record_format | marc |
spelling | Rainsberger, J.B. Verfasser aut JUnit recipes practical methods for programmer testing J. B. Rainsberger ; with contributions by Scott Stirling Greenwich, CT Manning 2005 XXIX, 721 S. ill. 24 cm txt rdacontent n rdamedia nc rdacarrier Includes bibliographical references (p. 697-704) and index JUnit swd Java (Computer program language) Object-oriented programming (Computer science) Java Programmiersprache (DE-588)4401313-9 gnd rswk-swf Java (DE-588)4028527-3 gnd rswk-swf Java (DE-588)4028527-3 g DE-604 Java Programmiersprache (DE-588)4401313-9 s Stirling, Scott Sonstige oth Digitalisierung UB Bamberg application/pdf http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=013166698&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA Inhaltsverzeichnis |
spellingShingle | Rainsberger, J.B JUnit recipes practical methods for programmer testing JUnit swd Java (Computer program language) Object-oriented programming (Computer science) Java Programmiersprache (DE-588)4401313-9 gnd |
subject_GND | (DE-588)4401313-9 (DE-588)4028527-3 |
title | JUnit recipes practical methods for programmer testing |
title_auth | JUnit recipes practical methods for programmer testing |
title_exact_search | JUnit recipes practical methods for programmer testing |
title_full | JUnit recipes practical methods for programmer testing J. B. Rainsberger ; with contributions by Scott Stirling |
title_fullStr | JUnit recipes practical methods for programmer testing J. B. Rainsberger ; with contributions by Scott Stirling |
title_full_unstemmed | JUnit recipes practical methods for programmer testing J. B. Rainsberger ; with contributions by Scott Stirling |
title_short | JUnit recipes |
title_sort | junit recipes practical methods for programmer testing |
title_sub | practical methods for programmer testing |
topic | JUnit swd Java (Computer program language) Object-oriented programming (Computer science) Java Programmiersprache (DE-588)4401313-9 gnd |
topic_facet | JUnit Java (Computer program language) Object-oriented programming (Computer science) Java Programmiersprache Java |
url | http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=013166698&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |
work_keys_str_mv | AT rainsbergerjb junitrecipespracticalmethodsforprogrammertesting AT stirlingscott junitrecipespracticalmethodsforprogrammertesting |