CITS5505 Agile Web Development - Group Project
Live Demo: https://pictionary-deploy-2.onrender.com/login
- Purpose
- Architecture
- Launch
- Unit tests
- System Tests
- License
- Contributors
[Draw, guess, and chill with friends in a game of wits and sketches ;)]
- HTML: The markup language used to create and structure sections, paragraphs, and links on a web page.
- CSS: The style sheet language used for describing the presentation of the web pages, including colors, layout, and fonts.
- JavaScript: The programming language used to create interactive effects within web browsers, including the use of
two JavaScript libraries:
- AJAX (Asynchronous JavaScript and XML): A set of web development techniques that allows a web page to communicate with a server asynchronously, without reloading the page.
- jQuery: A fast, small, and feature-rich JavaScript library that simplifies things like HTML document traversal and manipulation, event handling, and animation.
- Bootstrap: An open-source toolkit for developing with HTML, CSS, and JavaScript, providing design templates and themes for typography, forms, buttons, navigation, and other interface components.
- Flask: A micro web framework written in Python. It's used to handle requests and responses, interact with the database, and render templates into HTML to be sent to the client.
- SQLite: A compact and reliable SQL database engine that offers a self-contained, serverless, and zero-configuration database system. It's embedded directly into the application, providing robust data storage capabilities.
- Clone the repository
git clone https://github.com/kylelhk/Pictionary
- Setup virtual environment
python -m venv venv
source venv/bin/activate
-
Create a
.flaskenv
environment file to setup environment variables. (Save the file in the same location as.flaskenv.example
). Copy the content of.flaskenv.example
to.flaskenv
. -
Download and install the required packages by running the following command
pip install -r requirements.txt
Note: Whenever a new package is used, they should be added into the requirements.txt file for the markers to download all the packages required for running this app.
- Initialise the database
flask db init
flask db migrate
flask db upgrade
Run this command to add words to draw and guess to the app's database
flask load-data
- Run the app
flask run
Enjoy!
Unit tests are located in the test/unit/
directory.
Before running the tests, ensure your .flaskenv
file contains the following value for the FLASK_APP
environment variable:
FLASK_APP="app:create_app('TestConfig')"
To run all tests, use the following command:
python -m unittest
For a more detailed output:
python -m unittest -v
To run a specific test class file, use the command:
python -m unittest test.unit.<filename without .py extension>
System tests are located in the test/system/
directory.
- Download ChromeDriver, ensuring that you download the version that matches your installed Chrome version.
- Set Chrome and ChromeDriver paths:
- Change the path to Chrome and ChromeDriver in
test/system/test_selenium.py
to match your environment.
- Change the path to Chrome and ChromeDriver in
- Ensure the
FLASK_APP
environment variable is set to the test configuration, as described in the unit tests above. - Ensure the Flask application is running by running the command,
flask run
.
To run the system test, use the following command:
python -m unittest test.system.test_selenium
This project is licensed under the MIT license.
- Pritam Suwal Shrestha (23771397)
- Trieu Huynh (23728208)
- Weiqiao Xu (23464412)
- Kyle Leung (23601964)