Test Project: Web Technologies PHP and Javascript Module
Test Project: Web Technologies PHP and Javascript Module
Web Technologies
PHP and JavaScript Module
Submitted by:
WSC2019_TP17_EN_PHP_and_JS
Contents
Contents ..................................................................................................................................................... 2
Introduction................................................................................................................................................ 3
Description of project and tasks................................................................................................................. 3
Phase one – PHP ......................................................................................................................................... 4
Database design ............................................................................................................................................... 4
Organizer interface .......................................................................................................................................... 4
Organizer login and logout .............................................................................................................................................. 5
Event management ........................................................................................................................................................... 6
Ticket management ......................................................................................................................................................... 10
Session management ....................................................................................................................................................... 11
Channel management ..................................................................................................................................................... 13
Room management ......................................................................................................................................................... 14
Room capacity .................................................................................................................................................................. 15
Attendee API .................................................................................................................................................. 16
Events overview ............................................................................................................................................................... 16
Event detail ...................................................................................................................................................................... 18
Attendee login and logout ............................................................................................................................................. 19
Event registration ............................................................................................................................................................ 20
Notes......................................................................................................................................................... 29
Submission Instructions to the Competitor .............................................................................................. 30
Equipment, machinery, installations, and materials required ................................................................. 31
Marking Scheme ....................................................................................................................................... 31
Organizer interface
Create an organizer interface (Server Side Rendered using a PHP Framework) using the templates provided to
• manage events, sessions, channels, rooms and tickets (create, read, update)
• create a bar chart to see the occupancy rates of all rooms
• create dynamic ticket prices
• support multiple tenants
Because different organizers will use this backend, keep security in mind. It should not be possible to access
events of other organizers or update events of other organizers.
Specification:
Feature: A1 – Log in and log out as an organizer: As an organizer, I would like
to log in and log out to the event platform so that I can access the
functionality of the platform.
Scenario: A4c – Enter invalid information for a new session – room booked
Given a form to enter session information is shown
When I choose a room which already has another session at the same time
And I press "save session"
Then the session is not saved into the database
And an error message "Room already booked during this time" is shown
And my previously submitted input data is not lost
PHPUnit tests
Tests for the PHP API are distributed with the mediafiles. Please see the following instructions to set
them up and configure on your own server.
Setup:
1. Upload the API tests to your server
2. Configure the .env file of the API tests and provide correct database credentials and the URL
where your API is available.
Running the tests:
Execute the following command on the server inside the directory of the api tests:
composer test
To only run a single test, you can use the following command for example:
Additional information for the REST-API tests/specification: the body contains some static example data, adjust it
to fit the requirements. Placeholder parameters in the URL are marked with curly braces: {slug}
The tests are referenced by its function name [-> test<scenario-id><text>].
The order of properties in objects does not matter, but the order of items in an array does.
Events overview
When an attendee lands on the index page of the application, he will get a list with all upcoming
events across all organizers. Events should be ordered ascendilgly by their date.
Specification:
Feature: B1 – Read events: As a visitor I want to read the public data of all
upcoming events so that I can display them in a list
setup-api
This will automatically set up the API and database on your server. After completion, the API is
available at http://XX.skill17.com/day2-afternoon/ (XX is your IDworkstation number). Field Code Changed
The API is implemented according to the specification of the Attendees API in part one.
Manual setup:
The manual setup should only be done in case the automatic setup fails.
1. Download the API from http://wsi.skill17.com/day2_afternoon_api.zip INSERT_URL_HERE (only
available in the afternoon)
2. Upload it to your server and unzip it into the folder /home/competitor/www/day2-
afternoon (ensure that the unzipped files files are directly located in the folder
/home/competitor/www/day2-afternoon and not in another subfolder)
3. Create a new database called day2_afternoon and import the provided dump from part one
4. The API is now available at http://XX.skill17.com/day2-afternoon/ (XX is your workstation Field Code Changed
numberID)
The yellow bubbles in the mockups show classes and ids which have to be used for those elements to allow
running automated tests. The yellow bubbles are not part of the design and do not have to be displayed in the
browser.
Specification:
Feature C1 - List upcoming events: As an attendee, I want to see what events
I can attend.
Specification:
Feature C2 - Display event agenda: As an attendee, I want to see what
sessions are within an event.
Specification:
Feature C3 - Display session details: As an attendee, I want to inform
myself about the details of a session.
Specification:
Feature: C5 – Log in and log out as an attendee: As an attendee, I would like to
log in and log out to the event
platform so that I can access my registrations and register for new events.
The Web Service / REST-API will be assessed with the automated test-framework provided. Additional data
may be used to test dynamic behavior.
It is recommended that you run the automated tests for the REST-API after implementing it locally or at least
after uploading it to the server. Instructions to setup and use the tests for the API: see README.md in tests_api-
php.
Manual assessment of other parts will be done using Google Chrome.
ITEM DESCRIPTION
Marking Scheme
SECTION CRITERION JUDG. MARKS MEAS. MARKS TOTAL
C1 Database 1.75 1.5 3.25
D3 General 1 3 4