For this project different testing approaches where pursued. Core Testing method for The Puffins was manual testing and user testing. Additionally Testcases based on Django TestCase where introduced to this project to support the development process. In addition to testing the code ran through specific validation services to spot any irregularities or syntax errors. On top of that the project was posted to Code Institutes private #peer-code-review Slack Group to gather some more feedback from students and alumnis. The following documentation provides an detailed overview of the defined testcases, the automatic testing setup, validation service results and insights to challenging bugs that were encoutered during the development of this project.
- Introduction
- Table of Content
- Manual Test Cycles
- User Testing
- Automatic Tests & Continious Integration
- Validation Services
- Peer-Code-Review
- Bug-Log from Development
- Open Browser
- Open Puffins Page
- Click every nav item
- Open Browser
- Open Puffins Page
- Check if navbar contains
Shop
Highlights
Blog
About
Help
Userprofile-icon
Cart-icon
Search-icon - Click Userprofile-icon and login with
- Check that navbar icons changed and the follow are present
Useraccount-icon
Wishlist-icon
Cart-icon
Search-icon
- Open Browser
- Open Puffins Page
- Click Search-icon
- Searchbar should open below nav
- Open Browser
- Open Puffins Page
- Don't scroll check that nav is transparent
- Open Browser
- Open Puffins Page
- Scroll and check that nav background changes to white and font to black
- Open Browser on medium screen
- Open Puffins Page
- Don't scroll
- Click collapse button
- Check that nav background changes to white and font to black
- Open Browser
- Open Puffins Page
- Scroll to bottom
- Check that
Logo is displayed
Quicklinks to products are available
Contact details are accessabile Link to About page is present
- Open Browser
- Open Puffins Page
- Check that
Caroussel with images is behind nav
Check that no more than 4 random Products are displayed
Product details can be accessed by clicking the SHOP Button
- Open Browser
- Open Puffins Page
- Click on About in Navigation
- Check that ...
Vision is diplayed
Short introduction to company is provided
- Open Browser
- Open Puffins Page
- Scroll to bottom of page
- Click on About in Footer
- Check that same information is present as in Test 4.1
- Open Browser
- Open Puffins Page
- Click on HELP in Navigation
- Check that
FAQs are diplayed
FAQs are categorized
Contact form available
- Open Browser
- Open Puffins Page
- Click on HELP in Navigation
- Fill out Form
- Submit Form
- A success message should be presented instead of the form
- Open Browser
- Open Puffins Page
- Login with
- Check that Form is prefilled (puffin1@byom.de, Huffin, Puffin)
- Open Browser
- Open Puffins Page
- Click on SHOP
- Click Kids or Grown Ups
- Check that products are displayed and the page title shows the Category
- Open Browser
- Open Puffins Page
- Click on SHOP
- Click Kids - T-Shirt or Grown Ups - Sweatshirts
- Check that only productline items are displayed and the page title shows the Category & Productline
- Open Browser
- Open Puffins Page
- Click on SHOP
- Click Partnerlook
- Check that matching products are displayed next to eachother and the page title states "Partnerlook" with the subtitle "T-Shirt & Sweatshirt"
-
Open Browser
-
Open Puffins Page
-
Click on SHOP
-
Click Kids - T-Shirt or Grown Ups - Sweatshirts
-
Toggle the Sort switch through all options and check that sorting works accordingly
...Featured Products ✅
...Price 🪲
...Color ✅
...Name ✅Finding: Sorting by Price works. However due to the datamodel holding an attribut discount_price and normal price the sorting does not take discount_prices into consideration. This should be fixed by either adjusting the model or finding a way to handle it via a function on the get request.
- Open Browser
- Open Puffins Page
- Click on SHOP
- Click Kids - T-Shirt or Grown Ups - Sweatshirts
- Check different card design for regular, sale(red) and pre-order(blue) items
- Open Browser
- Open Puffins Page
- Click on SHOP
- Click Kids - T-Shirt or Grown Ups - Sweatshirts
- Choose any product by clicking the image
- New page should open
- Page should contain
Product image
Descripton
Size Options Add to Cart Button
Material information
Return & Delivery Information
- Open Browser
- Open Puffins Page
- Login with puffin1@byom.de pw: testuser1
- Click on SHOP
- Click Kids - T-Shirt or Grown Ups - Sweatshirts
- Choose any product by clicking the image
- Heart below Add to Cart-Button should be visible
- Open Browser
- Open Puffins Page
- Click on HIGHLIGHTS
- Only one Product per row should be shown
- Open Browser
- Open Puffins Page
- Click on Cart-Icon
- Side Drawer Cart should open
- Placeholder "Nothing in Cart" should be displayed
- Open Browser
- Open Puffins Page
- Click on SHOP
- Click Kids - T-Shirt or Grown Ups - Sweatshirts
- Choose any product by clicking the image
- Add Item to Cart
- Side Drawer Cart should open
- Chosen Product should be inside the cart view
- Open Browser
- Open Puffins Page
- Click on SHOP
- Click Kids - T-Shirt or Grown Ups - Sweatshirts
- Choose any product by clicking the image
- Add Item to Cart
- Side Drawer Cart should open
- Click below checkout button on Go to Cart
- Fullpage Cart should open
- Open Browser
- Open Puffins Page
- Click on SHOP
- Click Kids - T-Shirt or Grown Ups - Sweatshirts
- Choose any product by clicking the image
- Add Item to Cart
- Side Drawer Cart should open
- Continue shopping by clicking on the grey overlay or on to the Close button in the top right
- Cart should Close
- Choose another product
- Add Item to Cart
- Side Drawer Cart should and last added item should be on top
- Open Browser
- Open Puffins Page
- Click on SHOP
- Click Kids - T-Shirt or Grown Ups - Sweatshirts
- Choose any product by clicking the image
- Add Item to Cart
- Side Drawer Cart should open
- Press Checkout Button
- Checkout Page should open
- Open Browser
- Open Puffins Page
- Click on SHOP
- Click Kids - T-Shirt or Grown Ups - Sweatshirts
- Choose any product by clicking the image
- Add Item to Cart
- Side Drawer Cart should open
- Click below checkout button on Go to Cart
- Fullpage Cart should open
- Press Checkout Button
- Checkout Page should open
- Open Browser
- Open Puffins Page
- Click on SHOP
- Click Kids - T-Shirt or Grown Ups - Sweatshirts
- Choose any product by clicking the image
- Add Item to Cart
- Side Drawer Cart should open
- Press "+" Button in Side Drawer Cart
- Should be redirect to Fullpage Cart
- Quantity should be increased by 1
- Open Browser
- Open Puffins Page
- Click on SHOP
- Click Kids - T-Shirt or Grown Ups - Sweatshirts
- Choose any product by clicking the image
- Add Item to Cart
- Side Drawer Cart should open
- Press "-" Button in Side Drawer Cart
- Should be redirect to Fullpage Cart
- Quantity should be decreased by 1
- Open Browser
- Open Puffins Page
- Click on SHOP
- Click Kids - T-Shirt or Grown Ups - Sweatshirts
- Choose any product by clicking the image
- Add Item to Cart
- Side Drawer Cart should open
- Press "x" Button in Side Drawer Cart
- Should be redirect to Fullpage Cart
- Product should be removed from Cart
- Open Browser
- Open Puffins Page
- Click on SHOP
- Click Kids - T-Shirt or Grown Ups - Sweatshirts
- Choose any product by clicking the image
- Add Item to Cart
- Side Drawer Cart should open
- Click below checkout button on Go to Cart
- Should be redirect to Fullpage Cart
- Press "+" Button
- Page should be reloaded and quantity increased by one
- Open Browser
- Open Puffins Page
- Click on SHOP
- Click Kids - T-Shirt or Grown Ups - Sweatshirts
- Choose any product by clicking the image
- Add Item to Cart
- Side Drawer Cart should open
- Click below checkout button on Go to Cart
- Should be redirect to Fullpage Cart
- Press "-" Button
- Page should be reloaded and quantity decreased by one
- Open Browser
- Open Puffins Page
- Click on SHOP
- Click Kids - T-Shirt or Grown Ups - Sweatshirts
- Choose any product by clicking the image
- Add Item to Cart
- Side Drawer Cart should open
- Click below checkout button on Go to Cart
- Should be redirect to Fullpage Cart
- Press "x" Button
- Page should be reloaded and item should be removed from cart
- Open Browser
- Open Puffins Page
- Click on SHOP
- Click Kids - T-Shirt or Grown Ups - Sweatshirts
- Choose any product by clicking the image
- Add Item to Cart
- Side Drawer Cart should open
- Click Checkout-Button
- Should be redirected to checkout page
- Form for address details & Order Summary should be displayed
- Fill in form & use test credit card (4242 4242 4242 4242)
- Submit order
- Loading animation should be displayed
- Checkout success page should be shown
- Open Browser
- Open Puffins Page
- Click Userprofile-icon and login with puffin1@byom.de pw: testuser1
- Click on SHOP
- Click Kids - T-Shirt or Grown Ups - Sweatshirts
- Choose any product by clicking the image
- Add Item to Cart
- Side Drawer Cart should open
- Click Checkout-Button
- Should be redirected to checkout page
- Form for address details should be prefilled & Order Summary should be displayed
- add test credit card (4242 4242 4242 4242)
- Submit order
- Loading animation should be displayed
- Checkout success page should be shown
- Open Browser
- Open Puffins Page
- Click Userprofile-icon
- Choose Sign Ups
- Fill out the Form
- Check if confirmation mail was received
- Confirm email
- Login with credentials
- Open Browser
- Open Puffins Page
- Click Userprofile-icon and login with
- Click on UserAccount-icon
- Should see Form
- Should see Order History
- Open Browser
- Open Puffins Page
- Click Userprofile-icon and login with
- Click on Heart-icon
- Should show empty wishlist
- Open Browser
- Open Puffins Page
- Login with
- Click on SHOP
- Click Kids - T-Shirt or Grown Ups - Sweatshirts
- Choose any product by clicking the image
- Click Heart below Add to Cart-Button
- Heart should change from outline to filled
- Open Browser
- Open Puffins Page
- Click Userprofile-icon and login with
- Click on Heart-icon
- Should show wishlist with one liked item
Besides running through the extensive test cycles documented above the URL from the Heroku deployment was shared with friends and family. The following feedback was collected:
- "Great products"
- "Beautiful design"
- "Footer looks a little too full"
Following Improvements/Features/Bugs were identified:
- Feature Requests
- Feature request: I wish i could increase/decrease quantity within the sidedrawer cart ✅
- Improvement
- Cart on Mobile view hidden. As an idea for a later release the logo and text logo would move to the center. Moving the Burger-Menu to the left side of the screen and adding the cart symbol to the right top corner. 🧰
- Bugs
- Quantity not shown in Side Drawer Cart ✅
- Buttons on Carrousel not inline with button box ✅
- Cart Mobile Fullpage not in view ✅
- Info Toast behind Navbar ✅
- Adding a Product to the cart and using the back button in browser or the implemented backbutton does not refresh the page. Therefor the cart does not signal that the user has something in the cart. Couple of solutions found on Stackoverflow were tested but none could solve the issue. This bug is still pending and should be fixed in the next release. 🧰
A basic set of test using the Django TestCase integration were created to support the testing and development process and gain practical knowledge in this field. Test were written for the following apps:
- About (Views) - 100% Coverage
- Blog (Models & Views) - 100% Coverage
- Contact (Forms 100%, Models 100%, Views 54%)
- Useraccount (Forms 81%, Models 100%, Views 65%)
- Wishlist (Models 100% & Views 58%)
More test need to be written to reach a 100% test coverage. Furthermore, Travis CI used to allow continious integration patterns in combination with Heroku. Travis CI is an open source software for continious integration.
Build Status:
All pages incl. sub-pages were processed through the W3C Markup Validation Service. The validation revealed some missing alt=""
statements, stray <div>
's and conventions regarding the use of <span>
in combination with <hr>
. The findings were all resolved and no more issues were found by the W3C Markup Validation Service.
The whole css file ran through the W3C Markup Validation Service. After taking care of some minor errors and cleaning up the css 5 Errors are still reported. These Errors were accepted since they mark the use of the javascript injected dynamic --vh
variable in combination with the calc()
operation. Furthermore 18 Warnings were accepted. The 10 of the 18 warnings also relate to the dynmic height view-height variable. And the other 8 warnings inform about same colors on 2 classes .allauth-form-inner-content button
and .allauth-form-inner-content input[type="submit"]
which was also accepted in this case.
All *.js files were checked with the service of JS Hint. By using this service some bugs like wrong use of &&
in if functions and missing ;
were identified and solved.
All *.py files were checked with the service of PEP8 Online. The files looked all good and no error was reported.
The site was created with the mobile first approach in mind. The following devices / device sizes were used for testing the responsiveness:
- iPhone 11 Pro
- iPad 10,2"
- MacBook Pro 13"
The site was tested on the following Browsers:
On all browsers full site compatibility was identified based on the test cases.
The project was peer-reviewed by students from code institute. Feedback was given on the readme files and the code.
The following bugs were identified and mainly fixed during development:
-
Updating userprofile even if checkbox is unchecked on Checkout form:
This issue was identified during the extensive testing protocoll and took a while to solve. The problem was that the used JavaScript call to check if the checkbox is checked or unchecked always returned true. Furthermore, the python code didn't identify the javascript
true
/false
response asTrue
orFalse
. Therefore the functions did not process the given information as intended. The following lines were introduce to make the function work as intended:stripe_elements.js var saveInfo = $('#id-save-info').is(':checked');
webhook_handler.py if save_info == "true":
-
Webhooks for orders without the optional streetaddressline2 filled out were failing. Therefore customers who didn't provide a line2 street address were not receiving their order confirmation. The problem laid in the model definition. By allowing
null
to betrue
onstreet_address2
the webhooks were processed without problems. -
Adding products to a wishlist if no item was added before on a fresh user failed in the beginning. The solution was to use the
get_or_create
method and check if the object was created or already existed. -
Product images were not displayed when using the
{{MEDIA_URL}}
template tag. This was solved by extensivly checking the settings.py and by realizing that thedjango.template.context_processors.media
was missing in the templates setup. -
Importing fixtures to postgres db led to some troubles. This was solved by making sure the charfields are set correct and that especially on long descriptions it makes sense to use TextField.