This content has been marked as final.
Show 1 reply
-
1. Re: Mixed mode for test setup/execution
kwintesencja Sep 29, 2013 10:02 AM (in response to eldaryus)Hi there,
have you setup RestProvider? for testing in JbossAS i have this:
@BeforeClass
public static void initClass() {
//rest provider
ResteasyProviderFactory providerFactory = ResteasyProviderFactory.getInstance();
RegisterBuiltin.register(providerFactory);
}
@Test
@RunAsClient
public void shouldBeAbleToQueryRestResource(@ArquillianResource URL contextPath) {
ClientRequest request = new ClientRequest(contextPath+"rest/resource/");
request.accept(MediaType.APPLICATION_JSON);
ClientResponse<String> response = request.get(String.class);
Assert.assertEquals(200, response.getStatus());
}
my deployment is marked as testable=true.
for more advanced client testing you may a look at Warp extension
I hope that helps