[jboss-user] [JBoss Seam] - Re: UnitTesting and jBPM pageflow

2007-06-27 Thread trekker880
hi Can we do this unit testing using simple public static void main(). ? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4057968#4057968 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4057968

[jboss-user] [JBoss Seam] - Re: UnitTesting and jBPM pageflow

2007-06-27 Thread KnisterPeter
Do use TestNG or JUnit for testing. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4057988#4057988 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4057988 ___ jboss-user mailing list

[jboss-user] [JBoss Seam] - Re: UnitTesting and jBPM pageflow

2007-06-27 Thread trekker880
Ok. Let me clear my requirement for this pageflow. Here is somewhat i am trying to do. | public class Test{ | | public test() throws Exception{ | | | PageFlow pageflow = PageFlow.Instance(); ---Start the pageflow here--- | | And using this pageflow object i want to extract the

[jboss-user] [JBoss Seam] - Re: UnitTesting and jBPM pageflow

2007-06-27 Thread KnisterPeter
I have no idea what your use case is and no idea how to you solve your problem, but it does not sound like a unit test to me. If you want to create a unit test, extend your testclass from SeamTest which will boostrap an embedded container and the seam environment. Then do as I posted above and

[jboss-user] [JBoss Seam] - Re: UnitTesting and jBPM pageflow

2007-06-27 Thread trekker880
OK. You had put a comment on the pageflow-defintion.xml as it's not legal. I am using start-page to start my pageflow. So where i need to put the start node. I am starting my pageflow using the page rather than the start-state. |start-page name=page2 view-id=/page2.jspx |

[jboss-user] [JBoss Seam] - Re: UnitTesting and jBPM pageflow

2007-06-27 Thread KnisterPeter
This is the part of my bean: @Name(register) | @Stateful | @Scope(ScopeType.CONVERSATION) | public class RegisterBean extends Controller implements IRegister { | | private static final long serialVersionUID = 7559006461204534425L; | | @PersistenceContext(type =

[jboss-user] [JBoss Seam] - Re: UnitTesting and jBPM pageflow

2007-06-26 Thread trekker880
Sorry for the last post as the code isn't displayed properly. Here it is submit2.jpdl.xml | | pageflow-definition xmlns=http://jboss.com/products/seam/pageflow; | xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; | xsi:schemaLocation= |

[jboss-user] [JBoss Seam] - Re: UnitTesting and jBPM pageflow

2007-06-26 Thread KnisterPeter
I would think as for me your pages.xml isn't processed. Therefore you need a method in your beans annotated with @Begin(join=true, pageflow=name). This method should be called when you start your unit test in a NonFacesRequest instance. That should be all to get you running. I'll post my code

[jboss-user] [JBoss Seam] - Re: UnitTesting and jBPM pageflow

2007-06-26 Thread KnisterPeter
String id = new NonFacesRequest(/public/register.xhtml) { | | @Override | protected void renderResponse() throws Exception { | Contexts.getSessionContext().set(person, new Person()); |

[jboss-user] [JBoss Seam] - Re: UnitTesting and jBPM pageflow

2007-06-25 Thread denis-karpov
I think there is bug in testing(mock) environment (propagation of conversations with pageflow does not work) http://jira.jboss.org/jira/browse/JBSEAM-1000 View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4057265#4057265 Reply to the post :

[jboss-user] [JBoss Seam] - Re: UnitTesting and jBPM pageflow

2007-06-25 Thread KnisterPeter
BTW: Here is my pageflow definition: ?xml version=1.0 encoding=UTF-8? | pageflow-definition xmlns=http://jboss.com/products/seam/pageflow; | xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; | xsi:schemaLocation=http://jboss.com/products/seam/pageflow pageflow-1.2.xsd |

[jboss-user] [JBoss Seam] - Re: UnitTesting and jBPM pageflow

2007-06-25 Thread [EMAIL PROTECTED]
If, as Denis says, that bug exists, then it's not going to work! View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4057349#4057349 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4057349

[jboss-user] [JBoss Seam] - Re: UnitTesting and jBPM pageflow

2007-06-25 Thread KnisterPeter
Since JBSEAM-1000 does not allow be to post a comment on this I'll do this here: Here is a part of my logfile related to this problem: [DEBUG] 15:43:42.965 jsf.SeamPhaseListener - after phase: RESTORE_VIEW 1 | [DEBUG] 15:43:42.965 core.Events - Processing

[jboss-user] [JBoss Seam] - Re: UnitTesting and jBPM pageflow

2007-06-25 Thread KnisterPeter
The pageflow testing does not work for me. On subsequent requests the pageflow is lost and set to null. Below is my code. Anyone can give me a hint on how to do this the correct way? There are no examples in seam releases or even cvs. String id = new

[jboss-user] [JBoss Seam] - Re: UnitTesting and jBPM pageflow

2007-06-25 Thread KnisterPeter
Possibly this is caused by missing AbstractSeamJsfListener or ContextFilter, since test cases are not executing inside of a webapp. But both classes above call 'handleConversationPropagation' where the pageflow is validated and the conversation is restored (but I'm a noob to seam). View the

[jboss-user] [JBoss Seam] - Re: UnitTesting and jBPM pageflow

2007-06-25 Thread KnisterPeter
Nope, the phase listener is registered and called, but I don't see the method call to afterRestoreView(). View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4057371#4057371 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4057371

[jboss-user] [JBoss Seam] - Re: UnitTesting and jBPM pageflow

2007-06-25 Thread trekker880
@ knisterPeter hi i am getting the same problem. I'm also making a test class for the pageflow.Its a simple pageflow-definition Code : pageflow-definition xmlns=http://jboss.com/products/seam/pageflow; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=

[jboss-user] [JBoss Seam] - Re: UnitTesting and jBPM pageflow

2007-06-22 Thread stu2
It's definitely possible, but I don't know how to make it pretty. Here's an example from one of my tests: log.info(Begin testing initial mapping); | setViewId(MappingViewId.APPLICABLE_FIELDS.id); | invokeMethod(#{catalogMapping.beginForInitialMapping()});

[jboss-user] [JBoss Seam] - Re: UnitTesting and jBPM pageflow

2007-06-22 Thread KnisterPeter
Thanks for your help. I'll give that all a try on monday. :) View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4056997#4056997 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4056997

[jboss-user] [JBoss Seam] - Re: UnitTesting and jBPM pageflow

2007-06-22 Thread stu2
It does work, but you really have to carefully simulate the browser to make it work. Note that those methods are all in SeamTest (now no doubt in BaseSeamTest). You'll find methods there to set request parameters and other things that simulate the browser. View the original post :