Hi.
I'm not sure if this is really an issue since I haven't been using webflow for a long time yet. But I started testing my flows today and I'm experiencing test times I'm not used to. I have four test methods at the moment and the times are 12 seconds, 12 seconds, 5 seconds and 5 seconds (from the top).
I disabled the logger to make sure that's not part of the problem but the test times stayed the same.
My first two tests call methods so I thought I'd comment them out for testing and indeed the other two tests didn't take 12 seconds but 7 and 10.
So I can see a difference between calling a method and not calling one and also it seems to make a huge difference if the method is called near the loading of the framework.
But in the end 5 seconds for completing a simple transition is too much. I can watch flash videos faster!
Here's a part of my test file:
Does anyone have a hint to why I'm experiencing this?Code:public class ManagerFlowTest extends AbstractXmlFlowExecutionTests{ private DataManager dataManager; protected void setUp() { this.dataManager = new DataManager(); } @Override protected FlowDefinitionResource getResource( FlowDefinitionResourceFactory resourceFactory) { return resourceFactory.createFileResource( "src/main/webapp/WEB-INF/flows/manager-flow.xml"); } @Override protected void configureFlowBuilderContext(MockFlowBuilderContext builderContext) { builderContext.registerBean("dataManager", dataManager); } //takes 12 seconds public void testStartManagerFlow() { MutableAttributeMap input = new LocalAttributeMap(); MockExternalContext context = new MockExternalContext(); startFlow(input, context); assertCurrentStateEquals("manager_welcome"); } //takes 12 seconds public void testNewDossierAction(){ MockExternalContext context = new MockExternalContext(); context.setEventId("new_dossier_action"); context.setCurrentUser("testUser"); setCurrentState("manager_welcome"); resumeFlow(context); assertCurrentStateEquals("view_dossier"); } //takes 5 seconds or 7 seconds if first two tests are commented out //this is a simple transition without any actions in between, no //calls to methods or anything similar public void testAdvancedSearchAction(){ MockExternalContext context = new MockExternalContext(); context.setEventId("advanced_search_action"); setCurrentState("manager_welcome"); resumeFlow(context); assertCurrentStateEquals("advanced_search"); } //takes 5 seconds or 10 seconds if first two tests are commented out public void testDoSearchAction(){ MockExternalContext context = new MockExternalContext(); context.setEventId("do_search_action"); setCurrentState("manager_welcome"); resumeFlow(context); //runs through "do_search" action state assertCurrentStateEquals("search_results"); } }



Reply With Quote
