1 Reply Latest reply on Jun 26, 2012 10:52 AM by prati bha

    troubles testing with TestNG

    hicham ABAOUBIDA Newbie

      I am using Seam 2.0.1.GA. When trying to create some TestNG tests, I have this error.


      My project was generated using seam-gen, and I respected the documentation in creating TestNG tests.


      Did anyone have this error? Any help will be appreciated.


      Thanks, Hicham





      I am using Seam 2.0.1.GA. When trying to create some TestNG tests, I have this error.
      
      My project was generated using seam-gen, and I respected the documentation in creating TestNG tests.
      
      Did anyone have this error? Any help will be appreciated.
      
      Thanks, Hicham
      
      test:
         [testng] [Parser] Running:
         [testng]   C:\MeineDev\Jboss\workspace\TestSeam1\test-build\PUTest.xml
         [testng] ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Start: name=persistence.units:jar=test-build.jar,unitName=TestSeam1 state=Create
         [testng] java.lang.AssertionError
         [testng]     at org.hibernate.cfg.AnnotationBinder.getElementsToProcess(AnnotationBinder.java:802)
         [testng]     at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:651)
         [testng]     at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:501)
         [testng]     at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:282)
         [testng]     at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1115)
         [testng]     at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1195)
         [testng]     at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:149)
         [testng]     at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:814)
         [testng]     at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:412)
         [testng]     at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:126)
         [testng]     at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:259)
         [testng]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         [testng]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         [testng]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         [testng]     at java.lang.reflect.Method.invoke(Method.java:585)
         [testng]     at org.jboss.reflect.plugins.introspection.ReflectionUtils.invoke(ReflectionUtils.java:56)
         [testng]     at org.jboss.reflect.plugins.introspection.ReflectMethodInfoImpl.invoke(ReflectMethodInfoImpl.java:110)
         [testng]     at org.jboss.joinpoint.plugins.BasicMethodJoinPoint.dispatch(BasicMethodJoinPoint.java:66)
         [testng]     at org.jboss.kernel.plugins.dependency.KernelControllerContextAction$JoinpointDispatchWrapper.execute(KernelControllerContextAction.java:214)
         [testng]     at org.jboss.kernel.plugins.dependency.ExecutionWrapper.execute(ExecutionWrapper.java:45)
         [testng]     at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchExecutionWrapper(KernelControllerContextAction.java:108)
         [testng]     at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.dispatchJoinPoint(KernelControllerContextAction.java:69)
         [testng]     at org.jboss.kernel.plugins.dependency.LifecycleAction.installActionInternal(LifecycleAction.java:221)
         [testng]     at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.installAction(KernelControllerContextAction.java:135)
         [testng]     at org.jboss.kernel.plugins.dependency.KernelControllerContextAction.installAction(KernelControllerContextAction.java:46)
         [testng]     at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
         [testng]     at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
         [testng]     at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
         [testng]     at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:327)
         [testng]     at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1309)
         [testng]     at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:734)
         [testng]     at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:862)
         [testng]     at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:784)
         [testng]     at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:574)
         [testng]     at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:398)
         [testng]     at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:96)
         [testng]     at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:90)
         [testng]     at org.jboss.ejb3.MCKernelAbstraction.install(MCKernelAbstraction.java:151)
         [testng]     at org.jboss.ejb3.Ejb3Deployment.startPersistenceUnits(Ejb3Deployment.java:604)
         [testng]     at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:400)
         [testng]     at org.jboss.ejb3.deployers.EJBStage2Deployer.deploy(EJBStage2Deployer.java:53)
         [testng]     at org.jboss.ejb3.deployers.EJBStage2Deployer.deploy(EJBStage2Deployer.java:37)
         [testng]     at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:65)
         [testng]     at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
         [testng]     at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:169)
         [testng]     at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:853)
         [testng]     at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:794)
         [testng]     at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:327)
         [testng]     at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1309)
         [testng]     at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:734)
         [testng]     at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:862)
         [testng]     at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:784)
         [testng]     at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:622)
         [testng]     at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:411)
         [testng]     at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:498)
         [testng]     at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:506)
         [testng]     at org.jboss.embedded.DeploymentGroup.process(DeploymentGroup.java:127)
         [testng]     at org.jboss.embedded.Bootstrap.deployResourceBases(Bootstrap.java:289)
         [testng]     at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:15)
         [testng]     at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:1041)
         [testng]     at org.jboss.seam.mock.BaseSeamTest.startSeam(BaseSeamTest.java:935)
         [testng]     at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:923)
         [testng]     at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
         [testng]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         [testng]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         [testng]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         [testng]     at java.lang.reflect.Method.invoke(Method.java:585)
         [testng]     at org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:604)
         [testng]     at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:394)
         [testng]     at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142)
         [testng]     at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:79)
         [testng]     at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:165)
         [testng]     at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:103)
         [testng]     at org.testng.TestRunner.runWorkers(TestRunner.java:678)
         [testng]     at org.testng.TestRunner.privateRun(TestRunner.java:624)
         [testng]     at org.testng.TestRunner.run(TestRunner.java:495)
         [testng]     at org.testng.SuiteRunner.runTest(SuiteRunner.java:300)
         [testng]     at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:295)
         [testng]     at org.testng.SuiteRunner.privateRun(SuiteRunner.java:275)
         [testng]     at org.testng.SuiteRunner.run(SuiteRunner.java:190)
         [testng]     at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:792)
         [testng]     at org.testng.TestNG.runSuitesLocally(TestNG.java:765)
         [testng]     at org.testng.TestNG.run(TestNG.java:699)
         [testng]     at org.testng.TestNG.privateMain(TestNG.java:824)
         [testng]     at org.testng.TestNG.main(TestNG.java:802)
         [testng] FAILED CONFIGURATION: @BeforeClass init
         [testng] org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
         [testng] *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}
         [testng] jboss.j2ee:jar=test-build,name=RegisterAction,service=EJB3
         [testng]  -> <UNKNOWN>{Described:** UNRESOLVED Demands 'persistence.units:jar=test-build.jar,unitName=TestSeam1 **}
         [testng] *** CONTEXTS IN ERROR: Name -> Error
         [testng] persistence.units:jar=test-build.jar,unitName=TestSeam1 -> java.lang.AssertionError
         [testng] <UNKNOWN> -> ** UNRESOLVED Demands 'persistence.units:jar=test-build.jar,unitName=TestSeam1 **
         [testng]     at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:576)
         [testng]     at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:559)
         [testng]     at org.jboss.embedded.DeploymentGroup.process(DeploymentGroup.java:128)
         [testng]     at org.jboss.embedded.Bootstrap.deployResourceBases(Bootstrap.java:289)
         [testng]     at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:15)
         [testng]     at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:1041)
         [testng]     at org.jboss.seam.mock.BaseSeamTest.startSeam(BaseSeamTest.java:935)
         [testng]     at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:923)
         [testng]     at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
         [testng] ... Removed 22 stack frames
         [testng] SKIPPED CONFIGURATION: @BeforeMethod begin
         [testng] SKIPPED CONFIGURATION: @AfterMethod end
         [testng] SKIPPED CONFIGURATION: @AfterClass cleanup
         [testng] SKIPPED: testRegister
         [testng] ===============================================
         [testng]     test
         [testng]     Tests run: 1, Failures: 0, Skips: 1
         [testng]     Configuration Failures: 1, Skips: 3
         [testng] ===============================================
         [testng] ===============================================
         [testng] test
         [testng] Total tests run: 1, Failures: 0, Skips: 1
         [testng] Configuration Failures: 1, Skips: 3
         [testng] ===============================================
      BUILD SUCCESSFUL
      Total time: 8 seconds