Squash TA / selenium / Eclipse problem

Bastien
Messages : 9
Inscription : jeu. sept. 01, 2016 12:00 pm

Squash TA / selenium / Eclipse problem

Message par Bastien »

Yes.
This is the content of my ".project" file

[code]

my.squash.ta.project





org.eclipse.m2e.core.maven2Builder





org.eclipse.m2e.core.maven2Nature

[/code]
sdo2
Messages : 14
Inscription : ven. août 12, 2016 8:07 am

Squash TA / selenium / Eclipse problem

Message par sdo2 »

thank you,
Already I notice that the file is not complete.
  replaces its contents and after you restarted eclipse:



my.squash.ta.project





org.eclipse.jdt.core.javabuilder


org.eclipse.m2e.core.maven2Builder



org.eclipse.jdt.core.javanature
org.eclipse.m2e.core.maven2Nature

Bastien
Messages : 9
Inscription : jeu. sept. 01, 2016 12:00 pm

Squash TA / selenium / Eclipse problem

Message par Bastien »

I changed my .project and i had some errors in my workspace.
I had to add some libraries (selenium ...) to correct errors.

But i still have the same error :

[code][INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building my.squash.ta.project 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- squash-ta-maven-plugin:1.9.0-RELEASE:run (default-cli) @ my.squash.ta.project ---
[WARN] Per maven bug #MNG5787, re-adding filtered artifact URL: file:/D:/Users/bdufau/.m2/repository/javax/inject/javax.inject/1/javax.inject-1.jar
[WARN] Per maven bug #MNG5787, re-adding filtered artifact URL: file:/D:/Users/bdufau/.m2/repository/org/slf4j/slf4j-api/1.7.5/slf4j-api-1.7.5.jar
[WARN] Applied Maven 3.3.x fix
[INFO] Squash TA : compiling tests...
[INFO] Squash TA : initializing context...
[INFO] Listing sqhashTA engine component packages
[INFO] Loading plugin configuration for: org.squashtest.ta.enginecore
[INFO] Loading plugin configuration for: org.squashtest.ta.plugin.commons-component
[INFO] Loading plugin configuration for: org.squashtest.ta.plugin.filechecker
[INFO] Loading plugin configuration for: org.squashtest.ta.plugin.sahi
[INFO] Loading plugin configuration for: org.squashtest.ta.plugin.soapui
[INFO] Loading plugin configuration for: org.squashtest.ta.plugin.selenium
[INFO] Loading plugin configuration for: org.squashtest.ta.plugin.ftp
[INFO] Loading plugin configuration for: org.squashtest.ta.plugin.db
[INFO] Loading plugin configuration for: org.squashtest.ta.plugin.ssh
[INFO] Loading plugin configuration for: org.squashtest.ta.plugin.local.process
sept. 06, 2016 5:36:23 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFOS: Loading XML bean definitions from Byte array resource [Computed squashTA engine configuration]
sept. 06, 2016 5:36:23 PM org.springframework.context.support.GenericXmlApplicationContext prepareRefresh
INFOS: Refreshing org.springframework.context.support.GenericXmlApplicationContext@782bf610: startup date [Tue Sep 06 17:36:23 CEST 2016]; root of context hierarchy
sept. 06, 2016 5:36:23 PM org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor
INFOS: JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
[WARN] The endpoint URL is set to its default value: "file://dev/null", so the call back is not activated
[INFO] Squash TA : testing...
[INFO] Beginning execution of ecosystem tests
[INFO] Beginning execution of test montest.ta
[ERROR] It must have java sources in a java subdirectory in resources directory
[ERROR] Test Automation Engine error (non SUT) : method 'convert' from engine component of class 'org.squashtest.ta.plugin.commons.converter.FileToJavaCodeBundle' with argument 'org.squashtest.ta.framework.components.FileResource' has thrown an exception.
org.squashtest.ta.framework.exception.BadDataException: Java code compilation failed:

at org.squashtest.ta.plugin.commons.converter.FileToJavaCodeBundle.convert(FileToJavaCodeBundle.java:111)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.squashtest.ta.backbone.tools.ReflectionUtils.invoke(ReflectionUtils.java:252)
at org.squashtest.ta.backbone.engine.wrapper.ResourceConverterHandler.convert(ResourceConverterHandler.java:106)
at org.squashtest.ta.backbone.engine.instructionrunner.DefaultConvertResourceRunner.applyConverter(DefaultConvertResourceRunner.java:130)
at org.squashtest.ta.backbone.engine.instructionrunner.DefaultConvertResourceRunner.convertResource(DefaultConvertResourceRunner.java:94)
at org.squashtest.ta.backbone.engine.instructionrunner.DefaultConvertResourceRunner.doRun(DefaultConvertResourceRunner.java:54)
at org.squashtest.ta.backbone.engine.instructionrunner.AbstractDefaultInstructionRunner.run(AbstractDefaultInstructionRunner.java:69)
at org.squashtest.ta.backbone.engine.impl.TestRunnerImpl.runInstruction(TestRunnerImpl.java:203)
at org.squashtest.ta.backbone.engine.impl.TestRunnerImpl.runInstructionList(TestRunnerImpl.java:148)
at org.squashtest.ta.backbone.engine.impl.TestRunnerImpl.runMetaInstruction(TestRunnerImpl.java:172)
at org.squashtest.ta.backbone.engine.impl.TestRunnerImpl.runInstructionList(TestRunnerImpl.java:146)
at org.squashtest.ta.backbone.engine.impl.TestRunnerImpl.runPhase(TestRunnerImpl.java:136)
at org.squashtest.ta.backbone.engine.impl.TestRunnerImpl.runTest(TestRunnerImpl.java:107)
at org.squashtest.ta.backbone.engine.impl.EcosystemRunnerImpl.runAllTests(EcosystemRunnerImpl.java:202)
at org.squashtest.ta.backbone.engine.impl.EcosystemRunnerImpl.run(EcosystemRunnerImpl.java:104)
at org.squashtest.ta.backbone.engine.impl.SuiteRunnerImpl.execute(SuiteRunnerImpl.java:68)
at org.squashtest.ta.backbone.engine.impl.EngineImpl.execute(EngineImpl.java:63)
at org.squashtest.ta.maven.SquashTAMojo.executeImpl(SquashTAMojo.java:367)
at org.squashtest.ta.maven.AbstractSquashTaMojo.execution(AbstractSquashTaMojo.java:85)
at org.squashtest.ta.maven.AbstractBaseSquashTaMojo.execute(AbstractBaseSquashTaMojo.java:147)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[ERROR] The execution raised an error in the TEST phase of the TA script 'montest.ta' with the message: 'Test Automation Engine error (non SUT) : method 'convert' from engine component of class 'org.squashtest.ta.plugin.commons.converter.FileToJavaCodeBundle' with argument 'org.squashtest.ta.framework.components.FileResource' has thrown an exception.'.
[INFO] Exporting results
[INFO] Cleaning resources
[INFO] Squash TA : build complete.
[INFO] All the files from D:\Users\bdufau\AppData\Local\Temp\Squash_TA were properly deleted.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.590 s
[INFO] Finished at: 2016-09-06T17:36:25+02:00
[INFO] Final Memory: 24M/270M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.squashtest.ta:squash-ta-maven-plugin:1.9.0-RELEASE:run (default-cli) on project my.squash.ta.project: Build failure : there are tests failures
[ERROR] Test statistics : 1 test runs, 0 passed, 1 tests didn't pass
[ERROR] Tests failed / crashed :
[ERROR] -----------
[ERROR] tests:
[ERROR] ==> montest.ta
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/disp ... eException
[/code]

[b]My test is like that :[/b]
[code]// lines prefixed with double slashes count as commentary.
// the following test will just load a file during the setup phase
// and make it available in the test context. Read the documentation
// to know more about scripting.


SETUP :

TEST :

# EXECUTE_SELENIUM2 selenium WITH MAIN CLASS squashTA.resources.selenium.java.mytest


TEARDOWN :[/code]



[attachment=389]hierarchy-2.png[/attachment]
Pièces jointes
hierarchy-2.png
hierarchy-2.png (13.84 Kio) Consulté 3989 fois
sdo2
Messages : 14
Inscription : ven. août 12, 2016 8:07 am

Squash TA / selenium / Eclipse problem

Message par sdo2 »

Hello,
Verified that you have your project in the source tab of java builder.

and if its not working you can send me your project I check in what his normally should work.
Bastien
Messages : 9
Inscription : jeu. sept. 01, 2016 12:00 pm

Squash TA / selenium / Eclipse problem

Message par Bastien »

Hello,

Here is my project
Pièces jointes
my.squash.ta.project.zip
(47.49 Kio) Téléchargé 167 fois
sdo2
Messages : 14
Inscription : ven. août 12, 2016 8:07 am

Squash TA / selenium / Eclipse problem

Message par sdo2 »

Hello,
here is your corrected project.

When I verified your project I found that even your class was well defined in your project more was not possible all outbuildings.

Note:
You must install firefox 12.
In your file MonTest.java
change the final line dossierPath String = "/usr/bin/firefox"; by specifying the path of the binary firefox.

cordially





[attachment=393]my.squash.ta.project.zip[/attachment]
Pièces jointes
my.squash.ta.project.zip
(10.52 Kio) Téléchargé 160 fois
diego1809
Messages : 1
Inscription : mar. nov. 07, 2017 6:32 pm

Squash TA / selenium / Eclipse problem

Message par diego1809 »

Buena tarde, yo tengo el mismo inconveniente revise los archivos y trate de reemplazarlos, pero no funciona aun persiste el error, me pueden ayudar por favor.
sekhar75
Messages : 1
Inscription : jeu. nov. 09, 2017 11:47 am

Squash TA / selenium / Eclipse problem

Message par sekhar75 »

Thanks.
Pankaj
Messages : 15
Inscription : mar. mars 13, 2018 9:26 am

Squash TA / selenium / Eclipse problem

Message par Pankaj »

I am facing same issue,

I tried everything you have mentioned here. I changed .project file too. but still facing the same issue.

Please help me out.
Pankaj
Messages : 15
Inscription : mar. mars 13, 2018 9:26 am

Squash TA / selenium / Eclipse problem

Message par Pankaj »

followed these steps, still facing the same issue.
I have changed .project file too..but no luck.
Please find below logs.

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building testProject 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- squash-ta-maven-plugin:1.9.0-RELEASE:run (default-cli) @ testProject ---
[WARN] Per maven bug #MNG5787, re-adding filtered artifact URL: file:/C:/Users/User1/.m2/repository/javax/inject/javax.inject/1/javax.inject-1.jar
[WARN] Per maven bug #MNG5787, re-adding filtered artifact URL: file:/C:/Users/User1/.m2/repository/org/slf4j/slf4j-api/1.7.5/slf4j-api-1.7.5.jar
[WARN] Applied Maven 3.3.x fix
[INFO] Squash TA : compiling tests...
[INFO] Squash TA : initializing context...
[INFO] Listing sqhashTA engine component packages
[INFO] Loading plugin configuration for: org.squashtest.ta.enginecore
[INFO] Loading plugin configuration for: org.squashtest.ta.plugin.commons-component
[INFO] Loading plugin configuration for: org.squashtest.ta.plugin.filechecker
[INFO] Loading plugin configuration for: org.squashtest.ta.plugin.sahi
[INFO] Loading plugin configuration for: org.squashtest.ta.plugin.soapui
[INFO] Loading plugin configuration for: org.squashtest.ta.plugin.selenium
[INFO] Loading plugin configuration for: org.squashtest.ta.plugin.ftp
[INFO] Loading plugin configuration for: org.squashtest.ta.plugin.db
[INFO] Loading plugin configuration for: org.squashtest.ta.plugin.ssh
[INFO] Loading plugin configuration for: org.squashtest.ta.plugin.local.process
Mar 19, 2018 6:13:03 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from Byte array resource [Computed squashTA engine configuration]
Mar 19, 2018 6:13:04 PM org.springframework.context.support.GenericXmlApplicationContext prepareRefresh
INFO: Refreshing org.springframework.context.support.GenericXmlApplicationContext@8f2098e: startup date [Mon Mar 19 18:13:04 IST 2018]; root of context hierarchy
Mar 19, 2018 6:13:04 PM org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor
INFO: JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
[WARN] The endpoint URL is set to its default value: "file://dev/null", so the call back is not activated
[INFO] Squash TA : testing...
[INFO] Beginning execution of ecosystem tests
[INFO] Beginning execution of test abc.ta
[ERROR] It must have java sources in a java subdirectory in resources directory
[ERROR] Test Automation Engine error (non SUT) : method 'convert' from engine component of class 'org.squashtest.ta.plugin.commons.converter.FileToJavaCodeBundle' with argument 'org.squashtest.ta.framework.components.FileResource' has thrown an exception.
org.squashtest.ta.framework.exception.BadDataException: Java code compilation failed:

at org.squashtest.ta.plugin.commons.converter.FileToJavaCodeBundle.convert(FileToJavaCodeBundle.java:111)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.squashtest.ta.backbone.tools.ReflectionUtils.invoke(ReflectionUtils.java:252)
at org.squashtest.ta.backbone.engine.wrapper.ResourceConverterHandler.convert(ResourceConverterHandler.java:106)
at org.squashtest.ta.backbone.engine.instructionrunner.DefaultConvertResourceRunner.applyConverter(DefaultConvertResourceRunner.java:130)
at org.squashtest.ta.backbone.engine.instructionrunner.DefaultConvertResourceRunner.convertResource(DefaultConvertResourceRunner.java:94)
at org.squashtest.ta.backbone.engine.instructionrunner.DefaultConvertResourceRunner.doRun(DefaultConvertResourceRunner.java:54)
at org.squashtest.ta.backbone.engine.instructionrunner.AbstractDefaultInstructionRunner.run(AbstractDefaultInstructionRunner.java:69)
at org.squashtest.ta.backbone.engine.impl.TestRunnerImpl.runInstruction(TestRunnerImpl.java:203)
at org.squashtest.ta.backbone.engine.impl.TestRunnerImpl.runInstructionList(TestRunnerImpl.java:148)
at org.squashtest.ta.backbone.engine.impl.TestRunnerImpl.runMetaInstruction(TestRunnerImpl.java:172)
at org.squashtest.ta.backbone.engine.impl.TestRunnerImpl.runInstructionList(TestRunnerImpl.java:146)
at org.squashtest.ta.backbone.engine.impl.TestRunnerImpl.runPhase(TestRunnerImpl.java:136)
at org.squashtest.ta.backbone.engine.impl.TestRunnerImpl.runTest(TestRunnerImpl.java:107)
at org.squashtest.ta.backbone.engine.impl.EcosystemRunnerImpl.runAllTests(EcosystemRunnerImpl.java:202)
at org.squashtest.ta.backbone.engine.impl.EcosystemRunnerImpl.run(EcosystemRunnerImpl.java:104)
at org.squashtest.ta.backbone.engine.impl.SuiteRunnerImpl.execute(SuiteRunnerImpl.java:68)
at org.squashtest.ta.backbone.engine.impl.EngineImpl.execute(EngineImpl.java:63)
at org.squashtest.ta.maven.SquashTAMojo.executeImpl(SquashTAMojo.java:367)
at org.squashtest.ta.maven.AbstractSquashTaMojo.execution(AbstractSquashTaMojo.java:85)
at org.squashtest.ta.maven.AbstractBaseSquashTaMojo.execute(AbstractBaseSquashTaMojo.java:147)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
[ERROR] The execution raised an error in the TEST phase of the TA script 'abc.ta' with the message: 'Test Automation Engine error (non SUT) : method 'convert' from engine component of class 'org.squashtest.ta.plugin.commons.converter.FileToJavaCodeBundle' with argument 'org.squashtest.ta.framework.components.FileResource' has thrown an exception.'.
[INFO] Exporting results
[INFO] Cleaning resources
[INFO] Squash TA : build complete.
[INFO] All the files from C:\Users\User1\AppData\Local\Temp\Squash_TA were properly deleted.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.475 s
[INFO] Finished at: 2018-03-19T18:13:05+05:30
[INFO] Final Memory: 24M/221M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.squashtest.ta:squash-ta-maven-plugin:1.9.0-RELEASE:run (default-cli) on project testProject: Build failure : there are tests failures
[ERROR] Test statistics : 1 test runs, 0 passed, 1 tests didn't pass
[ERROR] Tests failed / crashed :
[ERROR] -----------
[ERROR] tests:
[ERROR] ==> abc.ta
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/disp ... eException
Répondre

Revenir à « Selenium Plugin »