$testId = $_POST['test'];
$testId will always be an array in this case, even if only one value was selected from the list. To use it in your query, you need to implode and use IN (as Dniry said).
However, because they are text values, the need to be single-quoted, so you need to end up with ... IN ('All' , 't1' , 't2') so join() or implode() with quote-comma-quote as separator and put a quote at beginiing and end ...
$testId=$_POST['test'];
$q="SELECT ....FROM table WHERE";
$testList = "'" . join("','" , $testId) . "'" ;
$where.=" AND test IN ($testList)";
....
$sql=$q.$where;
$result=mysql_query($sql)