Project 1 Part C

Due Sunday 11/09/2014 by 11:00pm

Late Submission Policy

To accommodate the emergencies that students may encounter, each team has 4-day grace period for late submission. The grace period can be used for any part of the project in the unit of one day. For example, a student may use 1-day grace period for Project 1A and 2-day grace period for Project 2B. Any single project part may not be more than 2 days late. Note that even if a team submits a project 12 hours late, they would need to use a full day grace period to avoid late penalty. If your project is submitted late, we will automatically use the available days in your grace period unless you specifically mention otherwise in the README file.


The final part of the Movie Database project is very open-ended and some students may want to get started early.

In the last part you are to (finally) create a fully functioning Movie Database system accessed by users exclusively through a Web interface. The functionality of your Movie Database system is quite flexible, although we expect all students to implement some baseline capabilities:

Four input pages:

Two browsing pages:

One search page:

A demo site is available here. This page is available strictly to give you an idea of the basic requirements, and is not meant to guide your choice of style or user interface in any way. Please be creative, and do not simply mimic the UI of the demo site.

Important Notes:

Although the project interface is very open-ended, we have to make the basic features of your system accessible in a typical browser environment. More precisely, you must make sure your system work with the most recent vesion of the Mozilla Firefox browser without any additional plugins or extensions. If you feel this restriction will somehow limit yourself too much, you must get "preapproval" from the TA to use a different browser environment. Send an email message to your TA telling him precisely what browser environment you wish to use for your project and why it is necessary. When the preapproval process is not followed, projects that have problems on Mozilla Firefox may lose points, possibly all points if we cannot run your project at all.

We may select a small number of Movie Database systems to be demonstrated to the class at time to be determined. Students will not receive extra credit, but they will receive extra recognition. The criteria for selection will be some combination of beyond-the-basics functionality and a good user interface.

Hints on implementation

Your Project 1B

Demonstrate your website

By now you should already have a working website, and in this section you are going to prove that your site is working correctly. To prove it, you are asked to use Selenium project, specificly Selenuim IDE.

What is Selenium IDE?

Selenium IDE is designed for automating browser tests. It is essentially a Firefox broswer plug-in. Primarily it is for automating web applications for testing purposes. However, here we use Selenium as an "screen action recorder". That is to say, Selenum allows you to record a sequence of steps and a TA could replay it.

Install Selenum IDE

  1. Install Firefox (if you don't have it). Note that you should install Firefox to your operating system (windows/mac), but NOT to the virtual machine (ubuntu). Your ubuntu image (installed in the virtual machine) is just a web server and you need a client (which is your current operating system) to try your website. (Please download the latest released version.)
  2. Download Selenium IDE: Link (Please download the latest released version.) In your Firefox browser, when you click the download link which is showed as a version number, your Firefox will pop up a window to let you install the plug-in.
  3. If you don't know how to install an xpi...

Using Selenium (A Video Tutorial by Chu-Cheng)

Using selenium, create the following five test case files:

  1. t1.html: use your search page to search for Tom Hanks, and it should return just ONE match (actor). Then you should click the actor "Tom Hanks" in your search result (it should be a link pointing to a page that displays information about Tom Hanks).
  2. t2.html: use your web pages to create:
  3. t3.html: create a fake movie, title:CS143; company:UCLA ; year:2013; director:Mary Queen; genre: Action and Horror; MPAA: G; "Happy Jack" acted as role TA in this movie.
  4. t4.html: use your review page to create two reviews: (1) content: very good and score: 5 (2) content: excellent and score: 4. And then use your search page to search CS143, and your test case should stop at the page where we can see the average is 4.5, two comments your wrote, and other movie info.
  5. t5.html: user your search page to search keyword santa (note: all letters in lowercase in this test case), and you test case should stop at the search result page, which should contain 7 actors ( Actor: Toni Santagata(1940-12-09), Actor: Yusuke Santamaria(1971-03-12), Actor: Carlos Santana(1947-07-20), Actor: Henrique Santana(1924-05-07), Actor: Merlin Santana(1976-03-14), Actor: Peter Santana(1966-03-29), Actor: Carolina Santangelo(1986-08-05)) and 3 movies ( Movie: Santa Claws(1996), Movie: Santa Fe(1997), Movie: Santa with Muscles(1996) ).

Submission Instruction

Preparing Your Submission

Please create a folder named as your UID, and create "sql", "www", and "testcase" folders within your UID folder. Put your create.sql and load.sql files from project 1B into the sql folder, all your web site source files into the www folder, your selenium test case files into the testcase folder, and your README file into the UID folder. Compress your UID folder into a single zip file called "P1C.zip". In summary, your zip file should have the following structure.

P1C.zip
 |
 +- Folder named with Your UID, like "904200000" (without quotes)
     |
     +- readme.txt
     |   
     +- sql
	 |
	 +- create.sql
	 |
	 +- load.sql
     |
     +- www
	 |
	 +- index.php (your web site files)
	 |
	 +- search.php
         |
         +- others.php
         :
     |
     +- testcase
         |
         +- t1.html
	 |
         +- t2.html
         |
         +- t3.html
         |
         +- t4.html
         |
         +- t5.html

Please note that the file names are case sensitive, so you should use the exact same cases for the file names. (For team work, use the submitter's UID to name the folder)

Testing of Your Submission

Grading is a difficult and time-consuming process, and file naming and packaging convention is very important to test your submission without any error. In order to help you ensure the correct packaging of your submission, you can test your packaging by downloading this test script. In essence, this script unzips your submission to a temporary directory and tests whether or not you have included all your submission files. The script for Project 1C can be executed like:
cs143@cs143:~$ ./p1c_test <Your UID>
(Put your P1C.zip file in the same directory with this test script, you may need to use "chmod +x p1c_test" if there is a permission error).

You MUST test your submission using the script before your final submission to minimize the chance of an unexpected error during grading. Again, significant points may be deducted if the grader encounters an error during grading.When evertything runs properly, you will see an output similar to the following from this script:

Check File Successfully. Please upload your P1C.zip file to CCLE.

Submitting Your Zip File

Visit the Project 1C submission page and submit only your "PIC.zip" file electronically by the deadline. In order to accomodate the last minite snafu during submission, you will have 30-minute window after the deadline to finish your submission process. That is, as long as you start your submission before the deadline and complete within 30 minutes after the deadline, we won't deduct your grade period without any penalty.

Grading: