TESTSUITE FOR TRIBLER
=====================

The test suite technically consists of two groups: tests that can be run
by a single python interpreter, one after another, and tests that require
a fresh python interpreter to prevent problems with singleton classes,
threads and listen ports. The former group is tested in one blow by running 
test_all_single_python.py (see below), for the other groups there are
separate shell scripts, and you'll see "Run XXX" instructions for those.

Description of tests
--------------------

Feature: Simple Merkle Hashes

	Create various hashtrees. For each tree, check that the 
	set of hashes returned is correct for each piece.
	
	Create a Merkle torrent. Test that our code correctly reads it.

Feature: PermIDs

	Start a Tribler client, open a socket to it, and test whether
	it accepts various valid and invalid CHALLENGE messages.
	
	Test RESPONSE1
	
	Test RESPONSE2


Feature: Megacaches/CacheDB

	Jie already made a test suite for this.

Feature: SecureOverlay

	Write a client and a server that use the SecureOverlay API. 
	Let them exchange messages. In particular:
	* Test what happens when connections are dropped. Do messages get lost?
	* Test what happens when the server is down and the client sends.

Feature: Download Helper

	Start a Tribler client, connect to it via the SecureOverlay API.
	* Test whether it accepts valid and invalid ASK_FOR_HELP,
	RESERVE_PIECES, PIECES_RESERVED and STOP_DOWNLOAD_HELP messages.
	* Test whether the client always stops helping on a STOP_DOWNLOAD_HELP
	in various situations.

  Run
       $ test_dlhelp.sh


Feature: BuddyCast

	Start a Tribler client, connect to it via the SecureOverlay API.
	* Test whether it accepts valid and invalid BUDDYCAST messages.
	
	Jie already has a test suite for testing the Buddycast algorithm.
	
	
Feature: SecureOverlay V3

	Run 
		$ test_secure_overlay.sh
		
Feature: Dialback Message

	Run
		$ test_dialback_reply_active.sh
		$ test_dialback_conn_handler.sh		

Feature: Remote Query

    Run 
        $ test_rquery_reply_active.sh
        
Feature: uTorrent Peer Exchange

    Part of test_all_single_python.py


Running
-------

To run the full test suite, run

$ test.sh

from the this test dir. This calls test_all_single_python.py 
and all separate shell scripts.

Arno Bakker, 2007-08-15
