I have an problem while performing an ANT RUN

81 views
Skip to first unread message

Balaji Singh .Y

unread,
Jun 6, 2012, 2:00:38 PM6/6/12
to seleniu...@googlegroups.com
Hi ALL,

I am getting an error while performing an ANT run. Plz see the  error below Like " Failed to invoke @Configuration method tests."

Can please suggest me why iam getting this error and how to ruleout this error. I am Using  WebDriver + TesNG


run:
   [testng] [TestRunner] Running the tests in 'OPS LOGIN PAGE' with parallel mod
e:false
   [testng] [RunInfo] Adding method selector: org.testng.internal.XmlMethodSelec
tor@1431340 priority: 10
   [testng] [TestClass] Creating TestClass for [ClassImpl tests.OpsLoginPage]
   [testng] [TestNG] Running:
   [testng]   C:\Users\sg0206915\workspace\OPS_AUTOMATION\testng.xml
   [testng]
   [testng] [SuiteRunner] Created 1 TestRunners
   [testng] [TestRunner] Running test OPS LOGIN PAGE on 1  classes,  included gr
oups:[] excluded groups:[]
   [testng] [TestClass]
   [testng] ======
   [testng] TESTCLASS: tests.OpsLoginPage
   [testng] [TestClass] BeforeClass : tests.OpsLoginPage.testAccessOpsLoginPage(
)
   [testng] [TestClass] Test        :           tests.OpsLoginPage.testopslogin(
)
   [testng] [TestClass] Test        :           tests.OpsLoginPage.testByoHomapa
ge()
   [testng] [TestClass] Test        :           tests.OpsLoginPage.testtwo()
   [testng] [TestClass] AfterClass  : tests.OpsLoginPage.tampertest()
   [testng] [TestClass]
   [testng] ======
   [testng]
   [testng] [TestRunner] Found 3 sequential methods and 0 parallel methods
   [testng] [TestRunner] Will be run sequentially:
   [testng] [TestRunner]   tests.OpsLoginPage.testopslogin()
   [testng] [TestRunner]   tests.OpsLoginPage.testByoHomapage()
   [testng] [TestRunner]   tests.OpsLoginPage.testtwo()
   [testng] [TestRunner] ====
   [testng] [TestRunner] ===
   [testng] [TestRunner] Will be run sequentially:
   [testng]     0 <-- [Worker thread:1 priority:0 tests.OpsLoginPage.testopslogi
n()]
   [testng] [Invoker 26435810] Invoking @BeforeClass tests.OpsLoginPage.testAcce
ssOpsLoginPage()
   [testng] log4j:WARN No appenders could be found for logger (org.apache.common
s.configuration.ConfigurationUtils).
   [testng] log4j:WARN Please initialize the log4j system properly.
   [testng] FILENAME path : C:\Users\sg0206915\workspace\Exceldata\OPSDATA1.xlsx

   [testng] SUJAY : C:\Users\sg0206915\workspace\Exceldata\OPSDATA1.xlsx
   [testng] Log Out
   [testng] Failed to invoke @Configuration method tests.OpsLoginPage.testAccess
OpsLoginPage:org.openqa.selenium.remote.Command.<init>(Lorg/openqa/selenium/remo
te/SessionId;Ljava/lang/String;Ljava/util/Map;)V

   [testng]
   [testng] *********** INVOKED METHODS
   [testng]
   [testng]     tests.OpsLoginPage.testAccessOpsLoginPage() 32956236
   [testng]             tests.OpsLoginPage.testopslogin() 32956236
   [testng]
   [testng] ***********
   [testng]
   [testng] Creating C:\Users\sg0206915\workspace\OPS_AUTOMATION\test-output\OPS
_AUTOMATION\OPS LOGIN PAGE.html
   [testng] Creating C:\Users\sg0206915\workspace\OPS_AUTOMATION\test-output\OPS
_AUTOMATION\OPS LOGIN PAGE.xml
   [testng] FAILED CONFIGURATION: @BeforeClass testAccessOpsLoginPage
   [testng] java.lang.NoSuchMethodError: org.openqa.selenium.remote.Command.<ini
t>(Lorg/openqa/selenium/remote/SessionId;Ljava/lang/String;Ljava/util/Map;)V

   [testng]     at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebD
river.java:421)
   [testng]     at org.openqa.selenium.remote.RemoteWebDriver.startSession(Remot
eWebDriver.java:140)
   [testng]     at org.openqa.selenium.ie.InternetExplorerDriver.setup(InternetE
xplorerDriver.java:113)
   [testng]     at org.openqa.selenium.ie.InternetExplorerDriver.<init>(Internet
ExplorerDriver.java:52)
   [testng]     at tests.testOpsBase.initialize(testOpsBase.java:49)
   [testng]     at tests.OpsLoginPage.testAccessOpsLoginPage(OpsLoginPage.java:4
0)
   [testng]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   [testng]     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:39)
   [testng]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:25)
   [testng]     at java.lang.reflect.Method.invoke(Method.java:597)
   [testng]     at org.testng.internal.MethodInvocationHelper.invokeMethod(Metho
dInvocationHelper.java:76)
   [testng]     at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker
.java:525)
   [testng]     at org.testng.internal.Invoker.invokeConfigurations(Invoker.java
:202)
   [testng]     at org.testng.internal.Invoker.invokeConfigurations(Invoker.java
:130)
   [testng]     at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods
(TestMethodWorker.java:173)
   [testng]     at org.testng.internal.TestMethodWorker.run(TestMethodWorker.jav
a:105)
   [testng]     at org.testng.TestRunner.runWorkers(TestRunner.java:1147)
   [testng]     at org.testng.TestRunner.privateRun(TestRunner.java:749)
   [testng]     at org.testng.TestRunner.run(TestRunner.java:600)
   [testng]     at org.testng.SuiteRunner.runTest(SuiteRunner.java:317)
   [testng]     at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:312)
   [testng]     at org.testng.SuiteRunner.privateRun(SuiteRunner.java:274)
   [testng]     at org.testng.SuiteRunner.run(SuiteRunner.java:223)
   [testng]     at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:
52)
   [testng]     at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
   [testng]     at org.testng.TestNG.runSuitesSequentially(TestNG.java:1039)
   [testng]     at org.testng.TestNG.runSuitesLocally(TestNG.java:964)
   [testng]     at org.testng.TestNG.run(TestNG.java:900)
   [testng]     at org.testng.TestNG.privateMain(TestNG.java:1182)
   [testng]     at org.testng.TestNG.main(TestNG.java:1146)
   [testng]
   [testng] SKIPPED CONFIGURATION: @AfterClass tampertest
   [testng] SKIPPED: testopslogin
   [testng] SKIPPED: testByoHomapage
   [testng] SKIPPED: testtwo
   [testng]
   [testng] ===============================================
   [testng]     OPS LOGIN PAGE
   [testng]     Tests run: 3, Failures: 0, Skips: 3
   [testng]     Configuration Failures: 1, Skips: 1
   [testng] ===============================================
   [testng]
   [testng]
   [testng] ===============================================
   [testng] OPS_AUTOMATION
   [testng] Total tests run: 3, Failures: 0, Skips: 3
   [testng] Configuration Failures: 1, Skips: 1
   [testng] ===============================================
   [testng]
   [testng] Creating C:\Users\sg0206915\workspace\OPS_AUTOMATION\test-output\OPS
_AUTOMATION\toc.html
   [testng] Creating C:\Users\sg0206915\workspace\OPS_AUTOMATION\test-output\OPS
_AUTOMATION\OPS LOGIN PAGE.properties
   [testng] Creating C:\Users\sg0206915\workspace\OPS_AUTOMATION\test-output\OPS
_AUTOMATION\index.html
   [testng] Creating C:\Users\sg0206915\workspace\OPS_AUTOMATION\test-output\OPS
_AUTOMATION\main.html
   [testng] Creating C:\Users\sg0206915\workspace\OPS_AUTOMATION\test-output\OPS
_AUTOMATION\groups.html
   [testng] Creating C:\Users\sg0206915\workspace\OPS_AUTOMATION\test-output\OPS
_AUTOMATION\methods.html
   [testng] Creating C:\Users\sg0206915\workspace\OPS_AUTOMATION\test-output\OPS
_AUTOMATION\methods.html
   [testng] Creating C:\Users\sg0206915\workspace\OPS_AUTOMATION\test-output\OPS
_AUTOMATION\methods.html
   [testng] Creating C:\Users\sg0206915\workspace\OPS_AUTOMATION\test-output\OPS
_AUTOMATION\methods.html
   [testng] Creating C:\Users\sg0206915\workspace\OPS_AUTOMATION\test-output\OPS
_AUTOMATION\methods-alphabetical.html
   [testng] Creating C:\Users\sg0206915\workspace\OPS_AUTOMATION\test-output\OPS
_AUTOMATION\methods-alphabetical.html
   [testng] Creating C:\Users\sg0206915\workspace\OPS_AUTOMATION\test-output\OPS
_AUTOMATION\methods-alphabetical.html
   [testng] Creating C:\Users\sg0206915\workspace\OPS_AUTOMATION\test-output\OPS
_AUTOMATION\methods-alphabetical.html
   [testng] Creating C:\Users\sg0206915\workspace\OPS_AUTOMATION\test-output\OPS
_AUTOMATION\classes.html
   [testng] Creating C:\Users\sg0206915\workspace\OPS_AUTOMATION\test-output\OPS
_AUTOMATION\reporter-output.html
   [testng] Creating C:\Users\sg0206915\workspace\OPS_AUTOMATION\test-output\OPS
_AUTOMATION\methods-not-run.html
   [testng] Creating C:\Users\sg0206915\workspace\OPS_AUTOMATION\test-output\OPS
_AUTOMATION\testng.xml.html
   [testng] Creating C:\Users\sg0206915\workspace\OPS_AUTOMATION\test-output\ind
ex.html
   [testng] Creating C:\Users\sg0206915\workspace\OPS_AUTOMATION\test-output\jun
itreports\TEST-tests.OpsLoginPage.xml
   [testng] Creating C:\Users\sg0206915\workspace\OPS_AUTOMATION\test-output\tes
tng-failed.xml
   [testng] Creating C:\Users\sg0206915\workspace\OPS_AUTOMATION\test-output\OPS
_AUTOMATION\testng-failed.xml
   [testng] Creating C:\Users\sg0206915\workspace\OPS_AUTOMATION\test-output\tes
tng-results.xml
   [testng] The tests failed.

BUILD SUCCESSFUL
Total time: 3 seconds

With Regards,
BALAJI SINGH .Y

Tarun Kumar

unread,
Jun 7, 2012, 1:34:18 AM6/7/12
to seleniu...@googlegroups.com, balaj...@gmail.com
Are you able to execute tests from with in IDE than ant? 
If your issue is specific to TestNG than you may like to post it here - https://groups.google.com/forum/?fromgroups#!forum/testng-users

Krishnan Mahadevan

unread,
Jun 7, 2012, 1:39:14 AM6/7/12
to seleniu...@googlegroups.com
Seeing this error  java.lang.NoSuchMethodError  makes me believe that the libraries are messed up !

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/gch_WzMLdnMJ.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.

Reply all
Reply to author
Forward
0 new messages