tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gnanapandithan <>
Subject @Valid is not working in unit test cases
Date Thu, 29 Jun 2017 21:48:57 GMT
I am using TomEE 7.0.2 and developed simple JAX-RS web service . it is
working good. I did unit test using  TestNG and Arquillian. In Arquillian
@Deployment ( testable= false ) and  WARArchive deployment. using Restclient
( Jersy) I am invoking my service in unit test case and checking response
status and response object. it is working good. I have added @valid (
javax.validation) to validate my restful request. It is working good and
throwing exception when I do real time ( WAR deployed in TomEE and tested
via postman restclient)

*But When I tried with unit test case , my request is not being validated by
@valid.  please guide me how to enable @Valid in unit test case.

*I am using TomEE 7.0.2. Test NG, Arquillian and @Valid.

I will appreciate if you share any example code for my scenario  *

View this message in context:
Sent from the TomEE Users mailing list archive at

View raw message