Created
February 23, 2012 13:18
-
-
Save lfryc/1892743 to your computer and use it in GitHub Desktop.
Raw API proposal for Arquillian performance test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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