Skip to content

Latest commit

 

History

History
110 lines (59 loc) · 3.44 KB

README.md

File metadata and controls

110 lines (59 loc) · 3.44 KB

GoTestAPI

1. API

The repository contains a basic CRUD API written in GoLang. This project was aimed to perform blackbox testing on this API.

The following CRUD operations are been added:

  1. Create - createRoll.go
  2. Read - getRoll.go and getRolls.go
  3. Update - updateRoll.go
  4. Delete - deleteRoll.go

createRoll

Creates a new item in the database.

getRoll

Fetch information for a particular item present in the database.

getRolls

Fetch information for all the itmes present in the database.

updateRoll

Update the information for a particular item present in the database.

deleteRoll

Delete the information and item itself from the database.

2. Client API’s

I have used the API to perform CRUD operations on "CLIENT" dataset and hence renamed them as follows:

2.1 Get Clients API

image

2.2 Get Client API

image

2.3 Create Client API

image

2.4 Update Client API

image

2.5 Delete Client API

image

3. Class Diagram for API’s

image

4. DATABASE

NOTE: For this project I have used the local database itself because the goal is to perform the BlackBox Testing on this API. So the main focus is on testing here.

The variable "clients" is a slice and is initialized to store the database in main.go file.

5. TESTING

For testing I have built a Static Design Documentation for Test Cases "Static_Design.pdf".

Following the Static design documenation various test cases are build. Some of them are stored in "Test Cases for API Testing - Sheet1.pdf". In the sheet the red color denotes the failed test case and the green one is the updated version of the failed test case.

5.1 Testing tool

The testing tool used for API testing is POSTMAN. It is used for both manual and automated API testing.

5.2 Manual testing

To perform MANUAL testing refer to "Test Cases for API Testing - Sheet1.pdf" for pre-build test cases and "Static_Design.pdf" to build new test cases.

5.3 Automated Testing

To perform AUTOMATED testing use the following scripts in postman.

5.3.1 GetClients

image

The test script for GetClients is "getClientsTestScript.js".

5.3.2 GetClient

image

The test script for GetClient is "getClientTestScript.js".

5.3.3 CreateClient

image

The test script for CreateClient is "createClientTestScript.js".

5.3.4 UpdateClient

image

The test script for UpdateClient is "updateClientTestScript.js".

5.3.5 DeleteClient

image

The test script for DeleteClient is "deleteClientTestScript.js".