-
Notifications
You must be signed in to change notification settings - Fork 5
Software QA Plan & Report
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
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 AdvancedRestClient and Postman. Meanwhile, integration is tested on Travis CI throughout the development process of deliverable 2.
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%. The tables below show the average of desired and achieved test coverage for all service classes:
Testing Average | Desired coverage | Achieved coverage |
---|---|---|
Business methods in service classes | 90% | 97.8% |
To show more details, the following tables illustrate all the unit tests we performed for service classes:
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 | 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 | Get | Create | Update User's email | Update User's password | Update User's avatar | Delete |
---|---|---|---|---|---|---|
ValidName | return Normal User | create user | update required user's email | update required user's password | update required user's avatar | delete user |
NotExistingUser | throw exception | throw exception | throw exception | throw exception | throw exception | throw exception |
EmptyName | throw exception | throw exception | throw exception | throw exception | throw exception | throw exception |
NullName | throw exception | throw exception | throw exception | throw exception | throw exception | throw exception |
NotCompletedInput | - | throw exception | throw exception | throw exception | throw exception | - |
SameInformationToBeUpdate | - | - | throw exception | throw exception | throw exception | - |
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 | 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 | 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 | 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 | 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 |
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 | 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 | 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 |
For this part, we used AdvancedRestClient, a tool to test the functionalities of our controller classes.
To perform integration tests and export json files for execution, we used Postman, where we defined a collection of requests to test the services in each class. For all the json files and links to Postman collections, see /ArtGallerySystem-Backend/src/test/java/ca.mcgill.ecse321.artgallerysystem.controller
After each commit for the project, Travis CI was triggered automatically to compile and test and overall project.
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.