Unit Testing
Due to the nature of the program, unit testing was done manually and not by
a script. Listed below are the tests run for each page.

Trade
The bulk of unit testing came from the ordering page, named trade.

Due to the nature of this project, testing was not done with a script, but was done manually via equivalence tests. The actual program itself is written to check the various fields of the order form sequentially, so it will not allow a user to submit the form until all the fields have been filled out correctly. The equivalence testing for number fields included four regions: non-numeric, negative, 0, and positive.


First Test-Testing symbol 
Enter a valid ticker symbol : The system should not give an error for symbol 
Enter an invalid ticker symbol: The system should alert the user that the stock does not exist

Second Test- Testing Quantity
Enter non-integer: System responds with error
Enter negative integer: System responds with error
Enter integer = 0: System responds with error
Enter positve integer: System success

Third Test - Testing Term, Order Type, or Price Type
Enter "--" : System responds with error
Enter a choice within the select box: System responds with success if all 3 have valid options selected.

(Testing for this is simplified because the system gives a different list for price type depending on the order type chosen, so no error can be made in choosing valid combinations)

Fourth Test - Testing Limit Price, Stop Price, Trailing Stops
Enter non-numeric number: System responds with error
Enter negative float/integer: System responds with error
Enter integer/float = 0: System responds with error
Enter positve float/integer: System success

Fifth Test - Short Selling
Enter a short sell.
Negative amount shoud pop up on portfolio


Research Page

Choose an exchange, sector, and industry, and see if the results are appropriately filtered. 

Choose Valid Exchange: Sector, Industry, and Symbol are filtered
Choose Valid Sector: Industry and Symbol are filtered
Choose valid Industry: Symbol is filtered

Any combination of the three should also do a valid filter


Portfolio
Testing the Portfolio involves placing orders and seeing the outcomes

Place a buy: Portfolio should show new stock with increased amount after transaction is made with all valid data shown. If its a stock that was not previously held, it should be added to the portfolio.

Place a sell: Portfolio should show new stock with decreased amount after transaction is made with all valid data shown. If no more of a stock, it should be removed from the portfolio.

Toggle a stock button: Portfolio should drop down and show a list of orders that corresponds to your current positions.
			
Click on quantity: Trade form should come up with quantity and ticker filled in 

Transaction History
Same as above, except that instead of toggling a stock, the toggle should be for tickets 1-10, 11-20, etc.

Place a buy: Transaction history should show ticket and information if the order was completed.

Place a sell: Transaction history should show ticket and information if the order was completed.

The transaction history should only show tickets that have been completed.

Pending Orders
Same as above, except that instead of toggling a stock, the toggle should be for tickets 1-10, 11-20, etc.

Place a buy: Transaction history should show ticket and information if the order is still pending or has expired.

Place a sell: Transaction history should show ticket and information if the order is still pending or has expired.

The transaction history should only show tickets if it is still pending or has expired.

Navigation Bar
Click on link, and the corresponding page should be loaded.

Fill out the symbol in top right corner and press "get quote":
The system should bring you to a stock query page


Stock Query Page
The corresponding stock information should be displayed as a table and a graph.

Invalid Stock: No graph should be displayed, and table should have meaningless data (i.e. price of 0.00)
Valid Stock: Graph should be displayed, and table should have data. Some values may be missing depending on whether they can be gathered from the internet
		 
Click on Buy: Trade form should be filled in with appropriate ticker
		 
		 
Invest

Click on Funds: List of public funds and details should come up

Enter invalid dollar amount: System should have error displayed

Invest in a Fund: Request should be sent to appropriate fund

Accept Investment: Cashbalance of investor should be diminished by amount and cash of fund should be increased by amount. Investment value should change according to how the fund is doing.
				   
Joining Public League

Click on Public Leagues: List of public leagues with +Join should be there

Click Join on a league: If league isn't in current portfolio, it should be now. If league already exists, no changes should be made