test api endpoint code example
Example 1: dummy api json
var xhr = new XMLHttpRequest();
xhr.open("GET", "https://reqres.in/api/products/3", true);
xhr.onload = function(){
console.log(xhr.responseText);
};
xhr.send();
Example 2: have you done api testing
I have worked on API testing in my project and I used
POSTMAN for manually testing and REST ASSURED
java LIBRARY for automation.
I used JDBC and it is a Java-based data access technology
used for Java database connectivity. It provides classes and
interfaces to connect or communicate Java application with
database.
JDBC API is a Java API that can access any kind of data
stored in a Relational Database. It enables Java programs to
execute SQL statements.
Example 3: dummy api
React Fakers is a collection of dummy data from the most popular dummy data
providers such as Json Place Holder, Faker, Pokemon, etc,
for application development testing.
npm i react-fakers | yarn add react-fakers