Bug 832123 - Seam2.3 seam-gen doesn't generate working test classes, mixes TestNG and JUnitSeamTest
Seam2.3 seam-gen doesn't generate working test classes, mixes TestNG and JUni...
Status: CLOSED DEFERRED
Product: JBoss Enterprise WFK Platform 2
Classification: JBoss
Component: Seam (Show other bugs)
2.0.0.ER8
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Marek Novotny
Marek Schmidt
Seam2.3
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-14 11:17 EDT by Marek Schmidt
Modified: 2012-06-19 04:18 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-19 04:18:16 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Marek Schmidt 2012-06-14 11:17:20 EDT
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 02:20:43 EDT
we are not supporting Test generation in seam-gen
Comment 2 Marek Schmidt 2012-06-15 02:42:56 EDT
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.