Bug 877063

Summary: Seam 2.3 seam-gen generated project is not testable
Product: [Retired] JBoss Enterprise WFK Platform 2 Reporter: Ron Šmeral <rsmeral>
Component: SeamAssignee: Vaclav Dedik <vdedik>
Status: CLOSED CURRENTRELEASE QA Contact: Marek Schmidt <maschmid>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.1.0CC: amelicha, irooskov, kpiwko, mnovotny, snagarwa, tremes
Target Milestone: ER2   
Target Release: 2.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: Seam 2.3 seam-gen
Fixed In Version: Doc Type: Bug Fix
Doc Text:
The seam-gen SeamTest template was not properly migrated to Arquillian. As a consequence, seam-gen tests did not work. to fix this issue, seam-gen SeamTest template has been modified to properly use Arquillian. As a result of the fix, the Tests generated by seam-gen can now be run with 'ant test'.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-05-14 14:50:30 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 Ron Šmeral 2012-11-15 16:01:29 UTC
Description of problem:
Currently, the tests for a seam-gen generated project are not automatically generated correctly and not runnable.
- The SEAM_HOME/seam-gen/build.xml "test" target is commented out,
- the PROJECT/build.xml "test" target is immediately failed,
- the createDeployment methods in FormTest and ActionTest are commented out.

Version-Release number of selected component (if applicable):
WFK 2.1.0.CR2 jboss-seam-2.3.0.Final-redhat-1

How reproducible:
Generate a project with seam-gen and try to run "seam test".

Steps to Reproduce:
1. seam create-project
2. seam test
  
Actual results:
BUILD FAILED
Target "test" does not exist in the project "seam-gen".

Expected results:
The tests should be executed.

Comment 1 Marek Novotny 2012-11-15 21:04:12 UTC
it is known issue

Comment 2 mark yarborough 2012-11-19 14:47:10 UTC
Move to WFK 2.2 and release note for WFK 2.1 per 19-Nov triage call.

Comment 3 Marek Schmidt 2012-11-20 15:44:57 UTC
*** Bug 877055 has been marked as a duplicate of this bug. ***

Comment 4 Marek Novotny 2013-01-08 09:56:20 UTC
Vasek is backporting the https://issues.jboss.org/browse/JBSEAM-5034

Comment 5 Vaclav Dedik 2013-01-08 10:08:02 UTC
Done.

Comment 6 Tomas Remes 2013-02-19 13:24:39 UTC
This is still problem. Test generated for "Seam Form" or "Seam Action" still contains errors. At first there are IMO variables instead of its values e.g.:

 .addAsLibraries(@libraryList@)
String WEBAPP_SRC = "@workspaceHome@/@projectName@/test-build";
String PROJECT_HOME = "@workspaceHome@/@projectName@/";

Second problem is that when you generate these Forms or Actions for WAR project, there is no secondary ${name}Bean class. I mean that when I create FooForm.java in WAR project, there is no FooFormBean.java in this case. This causes errors too.

Comment 7 Tomas Remes 2013-02-19 14:53:05 UTC
Well ok my previous comment refers to JBDS behaviour so that's for another JBDS issue. So tests are generated ok by using seam-gen command, but the next problem is that they can't be run on EAP 6.0.1 (7.1.3.Final) because of older arquillian container version.

Comment 8 Marek Novotny 2013-02-19 14:56:24 UTC
ok, we can update the version from our WFK BOM.

Comment 9 Marek Novotny 2013-02-20 14:18:45 UTC
Here is the main issue which blocks the testing from user POV

Comment 10 Marek Novotny 2013-02-20 14:40:50 UTC
after looking into our WFK BOM *-with-tools, there is already a workaround arquillian container dependencies, but as seam-gen uses ant and downloads arquillian libs from ant script, I need to add this workaround into get-arquillian-libs.xml script too.

Comment 11 Vaclav Dedik 2013-03-04 13:05:33 UTC
Fixed: 
https://source.jboss.org/changelog/Seam?cs=15437

Comment 13 Marek Schmidt 2013-03-18 09:05:18 UTC
Verified on WFK 2.2.0.ER2

filed other issues with seam-gen test:

https://bugzilla.redhat.com/show_bug.cgi?id=922051 Seam2.3 seam-gen generated JUnitSeamTest deployment should use org.jboss.seam.mock.MockSeamListener instead of the SeamListener.
https://bugzilla.redhat.com/show_bug.cgi?id=922049 Seam2.3 seam-gen resources-test/arquillian.xml not used

Comment 14 Sneha 2013-03-21 09:25:20 UTC
Doc Text updated.

Comment 16 Karel Piwko 2013-05-14 14:50:30 UTC
Closed as CURRENTRELEASE, part of WFK 2.2.0 distributables.