You have to modify your ‘Test’ list after upload in order to link each new ‘Test’ to ‘Pupil’.
You can do it with the ‘Pupill’s’ unique ID or a readable text (eg last name if there are no doublons).