Skip to content

Instantly share code, notes, and snippets.

@lfryc
Created February 23, 2012 13:18
Show Gist options
  • Save lfryc/1892743 to your computer and use it in GitHub Desktop.
Save lfryc/1892743 to your computer and use it in GitHub Desktop.
Raw API proposal for Arquillian performance test
@RunWith(Arquillian.class)
public void PerformanceTestCase {
@Deployment
...
@Resource
HttpClient client;
@Client
public HttpResponse test_performance(HttpResponse previousResponse) {
HttpResponse response;
if (previousResponse == null) {
HttpResponse response = client.sendReqest(initialParameters);
} else {
Parameters newParameters = transformResponseToNewParameters(previousResponse);
HttpResponse response = client.sendReqest(newParameters);
}
assertTrue(response.contains(...));
return response;
}
@Controller(StressController.class)
public class MyStressController {
@BeforeDeploy
...
@AfterWarmup
...
public void collectData(@Observe PerformanceData data) {
...
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment