Make the test truly collaborative. Indicate that anyone can ask for help, anyone can offer help (more like a normal work environment). But indicate that credit for help is required. Put a spot by each question for "person asked" and "help given" -- that way person A has to mark "B helped me" on his test, and person B marks "I helped A." on her test. It'd be best if you can also make the questions unique. You want the help to be more than "pssst! what's the answer to number 2?"
Of course, helping someone else will also reduce the amount of time you have to complete your OWN test, so there's a certain amount of selfish time-management that has to occur as well.
You could then give a certain number of collaboration points for the test: "Person B assisted in 6 questions, and asked for assistance on 4 questions. She gets an additional 6 points, and loses 4 points - for a net gain of 2 points."
This encourages helping others, and discourages asking for help. If the names don't match up, then someone may be cheating....