Learn API Testing by Jagdeep Jain

Learn API Testing by Jagdeep Jain

Author:Jagdeep Jain
Language: eng
Format: epub
ISBN: 9781484281420
Publisher: Apress


No Interventions Between Test Steps

It is a common practice to connect with the database and make assertions. You should avoid doing multiple things in the test script.

A test script is a set of user steps. The user inputs something and expects something out of it. The user does not connect with the database or any other third-party system. It is the job of the API to do all these things, or some background process that runs based on the API call and provides results to the API.

It is good to avoid the highlighted code:public class ContactListTest {

public void contactListTest () {

login();

// some steps here

assertThat(actualResult).equals(expectedResult);

connect.db().getValues();

assertThat(value1).equals.equals(value2);

connect.shell().retrieveValues();

logout();

}

}



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Popular ebooks
The Kubernetes Operator Framework Book by Michael Dame(7567)
Web Development with Julia and Genie by Ivo Balbaert & Adrian Salceanu(6026)
State Management with React Query by Daniel Afonso(3375)
Eleventy by Example by Robinson Bryan;(3299)
Architecting Vue.js 3 Enterprise-Ready Web Applications by Solomon Eseme(3004)
Building Python Web APIs with FastAPI by Abdulazeez Abdulazeez Adeshina(2902)
Digital Marketing with Drupal by José Fernandes(2821)
Becoming an Enterprise Django Developer by Michael Dinder(1238)
Building Python Web APIs with FastAPI: A fast-paced guide to building high-performance, robust web APIs with very little boilerplate code by Abdulazeez Abdulazeez Adeshina(1173)
Operator Training Simulator Handbook by Joseph Philip(1142)
Practical WebAssembly: Explore the fundamentals of WebAssembly programming using Rust by Sendil Kumar Nellaiyapen(1069)
Google Workspace User Guide: A Practical Guide to Using Google Workspace Apps Efficiently While Integrating Them With Your Data by Balaji Iyer(1057)
Hands-on Cloud Analytics with Microsoft Azure Stack: Transform Your Data to Derive Powerful Insights Using Microsoft Azure by Prashila Naik(1037)
State Management with React Query by Afonso Daniel;(1016)
Building SPAs with Django and HTML Over the Wire: Learn to build real-time single page applications with Python by Andros Fenollosa(990)
Modern Frontend Development with Node.js by Florian Rappl(921)
High Performance with Laravel Octane by R. Butti(910)
Kubernetes Design Patterns and Extensions by Onur Yilmaz(899)
Building Data Science Applications with FastAPI by François Voron(893)
JavaScript from Frontend to Backend by Unknown(809)