API Flashcards

1
Q

What is API?

A

Application Programming Interface - a messenger that takes requests from one application(client side) (DB) and translate it to another application(server side)(Database)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is Web Services?

A
  • API going through internet
  • Can be ran via internet or locally
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What WebServices do you use in your project?

A
  • I use Restful which is the Representational State of Transfer and it communicates with XML
    and JSON but my current project uses JSON
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is JSON?

A
  • It is JavaScript Object Notation
  • Basically a lightweight version of XML
  • In Key: Value format • Key is always in double quotes and value if string its double quotes and if numbers no quotes
  • It is purely based on HTTP protocol - so it hits the link on the browser and sees the results
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How and where are you sending request?

A

Since I am using Rest, it has endpoints. My developers create public URLs and requests are sent to that URL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Do you use any non-web services API?

A
  • I use Selenium API for the browser, JDBC for the database, and RestAssured for API
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do you test API in your project?

A

In my current project, we are testing not only our company’s API but other external APIs.
For example, we use LinkedIn API to easily transfer the authorized end user’s info to our
database. As a tester, we send an API request and verify the status code, response body
and check the endpoints of the API URL are working as expected
For example in my project, I also do Positive/Negative testing of API
- Positive - I am sending valid requests, headers, parameters, and JSON body and verify that response is 200/201
- Negative - I am sending invalid requests, headers, parameters, and body,
expecting the status to not be 200

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Do you have API documentation website for your API?

A

Yes, we use swagger for our API documentation and this is where the description and guidelines of API endpoints are

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Can All API endpoints use all of the HTTP protocols?

A

It depends, My API developer decides if that URL works with GET, POST, PUT, or DELETE
requests

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do you manually test your API?

A

I use Postman - it is a REST API client tool that tests the REST API URL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the types of Request in Rest API?

A

There are Get, Post, Put, and Delete requests
- Get reads data
- Post creates data
- Put updates data
- Delete deletes data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are headers in REST API?

A

I am using Accept. (Content Type.JSON) type - checks what I am receiving should be in
JSON or XML format
and ContentType.(Contenttype.Json) - checks what I am sending should be in JSON format

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is RestAssured Library?

A

A non-web service API that’s BDD format and helps integrate java code using deserialization and serialization to extract data from the JSON and transform it into a java object in order to store, verify and validate the data to the expected one.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is JDBC?

A

JDBC (Java Database Connectivity) is the Java API that manages connecting to a database, issuing queries and commands, and handling result sets obtained from the database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is JsonPath?

A

Another way to validate the response body
-JsonPath j=response.jsonpath;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly