“Professor Slughorn, however, is perfectly happy to accept N.E.W.T. students with ‘Exceeds Expectations’ at O.W.L.” -- Minerva McGonagall (HBP9)
At the end of seventh year, each student sits a Nastily Exhausting Wizarding Test (N.E.W.T.) for each of the classes he or she takes. These are standardized tests administered by the Wizarding Examinations Authority, given at the same time and apparently in the same way that O.W.L.s are given to fifth-year students.
The testing system is the same as O.W.L.s, as are the grades:
In order to take N.E.W.T-level classes, students must pass their O.W.L.s for each of those subjects. Most Hogwarts professors will accept "Exceeds Expectations" or higher for N.E.W.T-level classes.