Skip to content

Rest Services Integration Tests

Yoah Qiu edited this page Mar 17, 2022 · 21 revisions

Rest Services Integration Tests

Automated integration tests implemented using bash

Tasks implemented:

  1. Clear the data base to avoid errors while generating tables (i.e. duplicated unique IDs).
  2. Create all initial dependencies (i.e. GroceryStoreApplication).
  3. Test all RESTful components all together to simulate a fully functional application.
  4. Detailed list of individual smoke tests of every REST controller method available below.

passedTests

Address

createAddress: for creating an address

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/address/
Parameters: id, StreetName, Province, City, Country, postalCode, store, order, customer

deleteAddress: for deleting an address

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/address/{id}
Parameters: none

getAddress: for getting an address

image

getAddress: after deleting the address

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/address/{id}
Parameters: id

Grocery Application

createApplication: for creating a grocery application

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/groceryApplication/
Parameters: id, order, product, store, category, userRole

deleteApplication: for deleting the grocery application

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/groceryApplication/{id}
Parameters: none

getApplication: after deleting the application

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/groceryApplication/{id}
Parameters: id, order, product, store, category, userRole

getApplication: for getting the application

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/groceryApplication/{id}
Parameters: id, order, product, store, category, userRole

Category

createCategory: for creating a category

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/category/{id}
Parameters: name, description, image, id

getCategory: for getting a category

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/category/{id}
Parameters: name, description, image, id

getCategory: after deleting the category

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/category/{id}
Parameters: name, description, image, id

deleteCategory: for deleting a category

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/category/{id}
Parameters: none

Grocery User

createUser: for creating a user

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/groceryUser/
Parameters: dateOfBirth, username, password, firstName, lastName, email

deleteUser: for deleting a user

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/groceryUser/{email}
Parameters: email

getUser: after deleting the user

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/groceryUser/{email}
Parameters:

getUser: for getting a user

Endpoint: https://groceryapplication-backend-l.herokuapp.com/groceryUser/{email}
Parameters:

Product

createProduct: for creating a product

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/product/
Parameters: image, description, price, image, weight, volume, barcode, availableQuantity, availability, refundable

deleteProduct: for deleting a product

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/product/{id}
Parameters:

getProduct: for getting a product

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/product/{id}
Parameters:

getProduct: after deleting a product

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/product/{id}
Parameters:

updateProduct: for updating a product

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/product/{id}
Parameters: image, description, price, image, weight, volume, barcode, availableQuantity, availability, refundable

Employee

createEmployee: for creating an employee

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/employee/
Parameters: hiredDate, employeeStatus, hourlyPay, email, groceryStoreApplication

deleteEmployee: for deleting an employee

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/employee/{id}
Parameters:

getEmployee: for getting an employee

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/employee/{id}
Parameters:

getEmployee: after deleting an employee

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/employee/{id}
Parameters:

updateEmployee: for updating an employee

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/employee/{id}
Parameters: hiredDate, employeeStatus, hourlyPay, email, groceryStoreApplication

Store

createStore: for creating a store

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/store/
Parameters: name, weekDayOpening, weekDayClosing, weekEndOpening, weekEndClosing, weekEndOpening, address, applicationId

deleteStore: for deleting a store

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/store/{name}
Parameters:

getStore: for getting a store

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/store/{name}
Parameters:

getStore: after deleting a store

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/store/{name}
Parameters:

updateStore: for updating a store

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/store/{name}
Parameters: name, weekDayOpening, weekDayClosing, weekEndOpening, weekEndClosing, weekEndOpening, address, applicationId

Shift

createShift: for creating a shift

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/shift/ Parameters: day, shiftType, employee

deleteShift: for deleting a shift

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/shift/{id}
Parameters: id

getShift: for getting a shift

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/shift/{id}
Parameters: id

getShift: after deleting a shift

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/shift/{id}
Parameters: id

updateShift: for updating a shift

image
Endpoint: https://groceryapplication-backend-l.herokuapp.com/shift/{id}
Parameters: day, shift, employee

Order

createOrder: for creating an order

createOrder Endpoint: https://groceryapplication-backend-l.herokuapp.com/order/ Parameters: applicationId, status, datePlaced, deliveryDate, customerNote, purchaseType

deleteOrder: for deleting an order

deleteOrder Endpoint: https://groceryapplication-backend-l.herokuapp.com/order/{id} Parameters: id

getOrder: for after deleting an order

getAfterDeleteOrder Endpoint: https://groceryapplication-backend-l.herokuapp.com/order/{id} Parameters: id

updateOrder: for updating an order

updateOrder Endpoint: https://groceryapplication-backend-l.herokuapp.com/order/{id} Parameters: status, id

Clone this wiki locally