We extend the classical Neyman-Pearson theory for testing composite hypotheses versus composite alternatives, using a convex duality approach as in Witting (1985). Results of Aubin & Ekeland (1984) from non-smooth convex analysis are employed, along with a theorem of Komll os (1967), in order to establish the existence of a max-min optimal test and to investigate its properties. The theory is i...