View Bookings Page
- This redirects you back to the Login page if you are not logged in, otherwise gives you the option to go back to the Bookings page or to the Logout page.
- On this page it displays all your current bookings, showing you the trainee booked, which course they are on, when it takes place and when it was booked.
Logout page
- This logs you out and offers you a link back to the start.
- This page offers no redirection, if it is accessed without logging in, it doesn’t do anything except displaying the usual logged out message.
Test Plan & Results
AE = “As Expected”
LOGIN.ASP
Elements: Text Box for “Company ID”, text box for “Password”
What they should accept: Company ID should be a number, Password could be anything.
Since the Password element could be anything, I will only test the Company ID element here.
Element to Test: Company ID
Login.1
Test Case: “abc”
Expected Result: Error: “Company ID is a number”
Actual Result: AE
Login.2
Test Case: “abc123”
Expected Result: Error: “Company ID is a number”
Actual Result: AE
Login.3
Test Case: “123abc123”
Expected Result: Error: “Company ID is a number”
Actual Result: AE
Login.4
Test Case: “ ”
Expected Result: Error: “Company ID is a number”
Actual Result: AE
Login.5
Test Case: “123^%*”
Expected Result: Error: “Company ID is a number”
Actual Result: AE
Login.6
Test Case: “ 123 ”
Expected Result: Error: “Company ID is a number”
Actual Result: AE
Login.7
Test Case: “1”
Expected Result: Allow Login
Actual Result: AE
Selected Screenshot
Fig 6
BOOKINGS.ASP
Elements:
- Text Box for Trainee First Name and Trainee Last Name.
- Select Box for Course and Multiple Select Box for Trainees
What they should accept:
- Trainee First and Last names should be letters, spaces and hyphens
- Select boxes are not taking any user input, so they won’t be validated. In a professional system they would be though to avoid users tampering with the form code.
Element to Test: Trainee First Name (This is exactly the same as Last Name, so counts for both) [We are assuming that the Surname is valid here. And that if we were testing the Surname, then the First name was valid]
Booking.1
Test Case: “ ”
Expected Result: Form is submitted, but nothing happens
Actual Result: Trainee was entered with no first name.
Fix Added: Expanded the If statement to include single space
Booking.2
Test Case: “123”
Expected Result: Error: “Please enter a valid first name!”
Actual Result: AE
Booking.3
Test Case: “AName123A”
Expected Result: Error: “Please enter a valid first name!”
Actual Result: AE
Booking.4
Test Case: “Name_Name”
Expected Result: Error: “Please enter a valid first name!”
Actual Result: AE
Booking.5
Test Case: “My-Name”
Expected Result: Successful Submission
Actual Result: AE
Booking.6
Test Case: “A Name”
Expected Result: Successful Submission
Actual Result: AE
Booking.7
Test Case: “My Name &7”
Expected Result: Error: “Please enter a valid first name!”
Actual Result: AE
Selected Screenshots
Fig 7 Fig 8
Element to Test: Course Select Box
Booking.8
Test Case: Not selecting anything
Expected Result: Error: “Please make sure to select a course and a trainee!”
Actual Result: AE
Booking.9
Test Case: Selecting one of the courses
Expected Result: Successful submission (Assuming Trainee is also valid)
Actual Result: AE
Selected Screenshot
Fig 9
Element to Test: Trainee Multiple Select Box
Booking.10
Test Case: Not selecting anything
Expected Result: Error: “Please make sure to select a course and a trainee!”
Actual Result: AE
Booking.11
Test Case: Selecting 1 of the trainees who hasn’t already been booked for that course
Expected Result: Successful booking
Actual Result: AE
Booking.12
Test Case: Selecting 2 of the trainees who haven’t been booked for that course
Expected Result: Both successful booking
Actual Result: AE
Booking.13
Test Case: Selecting 1 trainee who has already been booked for that course
Expected Result: Error: “{Trainee Name} is already booked onto that course!”
Actual Result: AE
Booking.14
Test Case: Selecting 2 trainees who have already been booked for that course
Expected Result: Error: “{Trainee Name} is already booked onto that course!” * 2
Actual Result: AE
Booking.15
Test Case: Selecting 2 trainees who have not been booked for that course and 2 that have.
Expected Result: 2 Errors and 2 Successful Bookings
Actual Result: AE
Booking.16
Test Case: Booking 2 trainees onto a course with only 1 space left
Expected Result: First trainee gets booked, second is not
Actual Result: Both got booked, taking the vacancies to -1
Fix Added: Changed code to check the vacancies were >= the number of trainees submitted, instead of 0
Selected Screenshots
Fig 10 Fig 11
Fig 12 Fig 13
Evaluation
How Effective My Product Would Be in Providing the Intended Service
Well, obviously if this was a professional website required by actual companies, then it would be nowhere near the level of detail that would be required.
For starters, the design is just basic black and white and although that doesn’t particularly infringe upon the system, if it were to be a live, professional website, then it would be expected that the design would also be professional.
The trainee additions are very basic, offering only first and last name, so in reality they would require a lot more information, for example: DOB, Job, Salary to name but three, unless this database was going to form a link with separate company databases and therefore maybe only the trainee ID would be needed and all the rest of the information could be obtained through the other distributed databases.
Adding trainees to a course would require more confirmation and possibly a payment system, since the courses are not free; maybe offering something like PayPal payments or direct credit card charges.
Additionally, there are no features for adding courses, editing courses, removing courses, removing trainees, editing trainees, editing companies, adding companies, removing companies, changing bookings, removing bookings... So all of these would be required, depending on whether you were logging in as a company, as a trainee, as an administrator, etc...
However, looking at just the very basic specifications which we were given, I feel that my “Product” is reasonably effective at providing the intended service – everything which was asked for is there, it is simple and easy to use and no-one should have any trouble when trying to use it.
How Successfully Have I Completed This Assignment
This is similar to the last paragraph above this, but again, I feel that I have completed the assignment to a good – if not “very good” – standard.
If we look at all of the individual tasks associated with the project, we can see that everything has been done:
- Test plan and results evidence – The test plan I have done is very thorough, spanning 7 A4 pages, testing as many possible combinations of data types that could be entered into forms and providing a multitude of screenshots to prove the results of the more important ones.
- Code structure & style and use of DOM & objects – Most of my code is structured in an efficient and professional way, using indents to separate elements such as loops and conditional statements. There is a reasonable amount of space between separate sections of code and most of it is commented to explain what is happening at each step of the way.
- Evaluation – As you can see by reading this, my evaluation is quite thorough and is looking at each element of the project to assess whether it has been completed to a good enough standard or not.
- Site function, including general usability – All of the pages created function in the desired way. The login page logs you in, the booking page allows the addition of trainees and booking onto courses, the view page allows you to view the company’s current bookings and the logout page logs you out. All pages are protected by a session, so that you are redirected to the login page if you try to access them without having logged in firstly.
- Client-side functions (eg: validation) – Vbscript functions are used to validate all data input, such as login details and trainee details. It has not been used to validate the data from the select boxes as it is assumed that for the purposes of this course, the demo will not involve recreating the forms to alter the values of the options.
- Booking confirmation (including database) – Confirmation of a booking is offered in the way of an additional submit button being displayed after pressing the initial one. The details are then displayed on the screen is clearly visible blue text, showing you who has been booked, onto what and what the cost was. The database is updated instantly as soon as the submission has been verified server-side to make sure that said trainee(s) are able to be booked onto said course.
- Server-side functioning (eg: display existing bookings) – The view page handles this particular task and the data is retrieved by the server from the database and displayed to the user in a simple HTML table. It shows them the trainee, the course, the data of the booking and the date the course will (or did) take place.
- Dynamic creation of booking page (ie: correct course and trainee options) – Since the ASP scripts regarding the addition of trainees and the booking of places take place before any HTML output, the screen always shows the up-to-date information. For example if I added a trainee called “Rosie Warwicker”, I would not have to refresh the page to see her in the select element, as soon as the submission was completed and the success message had appeared, she would be visible there. The same goes for courses, so if one was booked and was now out of spaces, it would be removed from the list of those available to book people onto.
- Dynamic addition of trainees (page structure & database updating) – The page structure of the bookings page may leave a little to be desired, as it could have been laid out better. For example, maybe putting the two forms horizontal next to each other using float styles, or maybe hiding one and offering a toggle link to choose which to display. The database updating is done instantly with no problems though, assuming validation is met.
- Authentication management (Eg: access restricted to logged-in user) – As previously mentioned, all pages are restricted to a session authenticated user.
- Company ID management (ie: only required at login but displayed on subsequent pages) – The company ID is only required once – on the login page. After that, a header is shown on the booking and view pages, displaying the name of the company currently logged in. Also, the company ID is stored in a session variable, which is then used in the database queries, to prevent having to specify which company you are each time.
Learning Outcomes
I believe I have displayed the knowledge required by both of these, in as such as showing that on the client-side you can do things like form validation and changing the appearance of the HTML and CSS. Whereas, if you want to do anything more advanced with form data or creating session-orientated applications, you must go to the server-side. This is because client side languages such as VBscript are only executed in the user’s browser and so affect only the user. Whereas, if you want to affect something stored on the actual web server, such as database information, you must use languages which the server itself – rather than the browser – can parse.
Appendices
Please see print outs of the code. These print outs had some slight difficulties in printing as displayed on the screen, as some lines were too long for an A4 piece of paper, so it looks as if some of the lines have moved onto 2 lines or more, which would have meant I would have needed to use an “_” character in the code, however, this is merely a display error on the printouts.
The electronic copies of the code are included on the CD.
The URL of the live version, as mentioned on the contents page, is:
http://babbage.coventry.ac.uk/warwick2/login.asp
Bibliography
PAYNE, L et al. 2009. 230CT Lecture & Tutorial Slides. [Online As Of: 08 Mar 2010]
<http://vle.coventry.ac.uk>
W3SCHOOLS. 2010. Online Web Tutorials. [Online As Of: 08 Mar 2010]
<http://w3schools.com>
TIZAG. 2008. Tizag Tutorials. [Online As Of: 08 Mar 2010]
<http://www.tizag.com>
ASP. 2010. The Official Microsoft ASP.NET Website. [Online As Of: 08 Mar 2010]
<http://www.asp.net>
Comments
Any post-marking comments can go here: