Swing Extreme Testing The Extreme approach to complete Java application testing 1st Edition Lindsay Peters - Download the ebook today and experience the full content
Swing Extreme Testing The Extreme approach to complete Java application testing 1st Edition Lindsay Peters - Download the ebook today and experience the full content
https://ebookultra.com/download/extreme-worlds-francis-tsai/
https://ebookultra.com/download/extreme-europe-1st-edition-stephen-
barber/
https://ebookultra.com/download/canyons-the-extreme-earth-1st-edition-
erik-hanson/
https://ebookultra.com/download/yahoo-to-the-max-an-extreme-searcher-
guide-1st-edition-randolph-hock/
Extreme Ultraviolet Astronomy Martin A. Barstow
https://ebookultra.com/download/extreme-ultraviolet-astronomy-martin-
a-barstow/
https://ebookultra.com/download/chemistry-at-extreme-conditions-1st-
edition-m-r-manaa/
https://ebookultra.com/download/the-testing-of-ceramics-in-
construction-testing-in-construction-david-doran/
https://ebookultra.com/download/software-testing-a-craftman-s-
approach-2nd-edition-edition-jorgensen/
Swing Extreme Testing The Extreme approach to
complete Java application testing 1st Edition Lindsay
Peters Digital Instant Download
Author(s): Lindsay Peters, Tim Lavers
ISBN(s): 9781847194824, 1847194826
Edition: 1
File Details: PDF, 11.03 MB
Year: 2008
Language: english
Swing Extreme Testing
Tim Lavers
Lindsay Peters
BIRMINGHAM - MUMBAI
Swing Extreme Testing
All rights reserved. No part of this book may be reproduced, stored in a retrieval
system, or transmitted in any form or by any means, without the prior written
permission of the publisher, except in the case of brief quotations embedded in
critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of
the information presented. However, the information contained in this book is sold
without warranty, either express or implied. Neither the author(s), Packt Publishing,
nor its dealers or distributors will be held liable for any damages caused or alleged to
be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.
ISBN 978-1-847194-82-4
www.packtpub.com
Lindsay Peters is the Chief Technical Officer for Pacific Knowledge Systems.
He has 25 years experience in software management, formal analysis, algorithm
development, software design, and implementation for large commercial and
defense systems. Ten years ago Lindsay and his team were early adopters of Java,
coupled with more rigorous design processes such as Design by Contract. He then
helped transition the development team to the Extreme Programming model. Out of
this exciting and successful experience grew the "Extreme Testing" approach.
In the early 80's Lindsay managed a software team who were one of the first to
incorporate the newly discovered simulated annealing algorithm into a commercial
application, solving a previously intractable real-world problem which was the
optimum assignment of radio frequencies to collocated mobile radios.
Apart from software development and artificial intelligence systems, Lindsay has an
interest in mathematical convexity and has helped to progress the "Happy Ending"
problem. He is also involved in politics and in the last Australian Federal election
stood as the Greens candidate for the seat of Bennelong.
We gratefully acknowledge the support of Pacific Knowledge
Systems in providing a software development environment that
fostered the development of the Java Extreme Testing approach. We
are also grateful to Pacific Knowledge Systems for allowing us to use
code examples and screen shots from the LabWizard product.
Thanks also to the team at Packt: David, Ved, Lata, and Himanshu.
Their patience and responsiveness have made our job a lot easier and
more enjoyable than it might otherwise have been.
Tim would like to thank his wife, Lorien, for her continual support
and encouragement with this project. As well as a morale-building
role, she has helped with the wording of several passages in the book.
Finally, Lindsay would like to thank his wife Kath for cheerfully
picking up all the slack, and his father Harry for his continued
inspiration.
To our children
and
Since 2004, Valentin serves as a senior IT consultant in one of the largest private
banks in Switzerland, where he works on next-generation e-banking platforms.
Starting in 2008, Valentin created Consulthys, a new venture that strongly focuses on
leveraging Web 2.0 technologies in order to reduce the cultural gap between IT and
business people.
Load Testing 49
Summary 49
Chapter 3: Infrastructure for Testing 51
Where Should the Unit Tests Go? 51
Where Should the Function and Load Tests Go? 53
Management of Test Data 54
What Do We Require of a Test Data Management System? 55
Temporary Files 57
Summary 58
Chapter 4: Cyborg—a Better Robot 59
The Design of Cyborg 59
Using the Keyboard 60
Mousing Around 63
Checking the Screen 65
Summary 66
Chapter 5: Managing and Testing User Messages 67
Some Problems with Resource Bundles 67
A Solution 69
The UserStrings Class 70
ResourcesTester 73
How ResourcesTester Works 74
Getting More from UserStrings 78
Summary 79
Chapter 6: Making Classes Testable with Interfaces 81
The LabWizard Comment Editor 81
The Wizard 83
A Test for Wizard 85
A Test for Step 86
Handlers in LabWizard 90
Summary 90
Chapter 7: Exercising UI Components in Tests 91
The LabWizard Login Screen 91
The Design of LoginScreen 94
UI Wrappers 96
The Correct Implementation of UILoginScreen 98
A Handler Implementation for Unit Testing 99
Setting Up our Tests 100
Our First Test 102
Further Tests 104
[ ii ]
Table of Contents
[ iii ]
Table of Contents
[ iv ]
Table of Contents
[ vi ]
Preface
This book summarizes twenty years of experience testing software.
For the past decade, we have been the principal developers of LabWizard, which
is the gold standard in Knowledge Acquisition tools and is used around the world
to provide patient-specific interpretations of pathology cases. LabWizard is a very
complex suite of software involving a server program, multiple remote client
programs, interfaces with lab systems, and lots of internal processes.
In spite of this complexity, the software has been developed and maintained by a
very small team with limited time and resources. We believe that our approach to
testing, which we call Extreme Testing, has been central to our success. Extreme
Testing has these key points:
This book is about why we have converged on this testing strategy, and how we
actually implement it. In particular, we look at how to automatically test user
interfaces, the help system, internationalization, log files, spreadsheets, email, web
services, tests involving multiple JVMs, and a host of other things.
Preface
A number of books on Java testing have appeared in the last few years. In general,
these books introduce the reader to JUnit, a commonly used test platform, and then
run through some examples in which simple classes are tested. Additionally, they
may introduce a few other tools for testing databases, dynamic web pages and so
on. However, when it comes to testing user interfaces and other complex modules,
these books draw a blank, and it is easy for the reader to get the impression that such
testing is either not possible or is just too difficult to be worth the cost. We show how
easy and worthwhile it is to automate these tests.
Another area covered in the present work, but absent from others, is that
of application-level testing, which is the proving of our software against its
requirements, item-by-item. These 'function tests' as we call them, are enormously
useful and reassuring when we are in customer support mode.
For example, recently a customer rang us to report that blank lines in LabWizard
reports are not appearing when the report is viewed in his lab's Laboratory
Information System (LIS). Is this a LIS fault, or a LabWizard fault?
This test answers the question in LabWizard's favor. If we did not have this
function test, we'd have to search through and understand a lot of code to respond to
our customer.
[]
Preface
Any programmer who is not convinced about the need to have automated tests as a
part of their build process should also read this book. We hope that our experience
with LabWizard, and the tools we provide, will change their opinion.
One way of getting more of an idea of what this book is about, is to consider the
reasons why some developers don't write tests as one of their main day-to-day
activities. Let's have a look at the things that come between programmers and the
tests they should be working on.
Roadblocks to Testing
It's been over 25 years since G. Myers' classic "The Art of Software Testing", so we
know the principles. Every month we hear of some major software failure, so we
know it's important. So how is it that any software is not tested effectively? Well,
here are the roadblocks.
Where does testing appear in this process? Last, and at the bottom of the heap! And
what things are done last? The least important things!
[]
Other documents randomly have
different content
750 Fall of the Omayyad dynasty. Two rival Saracen powers
are formed. Ravenna taken by the Lombards.
751 Capture of Melitene and Theodosipolis by Constantine.
753 Invasion of Italy by Pepin. Council of Constantinople
favours iconoclasm.
755 Invasion of Thrace by the Bulgarians. Pepin continues
invasion of Italy.
757 The Bulgarians driven back to their own territory with
great slaughter.
760-765 Constantine invades Bulgaria. Victory of Anchialus,
762.
766 Wreck of the Roman fleet at the mouth of the Danube.
Edicts against image-worship extended and vigorously
enforced.
773-774 Campaigns against the Bulgarians. Victory of
Lithosoria. Peace made with the Bulgarian monarch,
which Constantine breaks.
775 Leo IV, son of Constantine, succeeds him. He is a
zealous iconoclast. He marries the empress Irene.
778 Successful campaign against the Bulgarians.
780 Capture of Semaluos by Harun-ar-Rashid. Death of Leo.
Irene becomes regent for the ten-year-old
Constantine VI.
781 Revolt of Elpidius in Sicily.
782 The Mohammedans under Harun-ar-Rashid invade Asia
Minor.
787 Council of Nicæa sanctions image-worship.
788 The Bulgarians gain a victory at the Strymon.
789 The Arabs invade Rumania.
790 Constantine assumes control of the government. Irene
is unwilling to relinquish power and a struggle between
the two begins.
791 The emperor conducts a campaign against the
Bulgarians.
792 A conspiracy formed against Constantine by his uncles is
suppressed and severely punished. Irene’s dignity
restored. Second campaign against the Bulgarians.
795 Constantine divorces his wife Maria and marries
Theodota.
796 Third Bulgarian campaign of Constantine.
797 Irene, taking advantage of Constantine’s unpopularity
on account of his treatment of Maria, imprisons him and
has his eyes put out. She now reigns alone. Conspiracy
to place one of Constantine V’s sons on the throne.
798 Peace made with the Mohammedans.
800 Revival of the western division of the empire by the
coronation of Charlemagne. There are now two distinct
empires.
802 Conspiracy against and deposition of Irene.
Nicephorus I, the treasurer, chosen emperor. He
maintains political order but is a hard fiscal oppressor.
803 Death of Irene in exile. Bardanes, the general, proclaims
himself emperor, but receiving no support, negotiates
for his own pardon. Treaty with Charlemagne, regulating
confines of the two empires.
806 Humiliating peace with Harun-ar-Rashid.
808 Unsuccessful attempt of Arsaber to obtain throne.
809 Death of Harun-ar-Rashid reopens the struggle with the
Mohammedans.
810 Treaty of peace with Charlemagne, who unsuccessfully
tries to make the Venetians and their allies tributary to
him.
811 The emperor at war with the Mohammedans and
Bulgarians. Death of Nicephorus in an attack by the
Bulgarians. His son Stauracius succeeds. He is unable
to hold out against the unpopularity of his father’s fiscal
severity. After two months’ reign, a revolution places
Michael (I) Rhangabe on the throne. The
Mohammedans, owing to civil strife, do not trouble the
empire, but the Bulgarians continue their attacks, with
such success that
813 Michael is deposed, and the general Leo (V) the
Armenian is saluted as emperor. Michael retires to a
monastery. The Bulgarians approach the walls of
Constantinople.
814 Annihilation of the Bulgarian army by Leo, at
Mesembria. Thirty years’ truce concluded. Leo pursues a
variable policy in regard to image-worship.
820 Leo assassinated in a conspiracy in favour of Michael
(II) the Stammerer, who takes the throne.
1261 Michael imprisons Joannes IV and has his eyes put out.
For this Arsenius excommunicates Michael. Important
commercial treaty with the Genoese renewed after
hostilities in 1275. Pope Urban IV frees Villehardouin
from his promises to Michael on his release. Warfare
results.
1263 Urban IV mediates between Michael and Villehardouin.
1264 Peace between the emperor and Michael of Epirus.
1265 Deposition of Arsenius causing the Arsenite schism.
1269 Charles of Anjou, aided by Joannes of Thessaly and
Michael of Epirus, takes up arms against the emperor to
restore Baldwin II.
1271 Great defeat of the imperial forces at Demetriades
(Volo). Constantinople in danger. Michael proposes
union of Greek and Latin churches as a means of saving
his throne.
1274 Union of churches effected at council of Lyons. It is
opposed by a large faction in the Greek church. It was
never really completed, and falls to pieces at Michael’s
death.
1280 The Seljuk Turks take Nyssa.
1281 Treaty of Orvietto between the pope, Naples, and
Venice to conquer the Greek Empire for Philip, son of
Baldwin II. The plan is frustrated by the Sicilian Vespers.
1282 Death of Michael in an expedition against Joannes
Ducas of Thessaly. He is a conspicuous example of the
misuse of despotic power. His son Andronicus (II)
Palæologus succeeds. Ecclesiastical troubles compel
the emperor to neglect military matters for a time.
1290 Unsuccessful attack upon Nicephorus of Epirus.
1295 Michael IX, son of Andronicus, receives the imperial
title from his father.
1301 Foundation of Ottoman Empire by Osman, who attacks
the Greek Empire. Disgraceful defeat of Greeks
commanded by Michael, near Nicomedia. The command
given to a Tatar chief. The Ottomans gradually conquer
all the Byzantine possessions in Asia.
1303 The Catalan Grand Company, engaged by Michael to
help fight the Turks, and headed by Roger de Flor, lands
in Constantinople.
1304 Relief of Philadelphia by Roger. He conceives the idea
of forming a principality in the East.
1305 Roger de Flor visits Constantinople to demand pay for
his men.
1306 Turks retake Philadelphia. Plan of Ferdinand of Majorca
to conquer a kingdom in the Greek Empire.
1307 Roger de Flor created cæsar. He sets out for Asia but is
assassinated. The company breaks its ties with Michael,
and sets out to conquer territory for itself. Battle of
Apros. The company takes possession of several
districts. Excommunication of Andronicus by Clement V.
1310 The company and their Turkish auxiliaries enter service
of the duke of Athens. Conquest of Rhodes by knights
of St. John.
1311 Battle of the Cephisus and victory of the Catalan Grand
Company over the duke of Athens pave way for the
conquest of Attica. The Turkish auxiliaries return home.
1315 Victory of Philes Palæologus over Turks at Bizya.
1320 The emperor Michael dies.
1321 Beginning of civil war by partisans of the emperor’s
grandson Andronicus led by Cantacuzenus and
Synadenus.
1322 Peace of Epibates concludes civil war.
1325 Andronicus compelled to bestow imperial crown on his
grandson Andronicus (III) Palæologus; the two
reign together.
1327 Andronicus II brings charges against Andronicus III.
Civil war breaks out again.
1328 Synadenus overcomes garrison of Constantinople.
Abdication of Andronicus II puts an end to civil war, but
the court remains full of intrigue.
1329 Imperial defeat at Pelekanon by the Ottoman Orkhan.
1330 Surrender of Nicæa to Orkhan.
1330-1337 Ottoman invasions of the European provinces.
1334-1337 Expedition of Andronicus into Epirus.
1337 The Mongols cross the Danube and ravage northern
district. Anne regent for Nicephorus II, despot of
Epirus, turns the despotat over to Andronicus.
1338 Surrender of Nicomedia to Orkhan.
1339 Revolt in the despotat of Epirus put down.
1341 Death of Andronicus. His young son Joannes (V)
Palæologus succeeds with Empress Anne of Savoy as
regent. Rebellion of the prime minister Joannes (VI)
Cantacuzenus, who is proclaimed emperor and
guardian of Joannes. He often calls himself Joannes V.
Apocauchus and Joannes Apri intrigue against
Cantacuzenus. A long civil struggle commences.
1342 Stephen Dushan of Servia allies himself with rebels and
invades empire.
1343 Cantacuzenus makes alliance with Turks. The war
continues with violence.
1344 Cantacuzenus takes Gratianopolis and makes treaties
with Servia and Bulgaria.
1345 Murder of Apocauchus. Vicinity of Constantinople
devastated.
1346 Defection of Orkhan from Anne’s cause leads to
triumph of Cantacuzenus. Earthquake at Constantinople
destroys portion of St. Sophia.
1347 Treaty of Cantacuzenus with Anne recognises right of
former to rule for ten years. The Black Death rages.
1350 Cantacuzenus uses money sent by Russians to rebuild
St. Sophia to pay Ottoman mercenaries.
1351 Joannes V takes up arms against Cantacuzenus.
1352 Peace with Genoa after three years’ war. Cantacuzenus
hires Turkish mercenaries to fight Bulgarians and
Servians.
1353 Cantacuzenus proclaims his son Matthæus emperor,
and a deadly strife between him and the Palæologus
family ensues.
1354 Cantacuzenus dethroned. Joannes V sole emperor.
Matthæus Cantacuzenus continues civil war.
1357 Matthæus Cantacuzenus delivered to Joannes by his
captors the Servians and made to renounce all rights to
the throne.
1361 The Ottoman Turks under Murad I take Hadrianopolis.
This seals the fate of the Greek Empire.
1363 The Ottomans take Philippopolis and Serres. Defeat of
Louis of Hungary.
1369-1370 Joannes visits Rome to obtain help for his falling
empire, but is unsuccessful. On way home is arrested
for debt in Venice and released with money raised by his
son, Manuel.
1375 Andronicus, Joannes’ eldest son, conspires against him
while the emperor is absent on a visit to Murad. He is
aided by Saugdi, eldest son of Murad. Murad hastens to
Europe and quells rebellion. Both Andronicus and
Saugdi have their eyes put out.
1377 Andronicus escapes from prison, imprisons his father,
and confers title on his own son.
1381 Joannes rescued by Venetians under Carlo Zeno.
Concludes treaty with Andronicus, recognising his and
his son’s rights to the title. Treaty with Murad in which
Joannes acknowledges himself the vassal of the
Ottoman Empire.
1384 Manuel, second son of Joannes, proclaimed emperor
and crowned.
1389 Battle of Kossova. Great Ottoman victory over the
Servians. Assassination of Murad. Bajazet succeeds,
renews treaty with Joannes, and puts Manuel at head of
Greek troops in Ottoman army.
1390 Ottomans capture Philadelphia the last independent
Greek community in Asia Minor.
1391 Death of Joannes. Manuel (II) Palæologus sole
emperor. He hastens to Constantinople, fearing his
brother will seize the crown.
1396 Great victory of Bajazet at Nicopolis. He now
determines to proceed against Constantinople. Manuel
visits France for help.
1398 Marshal Boucicault arrives at Constantinople with his
fleet. The Tatar conqueror, Timur, distracts Bajazet’s
attention from the empire.
1399 Joannes of Selymbria, son of Andronicus, enters
Constantinople and is proclaimed emperor. Manuel visits
European courts for help.
1402 Manuel returns home, his mission unsuccessful. Battle
of Angora. Crushing defeat of Bajazet by Timur.
1403 Treaty of Suleiman and Manuel, the former yielding up
territory in Macedonia and Thessaly.
1410 Musa, Suleiman’s brother, after the latter’s death,
reconquers territory ceded by Suleiman to Manuel.
1412 Musa begins a feeble siege of Constantinople, but is
soon distracted by civil troubles.
1413-1421 During reign of Muhammed I, the Greek Empire
enjoys uninterrupted peace. Manuel employs time in
reorganising administration and consolidating his power.
1419 Manuel makes his son, Joannes (VII) Palæologus,
co-emperor.
1422 Murad II besieges Constantinople to punish Manuel for
his intrigues. He is obliged to raise siege in order to
proceed against his brother, Mustapha.
1423 Manuel assumes monastic habit, taking name of
Matthew. Joannes sole emperor. The empire is now
reduced to the city of Constantinople and vicinity,
Thessalonica, and a part of the Peloponnesus. The
finances are exhausted through payment of tribute to
the Turks. The empire enters its final stage of lethargy.
1430 Murad II conquers Thessalonica. The Genoese of
Galata attack Constantinople on account of trade
dispute in Black Sea.
1431 Terrible epidemic in Constantinople.
1439 Joannes and the Greek patriarch attend council of
Florence and ratify union of the Greek and Roman
church. The pope promises to aid the empire, but
forgets agreement to send fleet to Constantinople.
1440 On return of the emperor, the bishop of Ephesus
succeeds in confining the union only to the palace. The
emperor’s brother Demetrius attempts to gain throne,
but fails.
1447 Murad marches against the emperor’s brother
Constantine, who is ruling over the Peloponnesus.
Corinth and Patras taken. Treaty with Constantine, who
pays tribute.
1448 Death of Joannes. His brother Constantine (XIII)
Palæologus or Dragazes, despot of Sparta, succeeds.
1449 Muhammed II succeeds Murad II. His chief ambition is
the conquest of Constantinople, and he at once
prepares for it. Builds a fort on the Bosporus.
1452 Joannes appeals to Pope Nicholas V for aid. Cardinal
Isidore and a small body of auxiliaries are sent.
1453 Siege and capture of Constantinople by Muhammed II.
Death of Constantine in battle. Muhammed enters his
new capital. End of the Eastern Empire.
Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.
ebookultra.com