use of com.axway.ats.agent.core.threading.data.config.RangeDataConfig in project ats-framework by Axway.
the class DisabledTest_MultiThreadedActionHandlerWithParameterizedInputData method paremterizedStringWithWrapUp.
@Test
public void paremterizedStringWithWrapUp() throws Exception {
LoaderDataConfig loaderDataConfig = new LoaderDataConfig();
loaderDataConfig.addParameterConfig(new RangeDataConfig("fileName", "file{0}.txt", 1, 4));
loaderDataConfig.addParameterConfig(new RangeDataConfig("fileName", "file{0}.txt", 1, 4));
AllAtOncePattern pattern = new AllAtOncePattern(5, true);
QueueExecutionStatistics.getInstance().initActionExecutionResults("test 1");
actionHandler.executeActions("IP", "test 1", -1, actionRequests, pattern, loaderDataConfig);
assertEquals(10, ParameterizedInputActionClass.getAddedStringsCount());
//"file1.txt" one should be passed twice per method
assertEquals(4, (int) ParameterizedInputActionClass.addedStrings.get("file1.txt"));
for (int i = 2; i < 5; i++) {
assertEquals(2, (int) ParameterizedInputActionClass.addedStrings.get("file" + i + ".txt"));
}
}
use of com.axway.ats.agent.core.threading.data.config.RangeDataConfig in project ats-framework by Axway.
the class DisabledTest_MultiThreadedActionHandlerWithParameterizedInputData method paremterizedIntegerWithWrapUp.
@Test
public void paremterizedIntegerWithWrapUp() throws Exception {
LoaderDataConfig loaderDataConfig = new LoaderDataConfig();
loaderDataConfig.addParameterConfig(new RangeDataConfig("milliseconds", 1, 4));
AllAtOncePattern pattern = new AllAtOncePattern(5, true);
QueueExecutionStatistics.getInstance().initActionExecutionResults("test 1");
actionHandler.executeActions("IP", "test 1", -1, actionRequests, pattern, loaderDataConfig);
assertEquals(4, ParameterizedInputActionClass.addedLongs.size());
for (int i = 1; i < 5; i++) {
assertTrue(ParameterizedInputActionClass.addedLongs.contains(new Long(i)));
}
}
use of com.axway.ats.agent.core.threading.data.config.RangeDataConfig in project ats-framework by Axway.
the class DisabledTest_MultiThreadedActionHandlerWithParameterizedInputData method paremterizedStringDataPositive.
@Test
public void paremterizedStringDataPositive() throws Exception {
LoaderDataConfig loaderDataConfig = new LoaderDataConfig();
loaderDataConfig.addParameterConfig(new RangeDataConfig("fileName", "file{0}.txt", 1, 300));
loaderDataConfig.addParameterConfig(new RangeDataConfig("fileName", "file{0}.txt", 1, 300));
AllAtOncePattern pattern = new AllAtOncePattern(5, true);
QueueExecutionStatistics.getInstance().initActionExecutionResults("test 1");
actionHandler.executeActions("IP", "test 1", -1, actionRequests, pattern, loaderDataConfig);
assertEquals(10, ParameterizedInputActionClass.getAddedStringsCount());
for (int i = 1; i < 6; i++) {
assertEquals(2, (int) ParameterizedInputActionClass.addedStrings.get("file" + i + ".txt"));
}
}
Aggregations