Bug 832123

Summary: Seam2.3 seam-gen doesn't generate working test classes, mixes TestNG and JUnitSeamTest
Product: [Retired] JBoss Enterprise WFK Platform 2 Reporter: Marek Schmidt <maschmid>
Component: SeamAssignee: Marek Novotny <mnovotny>
Status: CLOSED DEFERRED QA Contact: Marek Schmidt <maschmid>
Severity: high Docs Contact:
Priority: unspecified    
Version: 2.0.0.ER8   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: Seam2.3
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-19 08:18:16 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.