100% found this document useful (4 votes)
33 views

Download Complete Learn API Testing: Norms, Practices, and Guidelines for Building Effective Test Automation Jain PDF for All Chapters

Test

Uploaded by

syrusnandox4
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (4 votes)
33 views

Download Complete Learn API Testing: Norms, Practices, and Guidelines for Building Effective Test Automation Jain PDF for All Chapters

Test

Uploaded by

syrusnandox4
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Get ebook downloads in full at ebookmeta.

com

Learn API Testing: Norms, Practices, and


Guidelines for Building Effective Test Automation
Jain

https://ebookmeta.com/product/learn-api-testing-norms-
practices-and-guidelines-for-building-effective-test-
automation-jain/

OR CLICK BUTTON

DOWNLOAD NOW

Explore and download more ebook at https://ebookmeta.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Learn API Testing: Norms, Practices, and Guidelines for


Building Effective Test Automation 1st Edition Jagdeep
Jain
https://ebookmeta.com/product/learn-api-testing-norms-practices-and-
guidelines-for-building-effective-test-automation-1st-edition-jagdeep-
jain/
ebookmeta.com

Cambridge IGCSE and O Level History Workbook 2C - Depth


Study: the United States, 1919-41 2nd Edition Benjamin
Harrison
https://ebookmeta.com/product/cambridge-igcse-and-o-level-history-
workbook-2c-depth-study-the-united-states-1919-41-2nd-edition-
benjamin-harrison/
ebookmeta.com

Python for DevOps Learn Ruthlessly Effective Automation


1st Edition Noah Gift Kennedy Behrman Alfredo Deza Grig
Gheorghiu
https://ebookmeta.com/product/python-for-devops-learn-ruthlessly-
effective-automation-1st-edition-noah-gift-kennedy-behrman-alfredo-
deza-grig-gheorghiu/
ebookmeta.com

Practical ESD Protection Design 1st Edition Wang Albert

https://ebookmeta.com/product/practical-esd-protection-design-1st-
edition-wang-albert/

ebookmeta.com
The Shifter s Redemption 1st Edition Ivy Ember

https://ebookmeta.com/product/the-shifter-s-redemption-1st-edition-
ivy-ember/

ebookmeta.com

Spoon Feeding Basic must Know Physics for Boys and Men for
IIT JEE Olympiad kind of exams by Professor Subhashish
Chattopadhyay 1st Edition Professor Subhashish
Chattopadhyay
https://ebookmeta.com/product/spoon-feeding-basic-must-know-physics-
for-boys-and-men-for-iit-jee-olympiad-kind-of-exams-by-professor-
subhashish-chattopadhyay-1st-edition-professor-subhashish-
chattopadhyay/
ebookmeta.com

The Adorned Body Mapping Ancient Maya First Edition


Nicholas Carter

https://ebookmeta.com/product/the-adorned-body-mapping-ancient-maya-
first-edition-nicholas-carter/

ebookmeta.com

Secret Weapon Criminal Desires 1st Edition Matilda Martel

https://ebookmeta.com/product/secret-weapon-criminal-desires-1st-
edition-matilda-martel/

ebookmeta.com

Locating World Cinema Mk Raghavendra

https://ebookmeta.com/product/locating-world-cinema-mk-raghavendra/

ebookmeta.com
Meta in Film and Television Series 1st Edition David Roche

https://ebookmeta.com/product/meta-in-film-and-television-series-1st-
edition-david-roche/

ebookmeta.com
Learn API Testing

Norms, Practices, and

Guidelines for Building

Effective Test Automation

Jagdeep Jain

Learn API Testing: Norms, Practices, and Guidelines for


Building Effective Test Automation

Jagdeep Jain

Dewas, Madhya Pradesh, India

ISBN-13 (pbk): 978-1-4842-8141-3

ISBN-13 (electronic): 978-1-4842-8142-0

https://doi.org/10.1007/978-1-4842-8142-0

Copyright © 2022 by Jagdeep Jain

This work is subject to copyright. All rights are reserved by the


Publisher, whether the whole or part of the material is concerned,
specifically the rights of translation, reprinting, reuse of illustrations,
recitation, broadcasting, reproduction on microfilms or in any other
physical way, and transmission or information storage and retrieval,
electronic adaptation, computer software, or by similar or dissimilar
methodology now known or hereafter developed.

Trademarked names, logos, and images may appear in this book.


Rather than use a trademark symbol with every occurrence of a
trademarked name, logo, or image we use the names, logos, and
images only in an editorial fashion and to the benefit of the
trademark owner, with no intention of infringement of the trademark.
The use in this publication of trade names, trademarks, service
marks, and similar terms, even if they are not identified as such, is
not to be taken as an expression of opinion as to whether or not they
are subject to proprietary rights.

While the advice and information in this book are believed to be true
and accurate at the date of publication, neither the authors nor the
editors nor the publisher can accept any legal responsibility for any
errors or omissions that may be made. The publisher makes no
warranty, express or implied, with respect to the material contained
herein.

Managing Director, Apress Media LLC: Welmoed Spahr

Acquisitions Editor: Divya Modi

Development Editor: James Markham

Coordinating Editor: Divya Modi

Copy Editor: Mary Behr

Cover designed by eStudioCalamar

Cover image designed by Freepik (www.freepik.com)

Distributed to the book trade worldwide by Springer


Science+Business Media New York, 1 New York Plaza, Suite 4600,
New York, NY 10004-1562, USA. Phone 1-800-SPRINGER, fax (201)
348-4505, e-mail orders-ny@springer-sbm.com, or visit
www.springeronline.com. Apress Media, LLC is a California LLC and
the sole member (owner) is Springer Science + Business Media
Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware
corporation.

For information on translations, please e-mail


booktranslations@springernature.com; for reprint, paperback, or
audio rights, please e-mail bookpermissions@springernature.com.
Apress titles may be purchased in bulk for academic, corporate, or
promotional use. eBook versions and licenses are also available for
most titles. For more information, reference our Print and eBook Bulk
Sales web page at www.apress.com/bulk-sales.

Any source code or other supplementary material referenced by the


author in this book is available to readers on GitHub via the book's
product page, located at https://github.com/Apress/

Learn- API- Testing.

For more detailed information, please visit


https://github.com/Apress/Learn- API- Testing.

Printed on acid-free paper

I dedicate this book to my teachers, mentors,

and colleagues who have been instrumental in

the enhancement of my knowledge on the subject,

and also to my wife, daughter, sisters, parents, and in-laws,

without whose relentless support it would not have been

possible to manage the tight schedule of this work.

—Jagdeep Jain

Table of Contents

About the Author


�������������������������������
�������������������������������
������������������xv About the Technical
Reviewers
�������������������������������
�������������������������xvii
Acknowledgments
�������������������������������
�������������������������������
���������������xix Introduction
�������������������������������
�������������������������������
�������������������������xxi Chapter 1:
Introduction to API Testing
�������������������������������
�������������������1

What Is API Testing?


�������������������������������
�������������������������������
�������������������������������
�1

Need
�������������������������������
�������������������������������
�������������������������������
�������������������������5

Types of API Testing


�������������������������������
�������������������������������
�������������������������������
�6

Advantages
�������������������������������
�������������������������������
�������������������������������
��������������8
Summary���������������������������
�������������������������������
�������������������������������
����������������������9

Chapter 2: Web Application Architecture


�������������������������������
������������11

Web Applications Defined


�������������������������������
�������������������������������
���������������������11

Monolithic vs� Microservices Architecture


�������������������������������
���������������������������12

Designing Test Strategies


�������������������������������
�������������������������������
����������������17

RESTful Architecture
�������������������������������
�������������������������������
�����������������������������18

HTTP
�������������������������������
�������������������������������
�������������������������������
�����������������������20

Headers
�������������������������������
�������������������������������
�������������������������������
������������������23

Requests
�������������������������������
�������������������������������
�������������������������������
����������������25

Request Methods
�������������������������������
�������������������������������
�����������������������������25

Resource Addresses
�������������������������������
�������������������������������
������������������������25

Table of ConTenTs

Request Headers
�������������������������������
�������������������������������
�����������������������������25

Request Body
�������������������������������
�������������������������������
�������������������������������
���26

Response
�������������������������������
�������������������������������
�������������������������������
���������������27

Status Line
�������������������������������
�������������������������������
�������������������������������
��������27

Response Header
�������������������������������
�������������������������������
����������������������������28

Response Body
�������������������������������
�������������������������������
�������������������������������
�28

Response Codes
�������������������������������
�������������������������������
�������������������������������
�����28

Summary���������������������������
�������������������������������
�������������������������������
��������������������30

Chapter 3: Authentication
�������������������������������
�������������������������������
�����31
HTTP Authentication
�������������������������������
�������������������������������
������������������������������31

Basic Authentication
�������������������������������
�������������������������������
������������������������32

Session-Based Authentication
�������������������������������
�������������������������������
��������������32

Token/JWT-Based Authentication
�������������������������������
�������������������������������
���������33

OAuth2-Based Authentication
�������������������������������
�������������������������������
���������������35

Authorization
�������������������������������
�������������������������������
�������������������������������
����������37

RBAC
�������������������������������
�������������������������������
�������������������������������
�����������������37
ABAC
�������������������������������
�������������������������������
�������������������������������
�����������������38

Authentication and Authorization Services


�������������������������������
��������������������������38

Summary���������������������������
�������������������������������
�������������������������������
��������������������39

Chapter 4: Tools, Frameworks, and Libraries


�������������������������������
������41

API Testing Tools


�������������������������������
�������������������������������
�������������������������������
����42

cURL
�������������������������������
�������������������������������
�������������������������������
�����������������42

Postman
�������������������������������
�������������������������������
�������������������������������
�����������51
RestAssured
�������������������������������
�������������������������������
�������������������������������
�����63

Frameworks/Libraries
�������������������������������
�������������������������������
���������������������������71

TestNG
�������������������������������
�������������������������������
�������������������������������
��������������71

Log4j
�������������������������������
�������������������������������
�������������������������������
�����������������72

vi

Table of ConTenTs

Jackson-Databind
�������������������������������
�������������������������������
���������������������������72

HashMap
�������������������������������
�������������������������������
�������������������������������
����������72
Assertj
�������������������������������
�������������������������������
�������������������������������
��������������73

Java Spring
�������������������������������
�������������������������������
�������������������������������
�������73

Summary���������������������������
�������������������������������
�������������������������������
��������������������73

Chapter 5: Test Pyramid


�������������������������������
�������������������������������
�������75

Black Box Testing


�������������������������������
�������������������������������
�������������������������������
���76

Grey Box
Testing����������������������������
�������������������������������
�������������������������������
��������77

White Box Testing


�������������������������������
�������������������������������
�������������������������������
���77

Test Pyramid
�������������������������������
�������������������������������
�������������������������������
����������78

Summary���������������������������
�������������������������������
�������������������������������
��������������������79

Chapter 6: Testing the API


�������������������������������
�������������������������������
����81

Workflows/Use Cases/Test Script


�������������������������������
�������������������������������
���������82

Schema
Validation���������������������������
�������������������������������
�������������������������������
������82

Test
Coverage���������������������������
�������������������������������
�������������������������������
�������������85
Other documents randomly have
different content
Rob confessed that he could not make it out at all. He was really
too tired to continue bothering his brains over the puzzle.
“Perhaps tomorrow, when Peleg comes home again, we may find
out what it all means,” he told himself. “There’s no way of finding out
right now; and so what’s the use fussing with it?”
Accordingly, Rob put the affair out of his mind. If it came to the
worst there was a speedy way of learning the truth, just as Ralph
had mentioned; by going to town again, with the excuse that he
wanted to see what Wyoming looked like after the great
conflagration, Ralph could drop in and see the curio dealer. Being
ready to buy back the stamps, if Peleg had really sold them, he could
influence Mr. Hardman to return the stolen property.
They made the little journey back to the farm without incident.
Ralph did not attempt anything like speed in covering the ten or more
miles. Twice that same night he had raced like mad over that course,
escaping disaster several times only by a narrow margin. Ralph did
not care to accept the same risks again when there was no sense in
it.
Rob, however, would not soon forget both of those hurried trips,
with that ominous glare in the heavens to spur the driver on.
Arriving home, they soon sought their beds, for it was a pretty
tired lot of fellows who came back after such a tempestuous
experience.
Little talking was indulged in, at Rob’s suggestion. They could
leave that for the morning, when they would be refreshed, and able
to discuss all details connected with the night of terror.
When morning came it proved to be a fine opening, for the sun
arose in a clear sky, despite the threat of rain during the earlier part
of the preceding night.
They had hardly finished breakfast, and were trying to lay out a
programme for the day, when the man Pete, who was in charge of
Ralph’s queer fur farm showed up. Rob understood from his manner
that something unusual must have caused him to pay this early
morning visit to the farmhouse, for as a rule he cooked his own
meals up at the other station, sleeping there as well.
When Ralph had had a little talk with him he came over to where
the rest of the boys were sitting on the porch.
“Well, more trouble in prospect up at my fox farm,” Ralph
remarked.
“Another cat bobbed up, Ralph?” asked Rob, immediately. “I
mention that because I happen to know as a rule where you run
across one you’ll also find its mate, for they generally hunt in
couples.”
Ralph nodded his head, and made a wry face.
“You’re on, Rob,” he replied. “Pete heard the critter screeching
over in the woods last night. Then this morning he found where it
had entered my preserves, and he thinks it must have got away with
one of my fox pups, for he saw signs of blood and fur on the ground.
But, anyhow, whether that’s so or not, we’ve got to get after Mr. Cat,
and keep it up till we bag him. There’ll be no peace as long as he
hangs out around my fur farm.”
“Will Pete go out and try to shoot this one like he did the last?”
asked Tubby, remembering the fresh skin that had been fastened to
a stretching board, and hung on the shady side of the cottage to dry
in the air away from the sun.
“He’ll keep on the move right along, with his gun on his shoulder,”
explained Ralph. “But his running across the first rascal was a big
piece of luck. This time I’ll have to try and fix a trap for the beast.
Since there’s no time like the present, I think I’ll get busy now. Who
wants to go up with me?”
There was a unanimous assent, showing that all of them felt a
deep interest in this part of the proceedings. So, leaving the
farmhouse, they strolled along in the direction of the fur farm, away
off at the upper part of Mr. Jeffords’ extensive property holdings.
Pete went with them, and on the way detailed once more, for the
benefit of the scouts, how he had heard the screech of the cat not far
from break of day. He had known that something far out of the
common was taking place down at Wyoming, for he had seen the
flame in the sky, and even caught something of the clamor that
accompanied the fire; but his duty was to stay and guard Ralph’s
valuable property, so Pete had resisted the temptation to start toward
town.
In return, the boys described some of the wonderful sights that
had come their way while watching the town burning. Pete was also
informed concerning the fortunate inspiration that had come to Rob,
following out which the dynamite had been used to baffle the fire
fiend. Ralph it was who told most of this, apparently much to the
confusion of Rob, who several times tried to throw the praise on the
shoulders of the one who had piloted the car back and forth, laid the
explosives without a hitch, and certainly merited a big share of the
successful outcome.
Once they were at the cottage where Pete held forth, Ralph began
to overhaul a number of rusty traps which he apparently had not
touched for some time.
“Three winters ago,” he told them, “I used to do quite a good deal
of trapping, and learned a whole lot about the habits of such wild
animals as we have around this section of the Adirondacks. Then I
got that fur-farm fever, and read up all the articles I could find about
the raising of black foxes, and such things. Well, after that I didn’t
care to trap common stock, and so I haven’t done a thing at it since.
So my traps look pretty seedy; but they’ll work, all right. Pete, the
first chance you get, give these things a good oiling. No use having
them go to the scrap heap for nothing.”
He picked out a certain trap, and said it would answer their
purpose.
“It must be set outside the boundaries of my enclosure,” Ralph
continued, when Tubby had suggested that one of the foxes or mink
might be caught, “and I’m depending a whole lot on Pete to show me
the right place. The cat will likely come back again tonight, and follow
the same path to the high fence. We’ll set the trap now, because
even in the daytime a hungry cat often starts out to get a meal.”
“Oh! I’ve met them in the woods when the sun was shining
brightly,” said Rob. “Hunger causes even animals who see best in
the dark to roam around during daylight. But I agree with you, Ralph,
when you figure that your trap is more apt to wind up the cat’s career
than Pete’s gun.”
All of them went forth to see the trap set, Pete leading them to
where he had reason to believe the animal had crossed the
boundary line of the preserves. Tubby in particular watched every
move Ralph made when setting the trap; for Tubby knew next to
nothing about such things, never having had an opportunity to visit
the woods during fur season.
After this had been duly attended to, they once more took a look
around the fur farm, and then sauntered back to the house. Rob was
wondering what Ralph intended doing with regard to finding an
answer connected with the stamp disappearance mystery. He fully
anticipated that the other would announce his intended departure for
the town, and asking whether any of them would care to go along.
But the morning passed away, and nothing was said or done.
In fact, Andy and Tubby went fishing, the stout scout seeming to
have taken a great liking for the sport. Considering the fact that he
was “high notch” so far, having captured the largest bass yet taken,
this was not to be wondered at.
“I’m going to ask you to do me a favor, Rob,” remarked Ralph as
they sat there on the porch, Sim being at some other part of the
premises just then, having accompanied his uncle to see a new
patent churn that he had installed in the milk cellar.
“Now he’s going to bring up the subject of Peleg again,” thought
Rob; but for once he was mistaken, since Ralph did nothing of the
sort.
“I’m getting to be a whole lot interested in that flashlight picture
game,” he went on to say; “and I’d like to see how you work it, if you
don’t object.”
“Why, that would be easy enough,” the scout leader told him,
much gratified, “for I happen to have the apparatus in my bag. You
see, at the last minute I got an idea we might want to take a few
pictures of that sort, and so I chucked it in. What kind of animal have
you in mind, Ralph?”
“Well, my mink interest me more than anything else,” came the
reply; “partly because they are so shy that you can hardly ever get a
glimpse of the little rascals. I don’t know near as much about their
habits as I’d like, though as a trapper I understood where to set my
traps in order to catch them visiting in and out of the holes along the
banks of a creek.”
“All right, then, if you say the word we can set a snare tonight that
may bring results,” Rob continued. “I don’t know that I ever got a
good picture of a mink, and it would please me to manage it that
way.”
Still nothing was said about Peleg, although Rob had incidentally
asked some time before if the boy had shown up at the farm, to learn
that nothing had as yet been seen of him.
Apparently Ralph had not as yet made up his mind concerning a
visit to town. It might be that the strenuous events of the preceding
night were still too vivid in his mind for him to desire to see how
Wyoming looked after the fire. Rob, on his part, had no intention of
influencing the other to take a run in, knowing as he did that this
would mean a trip to the curio dealer, and possibly finding out certain
unpleasant truths concerning Peleg.
The two fishermen came back in the car, which Andy had been
able to run, just as the lunch bell sounded. Rob knew as soon as he
saw them that something out of the usual run must have happened,
for both looked mysterious and excited.
Chapter XXIII
Just Between Boys
“Why, they’re all wet, boys, if you’ll believe me!” exclaimed Sim, as
soon as Tubby and Andy arrived in the car.
Tubby got out, laboriously, and then proceeded to exhibit as fine a
string of bass as the heart of any enthusiastic angler could wish.
“But the biggest got away from us, I’m sorry to say,” he remarked.
“’Course I know well enough that that’s an awful old excuse, but in
this case it’s a fact. Our condition proves it, too. I held on like grim
death, even after he upset the boat, and, say, he dragged me under
twice, and then—shucks! the line broke. I guess he snagged it on a
sharp rock. These bass are mighty smart fish, I’m finding out.”
Andy was grinning, as though it may have been something of a
“circus” to him even if he had also been thrown into the water by the
capsizing of their cranky boat when the clumsy Tubby became
excited with such a large fish on his hook.
“Believe me, it was a lively time,” he admitted. “Tubby was
swimming, and spouting the water out of his mouth like a whale, all
the while holding on to his rod, and trying to yell. I think he would
have landed that monster bass if only the line hadn’t gone back on
him. He was the most disappointed fellow you ever saw when he
found his prize had skipped out.”
“Were you far from the shore, and what did you do?” asked Rob.
“It happened that we were fishing past that big rock where Tubby
caught his other noble bass,” explained Andy. “So we didn’t have far
to swim, pushing the boat between us. I knew that was the easiest
way to manage, because Tubby would have had a tough job
climbing over the stern.”
“Huh! must have weighed nearly a ton with my soaked clothes,”
the fat boy agreed. “But we didn’t lose anything, except a hook, and
that monster bass. It wasn’t such a terrible experience, either. If the
day had been chilly at all we’d have started a fire, and dried out; but
neither of us cared to bother going to all that trouble; so we baled out
the boat, and just commenced fishing again; but I never got another
bully strike like that one.”
They were not feeling uncomfortable in the least; as their clothes
had by this time pretty well dried out upon their backs, neither of the
boys took the trouble to make any change.
“I’m too hungry to wait a minute,” announced Tubby, showing that
he had heard the summons to lunch as the car approached the
farmhouse.
It was high noon, and still no Peleg. Rob continued to wonder
what could be keeping the farm boy in town. Still, it was a good ten
mile tramp in case he thought to make it afoot. On the other hand,
Rob thought he might be waiting for a chance to ride with some
farmer returning home, and that the opportunity may not as yet have
come along.
“What, no frogs’ legs today?” remarked Tubby, when the meal had
progressed far enough to show this lack of his favorite delicacy.
“Oh! we’ve decided to leave all that to you, Tubby,” laughed
Ralph. “It seems that the rest of us have had all we want of that fish-
chicken combination. There’s the pond, and whenever you feel like
having a mess take my Flobert and get busy. The rest of us have
other fish to fry.”
“What’s the programme for this afternoon?” asked Sim.
Rob looked toward Ralph, fully expecting to hear the other
suggest that they go to town. Again he was mistaken, for nothing of
the kind came about.
“Why,” Ralph started to say, “father has asked me to take the car
and run over to Flemington to attend to some business that needs
looking after. If any or all of you feel like going along, now’s your
chance to say the word. There’ll be room for you, and it’s worth
going thirty miles uphill and down, for you’ll get some mighty fine
views. How about you, Rob?”
“I’m game if the rest are,” came the ready reply.
In rapid succession Tubby, Sim and Andy announced themselves
willing to take part in the excursion. It would show them a section of
country that was new; and promised to be quite an enjoyable
diversion. Evidently, then, Rob concluded, Ralph did not mean to
look that curio dealer up in a hurry, so as to settle the question of
Peleg’s innocence or guilt.
“I wouldn’t be much surprised,” Rob told himself, “if Ralph sort of
shrinks at doing that. He would like to get his stamps back, but while
the case is open and unsettled he can try and convince himself that
the boy isn’t guilty. Once he has the proof dead to rights and Peleg
must go. It does Ralph a whole lot of credit, this trying to give the boy
all the chance he can.”
They certainly had a glorious run of it on the way to Flemington,
and the scenery was all that the enthusiastic Ralph had promised.
He also managed to return by another roundabout road, so that they
could see still another section of country.
“Ralph, slow up, won’t you?” suddenly called out Sim, who was
sitting on the back seat. “I want to get a better look at something
through the trees over here on the right. There, I saw him again, and
now I’m dead sure of it.”
“Why, it certainly does look mighty much like our Peleg,” agreed
Tubby, who had also managed to crane his fat neck so as to obtain a
passing view; “but whatever would he be doing away over here, a
long way from your place; and he seemed to be driving a horse and
buggy, too. Ralph, what do you know about this?”
Ralph stopped the car, and also glanced back, for as he had to
keep his eyes on the road most of the time, it was not easy for him to
turn around, lest by so doing he land them in a ditch.
“Yes, that’s Peleg,” he announced, presently, and Rob could see
that the altogether strange appearance of the farm boy over in this
section when he should have turned up at the Jeffords’ place
surprised Ralph.
“What do you reckon he’s doing over here?” continued Tubby,
bound to “pump” the other until Ralph yielded up all the information
at his disposal.
“Well, I can explain that part of it,” was the reply. “You see, Peleg’s
sister is working out at that house where he’s going right now.
Evidently Peleg has hired that rig in town for the purpose of paying
his sister a visit.”
“Oh! seeing that he was off work, he must have just made up his
mind he might as well be killed for a sheep as a lamb; is that it,
Ralph?” demanded Tubby.
“Something like it, I guess,” answered the other, at the same time
giving Rob at his side a queer look, together with a frown.
Rob could easily guess what was passing through the mind of the
boy at the wheel of the car; he believed that Peleg must be spending
the money he had received for those packets of foreign stamps in
paying for the horse and buggy with which he was driving over to
see his sister.
It was not a pleasant thought to Rob. He wished the whole affair
would make haste to reach a settlement; if Peleg were guilty, the
sooner the fact became known to Ralph the better; if, on the other
hand, he could prove his innocence, it was too bad to keep up this
feeling of suspicion.
They started on again. So far as they knew, Peleg had not once
looked toward the road as he drove up along the lane leading to the
farmhouse just beyond the brow of the rise. Apparently he was at the
time so excited over the thought of seeing his sister again that he
had eyes and ears for nothing else; and the mere passing of a car
held no attraction for him. Rob thought it was just as well, for Peleg
might have signalled to them; and in some way Ralph was likely to
burst forth, perhaps openly accusing the boy in the presence of the
others.
So they went on. Ralph kept his thoughts to himself, not even
speaking of Peleg to Rob at his side. The others, very naturally,
continued to exchange remarks that Ralph could not help hearing
above the purr of the engine.
“Well, anyhow,” Tubby was saying, with his accustomed zeal, “I’m
glad to know he wasn’t hurt any in the fire. When he failed to show
up at the time we were leaving I felt worried. Lots of people got
injured, I’m sure, for the crowd acted like it was crazy, running back
and forth, and knocking everybody over who got in the way.”
“Peleg is all right, we know now,” interjected Andy. “He’s wanted to
see this sister of his for some time, I reckon, and took this chance to
get around. Oh! look at that bull chasing after that dog in the field,
will you? The little barker is too smart for the clumsy beast; but if
ever he gets those horns underneath him, I give you my word for it
he’ll clear thirty feet in the air if he does one.”
Little escaped their eyes as they rode along. First one and then
another would call attention to something of interest that was seen,
now on the right and again on the left. Tubby even declared that he
was beginning to believe he had a regular “rubber-neck,” they kept
him looking so much.
Back at the farm again, they lounged around the balance of the
afternoon. Ralph often looked along the road they had so recently
driven over, and Rob made up his mind that the other was hoping to
see Peleg coming. To his mind this proved that while Ralph had kept
unusually quiet on the subject, he was still worrying about the status
of the farm boy.
It was getting along toward sunset when finally Ralph, as if unable
to longer hold in, introduced the subject himself.
Perhaps the fact that he and Rob chanced to be alone at the time
had something to do with it. They were looking over the flashlight
apparatus, which the owner had been explaining to Ralph, who
agreed that the manipulation of the little “trick” was simplicity itself,
and could be easily managed by any one with a fair degree of
intelligence.
“It begins to look to me as though Peleg knows he must be under
suspicion, and doesn’t mean to come back to work here, much as I
hate to believe that, Rob,” was what he said, watching the face of his
companion so as to read his opinion even before the other made any
sort of reply.
“Oh! I wouldn’t say that until you know more about his actions,”
Rob told him. “You yourself said he had a queer and powerful
affection for his brothers and sisters. His going out there today
proves that, too. Now as a scout I’ve been taught never to believe
wrong of any one unless the proof is overwhelming; and even then to
try and think the best you can of him, perhaps by your influence
causing him to repent and make restitution.”
“I understand what you mean, Rob,” muttered the other, “and if
Peleg really showed any sign of being sorry for what he has done, I’d
forgive him, and keep his secret. I’m not one of the hard kind to hold
a thing against any chap, because I know we’re not all alike. Peleg,
being tempted, would mean ten times the strain on his honesty that
the same thing would to me. Yes, I’ve already made up my mind to
go easy with him.”
Rob was glad to hear this. At the same time he still hoped there
would be no occasion to exercise this clemency on the part of his
friend. It was pleasant for him to know Ralph was that sort of boy;
and he believed the other would make a model member of the new
scout troop, when it was organized in Wyoming.
“There’s just one more thing I want to say, Rob,” the other
remarked when they were about to pass out again to the open air,
and join the rest of the fellows on the shady porch. “Meeting you has
been a revelation to me, and given me a lot of new ideas. And let me
tell you I’ve never known any one who had such faith in finding a
streak of good in every boy that lives!”
“Oh!” said Rob with a laugh, “that’s easy enough when you figure
out your own struggles between right and wrong. All boys pass
through the same, more or less.”
Chapter XXIV
The Answer to the Puzzle
After supper that night Ralph and Rob went off to set the flashlight
trap in the mink enclosure. A fresh fish would be the bait to attract
one of the timid little fur-bearing animals to the place; and the
arrangement was such that when he attempted to possess himself of
the tempting morsel, the pull upon a cord would cause the flashlight
to snap off his picture before he could move.
Ralph was very much interested in the venture, and asked enough
questions to give him all necessary information. Apparently he had
taken a great fancy for this new method of “hunting with a camera,”
and would possibly amuse himself frequently later on in securing
various pictures that could not otherwise be obtained.
When they got back, somewhere around nine o’clock, Tubby
“wanted to know,” as he usually did.
“How about that old bobcat, Ralph? Signs of him taking the bait
you left out there for him?” he went on to inquire.
“We didn’t bother going to see,” he was told. “He’s got the whole
night before him to come around. So I’m just living off hope until Pete
makes his report in the morning. I’d hate to have my plans all
knocked silly by the accidental coming of a pair of cats.”
“You’ve got to remember,” Rob warned him, “to set your alarm
clock so you can wake up at three o’clock. You must be on hand
before the first streak of dawn, because if the light strikes in before
you get there the flashlight picture will be ruined.”
“Seems to me,” observed Tubby, thoughtfully, “there ought to be
some little mechanical invention calculated to close the opening of a
camera after just so many seconds have elapsed.”
“Perhaps there is,” Rob went on to say, “but if so I haven’t got the
attachment on my camera. Better get up one yourself, Tubby; there
would be money in it.”
“I’ll think it over,” the stout boy told them. “Sometimes I suspect
that I might make something of a success as an inventor; but so far
things I’ve tried to do just don’t seem to work a little bit. I even
experimented on a flying machine that was going to beat all these
common aeroplanes, and leave them at the stake. But I own up that
it wouldn’t budge me off the ground.”
“Which I should say was the most fortunate thing that ever
happened to you, Tubby,” chuckled Andy. “Falling overboard in the
lake is bad enough, but then you can swim or float; but just think
what would follow if that flying machine ever gave out while you were
away up in the air. Some of the fellows used to call you Punkin once
in a while, but believe me your name would be Squash then.”
Once again it was morning, after another pleasant experience in
which the boys managed to secure enough sleep to make up for the
loss of the preceding night.
Rob, after getting out, wandered around to the barns to see the
cows being milked, and the pigs fed, as well as the chickens and
turkeys and ducks. He loved to watch the big bronze gobbler strut
around, and make all those strange sounds as his wings scraped the
ground. Then the lordly peacocks on the ridge-pole of the big barn
emitted a series of shrill cries as they preened their glorious
plumage. When one of them chose to strut in all his glory on the
ground, Rob thought it was a most astonishing sight.
“Did Peleg happen to come back last night?” he asked one of the
men who was drawing the milk from a fine Jersey cow; Mr. Jeffords
wanted richness rather than quantity, which was the reason he
preferred that strain to the banded Holsteins.
“I guess not,” came the answer—“leastways, I ain’t seen anything
ov him around since the boy rode into town with the lot ov you t’other
evenin’.”
All of which only added to the mystery. Still, another day had
come, and perhaps they would see something of Peleg before
nightfall. Since it was known that he had been within seven miles of
the farm on the preceding day, while visiting his sister, there was a
likelihood of his turning up. Rob was beginning to feel that he wanted
to see the end of this little mystery. Innocent or guilty, he certainly
hoped Peleg would come along before the time set for their
departure arrived.
Just then he sighted Ralph returning. He held the camera safely
under his arm, and if the smile on his face stood for anything, Rob
felt justified in believing that the little venture must have met with
success.
“You got there before the light did, I hope?”
“Oh! yes, just the first peep was coming over in the east when I
arrived and took up the camera. Your scheme worked, too, Rob,
because the bait was gone, and the flashlight cartridge had been
fired in the pan.”
“We’ll find out after breakfast whether the snapshot is any good,”
the scout leader suggested. “If this one proves to be poor, we can try
again tonight, if no signs of rain warn us off. You never can tell what
you get until you develop your film or plate. Some of the finest
exposures I ever took were desperate chances, and that made the
surprise all the more agreeable.”
Later on Rob developed the plate in his daylight tank, and soon
assured the anxious Ralph, who, strange to say, had up to then
never cared for photography, that they had secured a splendid
negative. It showed the cautious mink clearly in the act of taking the
fish bait.
“I do believe it’s my old Jinks, as I named the first mature mink I
managed to get hold of!” exclaimed Ralph, minutely examining the
bright negative. “Why, you can see the hair on his back, the detail
work is so perfect. Rob, I’m going to like this thing more than I can
tell you. It opens up a new field for me, and one that seems to be just
to my taste.”
“Best of all,” added the patrol leader, “it doesn’t make any inroads
on the harmless little animals of the woods and swamps. You can get
them at home, and learn more about their nocturnal habits than by
any other known means.”
After the negative had been dried later on in the day, Rob printed
several copies, and passed them around. Even Mr. Jeffords declared
they were very fine, and when he learned how his boy had begun to
take a great interest in the modern way of making the acquaintance
of the timid woods folks, he encouraged Ralph in every way possible
to enlist in the cause.
“Things like this always go to make boys more humane,” the
farmer remarked. “That counts a whole lot. As a rule, they are apt to
have cruel instincts, handed down from their ancestors, who used to
have to depend on killing game to keep themselves alive. It’s about
time something were done to soften some of those savage traits;
and I believe your organization of scouts will do this without making
boys soft, or sissies at the same time.”
Plainly, the seed had fallen on good ground these days around
Wyoming. It seemed to be a foregone conclusion that before a great
while there would spring up an enthusiastic troop of scouts bound to
be a credit to the community.
That whole day passed and still there was no sign of the absent
one. Some of the fellows spoke of it as a strange thing, and also
went so far as to hint to Ralph that it looked as though Peleg may
have concluded he didn’t care to work on the Jeffords’ farm any
longer.
Rob noticed that Ralph declined to be drawn into any discussion
that had for its subject the doings of Peleg Pinder. He just shut his
teeth together, and made no comment when Tubby and Andy started
discussing this matter. At the same time Rob was quite positive
Ralph had not forgotten; and he imagined that when another day
came he might make up his mind to start toward Wyoming, bent on
settling the bothersome question once and for all.
During the day no word had come from Pete, so it could be set
down as pretty certain that the second wildcat had not been hovering
around the preserves where Ralph was trying to raise fancy-priced
fur.
“If anything had happened we would have heard,” the owner of
the fox farm told the rest of the boys. “Pete had orders to drop down
and let me know. I’m just about fixing a little telephone service
between my cabin up there and the home place here, so we can talk
without all this running back and forth.”
“Queer how you didn’t think of that long ago,” said Sim. “I’d have
done it in the start.”
“Well, the fact of the matter is,” laughed Ralph, “I put every dollar I
could scrape together or borrow from dad into my first blacks; and
the fencing of that big tract cost a whopping sum besides. But now I
begin to see an outlook ahead; and I’ve also convinced father that
there’s money in the project, so he’s loaning me another bunch of
money.”
“When do you expect to realize something from the sale of skins?”
asked Tubby.
“This winter,” he was told. “I think I shall put over half a dozen
black pelts by that time, some of which ought to fetch nearly top
prices, because the animals are beauts. Then I’ve got a lot of skunks
to get rid of, for they’ve increased rapidly. Needn’t turn pale, Tubby,
because I won’t be raiding their den while you’re within hundreds of
miles of here, so you’re safe. The mink and otter have yet to prove
their value as producers of their species. If all turns out well there, in
another year or so I’ll be on the high-road to success, and a big one
in the bargain.”
All this was very interesting to the other boys. And from time to
time that evening as they sat around they asked additional questions
connected with the unique enterprise that Ralph was engineering,
surely one of the most remarkable that any wideawake American lad
had ever engaged in.
Ralph and Rob had been up again to see that the trap for the
wildcat was properly set. They also had a short chat with Pete, who
did not seem to be at all discouraged because of the failure to
secure a victim on the first trial.
“I’m banking on gettin’ the critter tonight, though,” he announced,
and they knew that he must have some good reason for his belief.
Sure enough, in the morning, when they once more paid a visit to
the fur farm, with Tubby, Sim and Andy tagging along, Pete took
them out to where the trap had been set. He did not say anything,
but Rob could see from the look on his face that he had a surprise in
store for them.
The big cat had been caught, and Pete, coming along at peep of
day, had killed it with a single shot, not wishing the wretched thing to
suffer any more than was necessary. If anything, it was larger than
its mate.
Ralph was feeling quite contented as they came back again to the
house.
“Now there’s only one more thing on my mind,” he remarked to
Rob, and the latter did not have to ask him what that was, for he
knew.
He imagined that the invitation to visit Wyoming would be
forthcoming around the lunch hour, for undoubtedly Ralph was
growing tired of waiting for Peleg to show up, and meant to put the
whole thing to a deciding test in the office of that curio dealer.
If such were Ralph’s plans, they were fated never to be carried
out. Rob was swinging idly on the porch seat, all by himself, the
other three being back in the milk room watching the process of
cheese-making under the supervision of Mr. Jeffords, when he saw
Ralph come hastily toward him. Rob had reason to believe that the
other must have been in his den at the barn, since he came from that
direction.
When he saw the strange look on the other’s face, Rob stopped
swinging and awaited his arrival. No sooner had he come up than he
tossed something in Rob’s lap.
“I want somebody to kick me,” said Ralph bitterly, “for I sure
deserve it. Those packets are the missing stamps, and where do you
think I found them but behind my trunk, where they must have been
blown by a passing gust of wind!”
Chapter XXV
Lucky Peleg
Although thrilled by the announcement, the scout leader’s first
sensation was rather one of great joy. He seemed to see the pale
earnest face of poor Peleg Pinder rise up again before him; and how
glad he felt that through it all, even when the clouds seemed darkest
for Peleg, he had continued to firmly believe in the other’s
innocence.
Ralph was showing signs of remorse. He realized now that what
Rob had said to him about not depending on circumstantial
evidence, when charging a companion with an evil deed, was true,
since at best it must be an unreliable staff upon which to lean.
Still, there was one delightful thing about it, besides the discovery
of Peleg’s innocence; and this was the frank way in which Ralph took
himself to task. Such action spoke well for his bigness of heart. Rob
felt sure that the young fur farmer would never again allow himself to
believe wrong of a comrade without more tangible evidence than
mere suspicion.
“So these are the stamps that kicked up such a tempest in a
teapot, are they?” remarked Rob, shuffling the various packets
between his hands. “The old curio dealer didn’t see them, after all.
That’s going to save you a visit to town, I reckon, Ralph. The
chances were you had figured on putting your threat into execution.”
“Yes,” replied the other, contritely, “I might as well own that I had
made my mind up to run in this very day and learn the truth. I
couldn’t stand it any longer, you see, thinking all those mean things
about Peleg. Right now I’m wondering how I’ll ever look him straight
in the eye again.”
“Oh! don’t let that worry you, Ralph. There’s no need of his ever
knowing that he was under suspicion. Where ignorance is bliss, you
know, they say it’s folly to be wise. Let things go as they were
before.”
Ralph shook his head dubiously.
“I’m inclined to believe there’s going to be a change of some sort
in our relations,” he hastened to say, “because of this queer absence
on the part of Peleg. He isn’t the fellow to shirk work, and you know
we saw him the other day over at the farmhouse where his sister
works out. Then there was that talk about him receiving a mysterious
letter; besides, we all noticed that he looked excited when we saw
him in town; yes, and he even went into the Harris Arcade, where
several lawyers have their offices, though I never knew they stayed
there after nightfall. But perhaps Peleg had an appointment with one
of them.”
By this time he had Rob deeply interested.
“It begins to look as if there might be another mystery connected
with Peleg’s fortunes,” he observed, laughingly. “This time we can
wait for the developments without being worried. I suppose in good
time you’ll see the boy again, or at least have word from him?”
“That goes without saying,” Ralph agreed. “I’ve always found him
honest and straightforward. Something he didn’t calculate on is
holding him back; but he will show up in good time, believe me.”
It was strange how much brighter the day seemed to Rob after
discovering that Peleg was indeed innocent of peculation, and had
done nothing that was wrong. Why, the very birds appeared to sing
with sweeter notes than before, while the sunshine filled the boy with
a joy he had not fully known since Ralph first communicated his
doleful suspicions. That is always the way with a scout who has
learned the greatest lesson on the books of the organization—to
care for his fellows even as he does for himself, because that is the
greatest of all commandments. Somehow nobody seemed very
ambitious to be doing strenuous things on that particular day. It was
pretty hot, for the mountains, and the shade under the long porch
appeared to strike them as just right. So they lolled there in easy-
chairs, hammocks, and the broad swing as the minutes went past,
chatting, telling stories of past experiences, and in this way
exchanging views after the manner of boys in general.
Ralph wanted to know many things connected with the adventures
which had fallen to the scout leader and some of his chums, not only
around their home town down on Long Island, but under other skies
—away across the water where the great nations of Europe were
fighting the most terrible war of all history; upon the desert sands of
northern Mexico; and even amidst the glories of the wonderful
Panama-Pacific Exposition out in California.
This giving out of information was not wholly one-sided, either.
Ralph had been around considerable, and was able to talk of strange
things he had run across down in the Land of Dixie, where he had
lived the better part of his young life, exploring the swamps where
the weird Spanish moss festooned the trees, and gave such a
funereal aspect to the picture; and Ralph could relate numerous
amusing stories of the former slaves whom he had known.
So the morning passed away. The big bullfrogs over in the pond
piped in chorus, undisturbed by any pot-hunter with deadly Flobert;
doubtless, those bass still left in the pretty lake back of the hills
rejoiced to know they would not be tempted to take an attractive lure
that was apt to have a sharp barb concealed within its midst. For the
five boys spent the entire morning in sweet idleness, content to let
the hours drift past without exerting themselves.
Tubby, Andy and Sim had heard enough to know that there was
something queer connected with Peleg’s actions. Ralph concluded to
take them into his confidence with regard to the serious mistake he
had come so near making. Consequently the packets of stamps
were exhibited, and the sad story told of how a frivolous gust of wind
had almost caused Ralph to accuse the farm boy of being a thief.
They promised never to breathe a word of the story. Secretly they
thought all the more of Ralph for his genuine self-condemnation. No
doubt, it would be a good lesson to all of them; which was really one
reason why Ralph, at Rob’s suggestion, had mentioned the facts; for
they could see how easy it must always be to think evil of one’s best
friend when circumstances arise that seem convincing, although an
explanation, if sought, may brush them away as though they were
mere cobwebs.
During that morning there must have been dozens of times when
one or another of the boys walked to the end of the porch as if to
stretch their legs, when in reality it was to look along the road in the
direction that a traveler must take if coming from that farmhouse

You might also like