Bug 832123 - Seam2.3 seam-gen doesn't generate working test classes, mixes TestNG and JUnitSeamTest
Summary: Seam2.3 seam-gen doesn't generate working test classes, mixes TestNG and JUni...
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: JBoss Enterprise WFK Platform 2
Classification: Retired
Component: Seam
Version: 2.0.0.ER8
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Marek Novotny
QA Contact: Marek Schmidt
URL:
Whiteboard: Seam2.3
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-06-14 15:17 UTC by Marek Schmidt
Modified: 2012-06-19 08:18 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-19 08:18:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Marek Schmidt 2012-06-14 15:17:20 UTC
Description of problem:

Seam2.3 seam-gen doesn't generate working test classes with "seam new-action" or "seam new-form". The new-action generates test that mixes TestNG and JUnitSeamTest:

package com.mydomain.myproject.test;

import org.testng.annotations.Test;
import org.jboss.seam.mock.JUnitSeamTest;

public class FooActionTest extends JUnitSeamTest {

    @Test
    public void test_fooAction() throws Exception {
        new FacesRequest("/fooAction.xhtml") {
            @Override
            protected void invokeApplication() {
                //call action methods here
                invokeMethod("#{fooAction.fooAction}");
            }
        }.run();
    }
}

(note that this still won't work as the arquillian annotations and the deployment method is missing)

also, the src/test/readme.txt file in the generated project still mentions TestNG and JBoss Embedded.

Comment 1 Marek Novotny 2012-06-15 06:20:43 UTC
we are not supporting Test generation in seam-gen

Comment 2 Marek Schmidt 2012-06-15 06:42:56 UTC
It would probably be better if no tests were generated then.


Note You need to log in before you can comment on or make changes to this bug.