Skip to content

Software QA Plan & Report

Tzy28 edited this page Nov 1, 2020 · 17 revisions

Quality Assurance methods: The main concept of having a software quality assurance plan is to be able to define appropriate coverage criteria of the testing functionalities from the business methods, RESTful service and integration test. Moreover, the software quality assurance plan documents the static testing of our code, namely code review.

These are the 2 main testing approaches for software assurance testing.

  • Static V&V — analyses of the code
  • Dynamic V&V — exacting the code

Dynamic V&V

For deliverable 2, we tested our business methods in Service classes through JUnit testing; then we tested our RESTful service located in controller classes through AdvanceRestClient. Meanwhile, integration is tested on Travis CI throughout the development process of deliverable 2.

Unit Testing of Backend

This is the first main step in our QA plan. To test the functionality of the service classes, we tested each service class individually through the Mockito Framework, independently of the real database. We set our goal for test coverage to 90% due to time constraints. The tables below show the average of desired and achieved test coverage for all service classes:

Testing coverage

Testing Average Desired coverage Achieved coverage
Business methods in service classes 90%

In order to show more details, the following tables illustrate all the unit tests we performed for service classes:

Address Testing – Amelia Cui – Testing Coverage: 100%

Address Get Create UpdateStreetName Delete
ValidID return Normal Address create address update required address delete address
NotExistingAddress throw exception throw exception throw exception throw exception
EmptyID throw exception throw exception throw exception throw exception
NullID throw exception throw exception throw exception throw exception
NotCompletedInput - throw exception throw exception -
SameInformationToBeUpdate - - throw exception -

Payment Testing – Amelia Cui – Testing Coverage: 100%

Payment Get Create UpdatePaymentMethod Delete
ValidID return Normal Payment create payment update payment method delete payment
NotExistingPayment throw exception throw exception throw exception throw exception
EmptyID throw exception throw exception throw exception throw exception
NullID throw exception throw exception throw exception throw exception
NotCompletedInput - throw exception throw exception -
SameMethodToBeUpdate - - throw exception -
AlreadyHasSuccessfulPurchase - - - throw exception

ArtGallerySystemUser Testing – Angelina Duan – Testing Coverage: 100%

ArtGallerySystemUser Get Create Update User's name Delete
ValidName return Normal User create user update required user's name delete user
NotExistingUser throw exception throw exception throw exception throw exception
EmptyName throw exception throw exception throw exception throw exception
NullName throw exception throw exception throw exception throw exception
NotCompletedInput - throw exception throw exception -
SameInformationToBeUpdate - - throw exception -

UserRole Testing – Angelina Duan – Testing Coverage: 100%

UserRole Get Create Delete
ValidID return Normal UserRole create user role delete user role
NotExistingUserRole throw exception throw exception throw exception
EmptyID throw exception throw exception throw exception
NullID throw exception throw exception throw exception
NotCompletedInput - throw exception -

ArtGallerySystem Testing – Zhekai Jiang – Testing Coverage: 100%

ArtGallerySystem Get Create Delete Set Income Increase Income Add User Add Art Piece Add Purchase Add Address
Valid return system create system delete system update income update income add user to system add art piece to system add purchase to system add address to system
Null ID throw exception throw exception throw exception throw exception throw exception throw exception throw exception throw exception throw exception
Empty ID throw exception throw exception throw exception - - - - - -
Non-existent ID throw exception - throw exception - - - - - -
Null User - - - - - throw exception - - -
Null Art Piece - - - - - - throw exception - -
Null Purchase - - - - - - - throw exception -
Null Address - - - - - - - - throw exception

Purchase Testing – Zhekai Jiang – Testing Coverage: 100%

Purchase Create Get Get All Delete Get by Customer Update Status Set Parcel Delivery Set In-Store Pick-Up Add Payment
Valid create purchase return purchase return all purchases delete purchase return purchases made by customer update status set parcel delivery set in-store pick-up add payment
Empty ID throw exception throw exception - throw exception - - - - -
Null ID throw exception throw exception - throw exception - throw exception throw exception throw exception throw exception
Non-existent ID - throw exception - throw exception - - - - -
Null Date throw exception - - - - - - - -
Null Status throw exception - - - - throw exception - - -
Null Customer throw exception - - - - - - - -
Null Art Piece throw exception - - - - - - - -
Null Customer - - - - throw exception - - - -
Null Delivery - - - - - - throw exception throw exception -
Null Payment - - - - - - - - throw exception

Artist Testing – Zheyan Tu – Testing Coverage: 100%

Artist Get Create Delete Update
ValidID return artist create artist delete artist update artist
NotExistingArtist throw exception throw exception throw exception throw exception
EmptyID throw exception throw exception throw exception throw exception
NullID throw exception throw exception throw exception throw exception
NotCompletedInput - throw exception - throw exception
UpdatSame - - - throw exception

Customer Testing – Zheyan Tu – Testing Coverage: 100%

Customer Get Create Delete Update
ValidID return customer create customer delete customer update customer
NotExistingCustomer throw exception throw exception throw exception throw exception
EmptyID throw exception throw exception throw exception throw exception
NullID throw exception throw exception throw exception throw exception
NotCompletedInput - throw exception - throw exception
UpdateSame - - - throw exception

ArtPiece Testing – Zheyan Tu – Testing Coverage: 92%

Artist Get Create Delete Update
ValidID return artpiece create artpiece delete artpiece update artpiece
NotExistingArtPiece throw exception throw exception throw exception throw exception
EmptyID throw exception throw exception throw exception throw exception
NullID throw exception throw exception throw exception throw exception
NotCompletedInput - throw exception - throw exception
UpdateSame - - - throw exception

ParcelDelivery Testing – Tianyu Zhao – Testing Coverage: 100%

ParcelDelivery Get Create Delete Update
ValidID return parcelDelivery create parcelDelivery delete parcelDelivery update parcelDelivery
NotExistingparcelDelivery throw exception throw exception throw exception throw exception
EmptyID throw exception throw exception throw exception throw exception
NullID throw exception throw exception throw exception throw exception
NotCompletedInput - throw exception - throw exception
UpdateSameStatus - - - throw exception
NullStatus - throw exception - throw exception

InStorePickUp Testing – Tianyu Zhao – Testing Coverage: 100%

InStorePickUp Get Create Delete Update
ValidID return parcelDelivery create parcelDelivery delete parcelDelivery update parcelDelivery
NotExistingInStorePickUp throw exception throw exception throw exception throw exception
EmptyID throw exception throw exception throw exception throw exception
NullID throw exception throw exception throw exception throw exception
NotCompletedInput - throw exception - throw exception
UpdateSameStatus - - - throw exception
NullStatus - throw exception - throw exception

RESTful service testing

For this part, we used AdvancedRestClient, a tool to test the functionalities of our controller classes.

System

Request Type URL Method Description Input OutPut
Get url get system PathVariable & RequestParam 200
Post url create system PathVariable & RequestParam 200
Put url set income PathVariable & RequestParam 200
Put url increase income PathVariable & RequestParam 200
Put url add user PathVariable & RequestParam 200
Put url add artpiece PathVariable & RequestParam 200
Put url add purchase PathVariable & RequestParam 200
Put url add addresses PathVariable & RequestParam 200
Delete url delete system PathVariable 200

SystemUser

Request Type URL Method Description Input OutPut
Get url get users - 200
Get url get user PathVariable & RequestParam 200
Post url create user PathVariable & RequestParam 200
Put url update email PathVariable & RequestParam 200
Put url update password PathVariable & RequestParam 200
Put url update avatar PathVariable & RequestParam 200
Delete url delete user PathVariable 200

UserRole

Request Type URL Method Description Input OutPut
Get url get user roles - 200
Get url get user role PathVariable & RequestParam 200
Post url create user role PathVariable & RequestParam 200
Delete url delete user role PathVariable 200

Address

Request Type URL Method Description Input OutPut
Get url get addresses - 200
Get url get address PathVariable & RequestParam 200
Post url create address PathVariable & RequestParam 200
Put url update email PathVariable & RequestParam 200
Delete url delete address PathVariable 200

Artist

Request Type URL Method Description Input OutPut
Get url get artists - 200
Get url get artist PathVariable & RequestParam 200
Post url create artist PathVariable & RequestParam 200
Put url update credit PathVariable & RequestParam 200
Delete url delete artist PathVariable 200

Customer

Request Type URL Method Description Input OutPut
Get url get customers - 200
Get url get customer PathVariable & RequestParam 200
Post url create customer PathVariable & RequestParam 200
Put url update balance PathVariable & RequestParam 200
Put url add address PathVariable & RequestParam 200
Delete url delete customer PathVariable 200

ArtPiece

Request Type URL Method Description Input OutPut
Get url get art pieces - 200
Get url get art piece PathVariable & RequestParam 200
Post url create art piece PathVariable & RequestParam 200
Put url update name PathVariable & RequestParam 200
Put url update description PathVariable & RequestParam 200
Put url update price PathVariable & RequestParam 200
Put url update status PathVariable & RequestParam 200
Put url update author PathVariable & RequestParam 200
Delete url delete art piece PathVariable 200

InstorePickUp

Request Type URL Method Description Input OutPut
Get url get instore pickups - 200
Get url get instore pickup PathVariable & RequestParam 200
Post url create instore pickup PathVariable & RequestParam 200
Put url update status PathVariable & RequestParam 200
Delete url delete instore pickup PathVariable 200

ParcelDelivery

Request Type URL Method Description Input OutPut
Get url get parcel deliveries - 200
Get url get parcel delivery PathVariable & RequestParam 200
Post url create parcel delivery PathVariable & RequestParam 200
Put url update status PathVariable & RequestParam 200
Delete url delete parcel delivery PathVariable 200

Payment

Request Type URL Method Description Input OutPut
Get url get payments - 200
Get url get payment PathVariable & RequestParam 200
Post url create payment PathVariable & RequestParam 200
Put url update payment PathVariable & RequestParam 200
Delete url delete payment PathVariable 200

Purchase

Request Type URL Method Description Input OutPut
Get url get purchases - 200
Get url get purchase PathVariable & RequestParam 200
Post url create purchase PathVariable & RequestParam 200
Put url update status PathVariable & RequestParam 200
Put url update parcel delivery PathVariable & RequestParam 200
Put url update instore pickup PathVariable & RequestParam 200
Put url add payment PathVariable & RequestParam 200
Delete url delete purchase PathVariable 200

Integration testing

After each commit for the project, Travis CI was triggered automatically to compile and test and overall project.

Static V&V

Code Review

Although there are many existing testing tools these days, code review is still an extremely important part of software development. Since it is a group project, we first split the tasks among each team member and communication between team members is extremely useful to provide a basic understanding of each person's work in progress. Therefore, we decided to hold regular code review sessions during which each team member can review each other's code and provide possible improvements. Through this approach, we significantly increased our efficiency in writing and debugging the code and the overall performance for this project is improved significantly meanwhile.