Primary school pupils should not have to sit “high-pressure” tests and there should be fewer end-of-course GCSE and A-level exams, a teaching union has urged.