1 Reply Latest reply on Jul 22, 2006 5:20 PM by Andrew Bailey

    Configuration problems in seam CVS for TestNG eclipse plugin

    Andrew Bailey Newbie

      There seems to be a configuration problem for TestNG in the jboss seam CVS.

      I followed the instructions in the flash demo
      http://www.jboss.com/products/seam/EclipseCVS.html

      Downloading the Seam from CVS as the demo explains

      I installed the latest TestNG plugin for eclipse as explained in the TestNG site

      Then I tried to run the test case for the numberguess sample

      There seems to be a configuration problem.
      for example a components.xml
      exists in the WEB-INF directory of the numberguess example
      however in the trace below it says its not found.

      I saw in another post that embedded-ejb/conf should be on the classpath which it is.

      Please can someone explain what to do.

      Also it would be cool if the flash demo could be updated to explain how to do it, for others not to fall into the same trap as me.

      Thanks in advance

      Andy Bailey

      Hazlorealidad.com

      08:28:49,781 INFO [Initialization] no components.xml file found
      08:28:49,781 INFO [Initialization] reading properties from: /jndi.properties
      08:28:49,781 INFO [Initialization] initializing Seam
      08:28:49,828 INFO [Component] Component: org.jboss.seam.core.init, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Init
      08:28:49,937 INFO [Component] Component: org.jboss.seam.core.pages, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Pages
      08:28:49,953 INFO [Component] Component: events, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Events
      08:28:49,968 INFO [Component] Component: org.jboss.seam.core.manager, scope: EVENT, type: JAVA_BEAN, class: org.jboss.seam.core.Manager
      08:28:50,000 INFO [Component] Component: switcher, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.core.Switcher
      08:28:50,000 INFO [Component] Component: redirect, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.Redirect
      08:28:50,015 INFO [Component] Component: httpError, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.HttpError
      08:28:50,031 INFO [Component] Component: userPrincipal, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.UserPrincipal
      08:28:50,031 INFO [Component] Component: isUserInRole, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.IsUserInRole
      08:28:50,031 INFO [Component] Component: conversation, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.Conversation
      08:28:50,046 INFO [Component] Component: conversationList, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.core.ConversationList
      08:28:50,062 INFO [Component] Component: conversationStack, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.core.ConversationStack
      08:28:50,093 INFO [Component] Component: facesContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.FacesContext
      08:28:50,093 INFO [Component] Component: pageContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.PageContext
      08:28:50,093 INFO [Component] Component: eventContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.EventContext
      08:28:50,109 INFO [Component] Component: sessionContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.SessionContext
      08:28:50,109 INFO [Component] Component: statelessContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.StatelessContext
      08:28:50,125 INFO [Component] Component: applicationContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.ApplicationContext
      08:28:50,125 INFO [Component] Component: conversationContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.ConversationContext
      08:28:50,125 INFO [Component] Component: businessProcessContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.BusinessProcessContext
      08:28:50,140 INFO [Component] Component: locale, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.Locale
      08:28:50,140 INFO [Component] Component: messages, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.core.Messages
      08:28:50,140 INFO [Component] Component: theme, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.theme.Theme
      08:28:50,156 INFO [Component] Component: themeSelector, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.theme.ThemeSelector
      08:28:50,156 INFO [Component] Component: interpolator, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.Interpolator
      08:28:50,218 INFO [Component] Component: facesMessages, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.FacesMessages
      08:28:50,234 INFO [Component] Component: resourceBundle, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.core.ResourceBundle
      08:28:50,234 INFO [Component] Component: localeSelector, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.core.LocaleSelector
      08:28:50,250 INFO [Component] Component: uiComponent, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.UiComponent
      08:28:50,250 INFO [Component] Component: renderParameters, scope: EVENT, type: JAVA_BEAN, class: org.jboss.seam.core.RenderParameters
      08:28:50,250 INFO [Component] Component: org.jboss.seam.remoting.messaging.subscriptionRegistry, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.remoting.messaging.SubscriptionRegistry
      08:28:50,265 INFO [Component] Component: pojoCache, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.PojoCache
      08:28:50,281 INFO [Initialization] done initializing Seam
      08:28:50,312 INFO [Pages] no pages.xml file found
      FAILED: testNumberGuessLose
      java.lang.NullPointerException
      at org.jboss.seam.example.numberguess.test.NumberGuessTest$4.renderResponse(NumberGuessTest.java:124)
      at org.jboss.seam.mock.SeamTest$Script.run(SeamTest.java:266)
      at org.jboss.seam.example.numberguess.test.NumberGuessTest.testNumberGuessLose(NumberGuessTest.java:132)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:552)
      at org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
      at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
      at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
      at org.testng.TestRunner.privateRun(TestRunner.java:686)
      at org.testng.TestRunner.run(TestRunner.java:566)
      at org.testng.SuiteRunner.privateRun(SuiteRunner.java:221)
      at org.testng.SuiteRunner.run(SuiteRunner.java:145)
      at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:811)
      at org.testng.TestNG.runSuitesLocally(TestNG.java:774)
      at org.testng.TestNG.run(TestNG.java:538)
      at org.testng.eclipse.runner.RemoteTestNG.run(RemoteTestNG.java:80)
      at org.testng.eclipse.runner.RemoteTestNG.main(RemoteTestNG.java:122)

      FAILED: testNumberGuessWin
      java.lang.NullPointerException
      at org.jboss.seam.example.numberguess.test.NumberGuessTest$1.renderResponse(NumberGuessTest.java:29)
      at org.jboss.seam.mock.SeamTest$Script.run(SeamTest.java:266)
      at org.jboss.seam.example.numberguess.test.NumberGuessTest.testNumberGuessWin(NumberGuessTest.java:39)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:552)
      at org.testng.internal.Invoker.invokeMethod(Invoker.java:411)
      at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:785)
      at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
      at org.testng.TestRunner.privateRun(TestRunner.java:686)
      at org.testng.TestRunner.run(TestRunner.java:566)
      at org.testng.SuiteRunner.privateRun(SuiteRunner.java:221)
      at org.testng.SuiteRunner.run(SuiteRunner.java:145)
      at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:811)
      at org.testng.TestNG.runSuitesLocally(TestNG.java:774)
      at org.testng.TestNG.run(TestNG.java:538)
      at org.testng.eclipse.runner.RemoteTestNG.run(RemoteTestNG.java:80)
      at org.testng.eclipse.runner.RemoteTestNG.main(RemoteTestNG.java:122)


      ===============================================
      NumberGuess
      Tests run: 2, Failures: 2, Skips: 0
      ===============================================


      ===============================================
      NumberGuess
      Total tests run: 2, Failures: 2, Skips: 0
      ===============================================

      Creating c:\jbossIde\workspace\jboss-seam\toc.html
      Creating c:\jbossIde\workspace\jboss-seam\NumberGuess.properties
      Creating c:\jbossIde\workspace\jboss-seam\index.html
      Creating c:\jbossIde\workspace\jboss-seam\main.html
      Creating c:\jbossIde\workspace\jboss-seam\groups.html
      Creating c:\jbossIde\workspace\jboss-seam\methods.html
      Creating c:\jbossIde\workspace\jboss-seam\methods-alphabetical.html
      Creating c:\jbossIde\workspace\jboss-seam\classes.html
      Creating c:\jbossIde\workspace\jboss-seam\reporter-output.html
      Creating c:\jbossIde\workspace\jboss-seam\methods-not-run.html
      Creating c:\jbossIde\workspace\jboss-seam\testng-failures.xml

        • 1. Re: Configuration problems in seam CVS for TestNG eclipse pl
          Andrew Bailey Newbie

          Ive just read in the readme.txt in the numberguess
          directory that you should add the following to the source
          path of eclipse.

          examples/numberguess/src/
          examples/numberguess/resources/

          However if I then want to run the tests for a different
          example I will have to delete the above and change it for the new example.

          Another alternative I have found is to use the ant test and specify the testexample task.

          However I still havent figured out how to use right click on a test selecting the TestNG option to tun the test.