2 Commits

Author SHA1 Message Date
687ed01f31 Merge pull request 'feature/issue7' (#7) from feature/issue7 into QA
Reviewed-on: #7
2025-07-09 15:54:36 +00:00
2ed9720e18 Merge pull request 'bug/issue6' (#6) from bug/issue6 into QA
Reviewed-on: #6
2025-07-09 15:53:28 +00:00
3 changed files with 4 additions and 38 deletions

View File

@@ -43,15 +43,9 @@
* clubs.json - list of clubs with relevant information. You can look here to see what email addresses the app will accept for login. * clubs.json - list of clubs with relevant information. You can look here to see what email addresses the app will accept for login.
5. Testing 5. Testing
- unit and integration tests :
All tests are made with Pytest, except <code>test_book_old.py</code> which uses Ward You are free to use whatever testing framework you like-the main thing is that you can show what tests you are using.
Run the tests by using : `pytest -s -v --cov=. --ignore=tests/test_book_old.py`
You'll see the result, the list and the coverage rapport We also like to show how well we're testing, so there's a module called
[coverage](https://coverage.readthedocs.io/en/coverage-5.1/) you should add to your project.
you can also run `ward` from the root folder to see the two ward tests
- performance tests :
run the app : `FLASK_APP=server.py flask run`
then run `locust -f tests/performance_test/locustfile.py` from the root directory and connect with browser to `
http://0.0.0.0:8089` and launch tests from the web interface

View File

@@ -1,28 +0,0 @@
from locust import HttpUser, task
class PerfConnectionTest(HttpUser):
@task
def index(self):
response = self.client.get("/")
@task
def login(self):
response = self.client.post("/showSummary", {"email": "admin@irontemple.com"})
class PerfBookTest(HttpUser):
@task
def bookPlaces(self):
response = self.client.post("/showSummary", {"email": "admin@irontemple.com"})
response = self.client.post("/purchasePlaces", {"club": "Iron Temple", "competition": "Fall Classic", "places": 2})
class PerfBoard(HttpUser):
@task
def board(self):
response = self.client.get("/points")