5 Replies Latest reply on Sep 25, 2008 2:52 AM by Cedric Beust

    How to test agains Exceptions using TestNg

    Rene Felgenträger Newbie


      i would like to do testing against an (expected) exception. According to testng doc i can use the ExpectedException-Annotation. But unfortunately this annotation isnt properly honored in my testcases. Firstly the annotation is marked as deprecated, secondly throwing the expected exception causes an assertionError.

      Does anybody know a solution?