Learn API Testing: Norms, Practices, and Guidelines for Building Effective Test Automation Jain pdf download
Learn API Testing: Norms, Practices, and Guidelines for Building Effective Test Automation Jain pdf download
https://ebookmeta.com/product/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-1st-
edition-jagdeep-jain/
https://ebookmeta.com/product/cambridge-igcse-and-o-level-
history-workbook-2c-depth-study-the-united-states-1919-41-2nd-
edition-benjamin-harrison/
https://ebookmeta.com/product/python-for-devops-learn-ruthlessly-
effective-automation-1st-edition-noah-gift-kennedy-behrman-
alfredo-deza-grig-gheorghiu/
https://ebookmeta.com/product/practical-esd-protection-
design-1st-edition-wang-albert/
The Shifter s Redemption 1st Edition Ivy Ember
https://ebookmeta.com/product/the-shifter-s-redemption-1st-
edition-ivy-ember/
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/
https://ebookmeta.com/product/the-adorned-body-mapping-ancient-
maya-first-edition-nicholas-carter/
https://ebookmeta.com/product/secret-weapon-criminal-desires-1st-
edition-matilda-martel/
https://ebookmeta.com/product/locating-world-cinema-mk-
raghavendra/
Meta in Film and Television Series 1st Edition David
Roche
https://ebookmeta.com/product/meta-in-film-and-television-
series-1st-edition-david-roche/
Learn API Testing
Jagdeep Jain
Jagdeep Jain
https://doi.org/10.1007/978-1-4842-8142-0
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.
—Jagdeep Jain
Table of Contents
Need
�������������������������������
�������������������������������
�������������������������������
�������������������������5
Advantages
�������������������������������
�������������������������������
�������������������������������
��������������8
Summary���������������������������
�������������������������������
�������������������������������
����������������������9
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
Summary���������������������������
�������������������������������
�������������������������������
��������������������39
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
Grey Box
Testing����������������������������
�������������������������������
�������������������������������
��������77
Test Pyramid
�������������������������������
�������������������������������
�������������������������������
����������78
Summary���������������������������
�������������������������������
�������������������������������
��������������������79
Schema
Validation���������������������������
�������������������������������
�������������������������������
������82
Test
Coverage���������������������������
�������������������������������
�������������������������������
�������������85
Discovering Diverse Content Through
Random Scribd Documents
going like a dream under the hand of a master and lover of horses.
“Oh! look at the moon,” sighed Violet, turning for a moment in her
seat and looking backwards. “I wish this could last forever.”
“I say,” cried out Dicky, heedless of this wish, which the gods no
doubt had overheard, “the cart’s going a bit rocky. Anything wrong
with it, do you think, Patsy?”
“I hope not, sir,” said Patsy. “I heard Dan, the coachman say
something to Larry about wan of the ‘hubs.’”
“What did he say?” asked Mr Fanshawe.
“He was going across the yard wid a bucket of water, and Larry
was clanin’ the cart, and Dan, he says, ‘Larry,’ says he, ‘what are you
doin’?’ ‘Clanin’ the cart,’ says Larry. ‘And what are you clanin’ it for?’
he asks. ‘To make it tidy,’ says Larry. ‘Sure, get off to some other
job,’ says Dan. ‘The ould cart has to go to the coach-builders for
there’s a crack in that “hub” you could stick your nose in; and
where’s your eyes? says he; ‘get off and be doin’ your harness, and
let the coach-builders clane the trap if it’s worth clanin’, for it’s my
opinion, he says, ‘it ought to have been condimned long ago.
Lighting fires is all it’s fit for.’”
“Good heavens!” said Mr Fanshawe. “Why didn’t you tell me this
before?”
“Sure, I trusted Larry, sir,” said Patsy. “He knows more thin Dan
about the traps and the harness any day in the——Holy Mary!
there’s the wheel goin’.”
“Hold tight,” cried Mr Fanshawe.
“We’re over,” cried Patsy.
A perfectly superfluous statement delivered from the ditch where
he lay with Miss Lestrange’s dressing-bag on his chest. You could
have heard the sound of the smash half a mile down the silent road.
A MAN OF RESOURCE
That night Mr Murphy and his steed had been carousing in the
cabin of Billy the Rafter, a gentleman of no occupation, who lived by
the main road half-way between Castle Knock and Tullagh. Mr
Murphy, Con and Billy had been playing “Spoil Five” with an old
greasy pack of cards, talking politics, and drinking whisky.
The events of the day before had placed Mr Murphy securely and
forever on the pedestal of public admiration.
The sight of Billy Croom starting valiantly in pursuit of him
followed by the sight of Billy Croom after the encounter, stripped of
everything but his breeches and boots and going home in a sack,
had left an undying impression on the public mind. The reduction of
Con Cogan to a beast of burthen had completed the business. The
whole affair had an artistic completeness, more especially when
viewed by a people possessed at once of a sense of humour and an
abhorrence of law.
So there had been whisky galore for Mr Murphy, and cheers—a
compound not unpleasant, but apt to be unsettling to the mind.
It was long after two in the morning when the card-party broke
up, and Mr Murphy, rising rather unsteadily to his feet, prepared to
return to his arboreal home.
“It’s a fine night,” said Billy the Rafter, as he accompanied his
visitors to the door; “faith, you could see to rade print be the light of
the moon. Keep your eye out for the police, Paddy, for they do be
sayin’ wind of it all has got over to Shepherd’s Cross.”
“P’leece!” said Mr Murphy with fine contempt, producing the horse
pistol and inspecting the cap on it. “Who’s you talkin’ to? Now thin,
Con—Billy give me a leg up, for the whisky’s got under me.”
Con, obedient to the superior will, as a donkey turned his back;
Billy the Rafter gave the required leg up, and Mr Murphy mounted.
“’Night to you, Billy,” cried the mounted one. “Jay up. Put your
best fut foremost, for it’s home I ought to have been an hour ago.”
“Let up wid thim spurs,” grumbled Con, as he took the high-road;
“aisy wid that whip, don’t be moidherin’ me, or it’s into the ditch
we’ll be; for it’s a double load I’m carryin’ wid you on me back and
the whisky aboard.”
“Faith,” confessed Mr Murphy, “it’s two moons I’m seein’ meself,
and the road looks twishtin’ like a corkscrew. Musha, but it’s a
glurious night; it calls to me mind the ould days whin I wint courtin’.
Jay up, y’ divil, an’ keep the road.”
“Hould on,” said Con, who had better eyes in his head than his
rider. “What’s that foreninst us on the road?”
Mr Murphy, shutting one eye, made out a black mass on the road
ahead of them.
“It’s a cart broke down,” said he; “where there’s a smash-up
there’s always pickin’s. Jay up—we’ll lind them our ’sistance.”
It was the dogcart—a horrible ruin, one wheel off and shafts
broken. Patsy holding Fly-by-night (name of satire) by the bridle,
Miss Lestrange seated, like a young and beautiful Niobe, in a mole-
skin cloak, on the hedge bank, and Dicky Fanshawe trying to console
her.
“Hulloo, hulloo,” cried Mr Murphy, as he trotted up, “what’s the
truble wid ye? Why, glory be to God, it’s Mr Fanshawe!”
“It’s Murphy!” cried Dicky Fanshawe, a feeling of hope springing
up in his breast, for, whatever else the ruffian might be, he was a
man of resource, and if there was such a thing as gratitude in the
whole wide world, a friend.
Mr Murphy, from his point of vantage, gazed with a grin at the
smashed cart, the weeping girl, the distracted Mr Fanshawe, and
Patsy. Then touching Con with a spur he rode round the ruined
vehicle and inspected it. Miss Lestrange noticed with an obfusc sort
of horror that Con obeyed voice and spur just like a horse. The
whole thing felt like a terrible and fantastic nightmare.
“There’s no time to lose!” cried Dicky, when Mr Murphy had made
his inspection. “The thing is smashed beyond mending. Murphy, for
heaven’s sake, do you know of a horse and trap anywhere near? I
must get to Tullagh by four to catch the mail to Dublin. See here, we
are running away, this young lady and I——”
“There’s not a horse and cart nearer than four miles,” said
Murphy; “is there, Con?”
“Divil a wan,” replied the steed.
“Good Lord!” cried Dicky, “and we’re being chased. The General is
after us in the carriage—you remember the old gentleman with the
red face?”
“He’s afther you, is he, in a carriage?” said Mr Murphy.
“He is—he’ll be here any minute.”
“Con,” cried Mr Murphy, “set me down.”
“Now,” cried he, when he was on his feet, “help me, all of yiz, to
clear the rubbage out of the road.”
They bent to their task, and in a minute the ruined dogcart was
tumbled into the ditch and the road was clear.
“Listen!” said Miss Lestrange, who had risen to her feet.
The sound of hoofs and wheels came on the night air, and far on
the road appeared a carriage rapidly approaching.
“Now, Mr Fanshawe,” said Murphy, whipping out his old pistol,
“this is him, and I’m goin’ to give yiz a carridge to ride in, but you’ve
got to pay for it, begob. One good turn desarves another. Out wid
your money or your life!”
“Why, you infernal scoundrel!” cried Dicky.
“Out wid it!” cried Murphy—“watch and chain and all; times is bad,
and I’ve no use for parlymentaries—I’m goin’ to give yiz a carridge
to the station; would you have me play highwayman with the ould
gentleman and let you go free?”
“I see,” cried Dicky, who caught the other’s meaning. “Here you
are, if the business has to be done this way, I’d sooner stand in.”
“Sure, I knew you would,” said Mr Murphy, now thoroughly sober;
“you’re a gintleman to the last button of your wistcoat. Give me the
suverins, take back the notes; they’re no use to me, bad cess to
them! Now the watch and chain. Thank you kindly. Has the young
lady any movables?”
“Only this bracelet,” said Violet.
“Kape it,” said Mr Murphy; “bracelits is no use to me. Now it’s my
turn. Con!”
Con presented his back and Mr Murphy mounted. The carriage
was only a few hundred yards off, and the pair of ruffians, one on
the back of the other, stood square before it on the roadway.
“Hulloo! hulloo!” cried Larry, reining in. “What are yiz? Why, it’s
Paddy Murphy!”
With the stopping of the carriage the door flew open and General
Grampound came out of the vehicle like a bombshell. He exploded
on the road into unprintable language. Then he found himself
fronting Murphy’s red, grinning face, and a pistol held within a foot
of his head.
“Wan word out of you and I’ll blow your skylights off!” cried
Murphy.
General Grampound’s long army experience had taught him to
know an utterly desperate ruffian when he met one.
“Into the carridge wid you, Mr Fanshawe,” cried Murphy. “I’m wid
yiz, miss,—I won’t harm the ould gintleman if he keeps a dacent
tongue in his head, but I’m goin’ to give him a lesson in dancin’—
away wid yiz! Good luck, and send me a piece of the weddin’ ceek.”
“Patsy, get on the box and come with us,” cried Mr Fanshawe as
he bundled Miss Lestrange into the carriage and into the arms of
Doris and Little Lord Gawdor, “the children are all right. Larry will
drive them back. I’m very sorry,” he cried over his shoulder to his
uncle; “it’s your own fault, if you have to walk home. This scoundrel
has taken my watch and chain and all my money—nearly. I’ll write.”
“Larry,” cried Mr Murphy as the carriage drove off.
“What is it?”
“If you miss the thrain I’ll boot your ribs in to-morrow mornin’.”
“Have we time?” gasped Violet Lestrange with Doris’s arms about
her neck.
“Where are we, Mr Fanshawe?” asked little Lord Gawdor.
“I don’t know,” replied Mr Fanshawe, putting his head out of the
window.
He looked back. On the moonlight road Mr Murphy was squatting
on his hams with the old horse pistol levelled straight at General
Grampound.
General Grampound was dancing on the moonlit roadway before
Mr Murphy, with all the grace and agility of a performing elephant.
You may think it strange that any consideration would cause a
retired General officer of the British Army to disgrace the moon by
performing such antics before her. Well, that just shows you have
never met Mr Murphy, seen his smile, or come under the profound
power of his suasion.
“We are near Tullagh,” said Mr Fanshawe. “I recognise that row of
trees. Look! there’s the railway line and the station. The train either
hasn’t arrived, or it’s gone. I can’t tell the time, I haven’t my watch.”
“Put your head out,” said Violet.
He did so.
“Patsy!” he cried.
“Yes, sir.”
“You can’t see the train?”
“No, sir; but it hasn’t come, we’ve tin minits to the good.”
“How do you know?” shouted Mr Fanshawe
“I’ve got your watch an’ chain, sir,” came Patsy’s voice. “I whipped
it out of Paddy’s pocket whin he was playin’ tricks wid the ould
Gineral and the handkerchief wid your money wrapped up in it. Mr
Fanshawe, sir!”
“Yes?”
“I’ve counted the gowld, it’s all there—six suverins; and there’s
fourteen shillings of Paddy’s as well.”
“We must take Patsy with us,” said Mr Fanshawe, when he had
communicated the news to his companions.
“I always said Patsy was a brick,” said little Lord Gawdor. “Didn’t I,
Doris?”
“Yes,” said Doris. “Here’s the station, and there’s the station man
with a lantern in his hand.”
“The dear children went back in the carriage,” wrote Mrs
Fanshawe, six weeks later to a girl friend. “I could never have
imagined an experience so awful and—so lovely; and the strange
thing is, every one is so pleased, even old General Grampound has
consented to write. It was an abusive letter, but even that’s a lot for
him. I’m sure he has a good heart—somewhere.
“I got such a lovely emerald pendant from Lady Seagrave; and,
fancy, she was going to have given me a grebe muff and a prayer-
book for Christmas. Little Bob told me, and I think that was partly
why I ran away.
“Poor dear Mr Murphy is going to America. Dicky is getting him out
of the country through a friend. He says he’s taken an office for him
in Wall Street, wherever that is. Dicky is so good—you can’t think.
“We have Patsy with us; he has just been giving a French boy
what he calls ‘buther’ in the courtyard of the hotel. Dicky says he got
the remains of the French boy away from him just in time.
“He is always fighting, but Dicky says that as long as there is a bit
of him left he never intends to part with Patsy.”
THE END
Printed in Great Britain by Wyman & Sons. Ltd., London and Reading.
The, Clean,
Wholesome Smell of
WRIGHTS
Coal Tar Soap
is, in itself,
a recommendation,
and the
freshness
felt after using is
really
exhilarating.
If you have read ONE of the fine Novels by Ethel M. Dell, you will
want the others.
Full particulars will be found in the pages following.
Illustration: Decoration
1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must,
at no additional cost, fee or expense to the user, provide a copy,
a means of exporting a copy, or a means of obtaining a copy
upon request, of the work in its original “Plain Vanilla ASCII” or
other form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.
• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”
• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.
1.F.
Most people start at our website which has the main PG search
facility: www.gutenberg.org.