Quantcast

[testng-dev] TestNG ant task throws exception: ava.util.ServiceConfigurationError: org. testng.ITestNGListener: Provider test.serviceloader.TmpSuiteListener not found

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[testng-dev] TestNG ant task throws exception: ava.util.ServiceConfigurationError: org. testng.ITestNGListener: Provider test.serviceloader.TmpSuiteListener not found

Pavel Gouchtchine
On attempt to run testng tests from ant build file, TestNG throws exception - see below.
Please help!!

An example project that includes my build.xml and suite file is here:
https://drive.google.com/file/d/0B2Oj5VU5ZPzDQloycTFzX0hVTVk/edit?usp=sharing
(it contains testng 6.8 library i am using)
The command line to execute:

c:\java\verifyanttestng>
c:\java\verifyanttestng>ant -DsuiteName=TestCalculator.xml
Buildfile: c:\java\verifyanttestng\build.xml

init:
   [delete] Deleting directory c:\java\verifyanttestng\bin
    [mkdir] Created dir: c:\java\verifyanttestng\bin
   [delete] Deleting directory c:\java\verifyanttestng\test-output
    [mkdir] Created dir: c:\java\verifyanttestng\test-output

compile:
    [javac] Compiling 2 source files to c:\java\verifyanttestng\bin

Run_Suite:
     [echo] ${browser}
     [echo] ./test_suites/TestCalculator.xml
   [testng] Exception in thread "main" java.util.ServiceConfigurationError: org.
testng.ITestNGListener: Provider test.serviceloader.TmpSuiteListener not found
   [testng]     at java.util.ServiceLoader.fail(ServiceLoader.java:239)
   [testng]     at java.util.ServiceLoader.access$300(ServiceLoader.java:185)
   [testng]     at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoade
r.java:372)
   [testng]     at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:
404)
   [testng]     at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
   [testng]     at org.testng.TestNG.addServiceLoaderListeners(TestNG.java:956)
   [testng]     at org.testng.TestNG.initializeConfiguration(TestNG.java:891)
   [testng]     at org.testng.TestNG.run(TestNG.java:1005)
   [testng]     at org.testng.TestNG.privateMain(TestNG.java:1338)
   [testng]     at org.testng.TestNG.main(TestNG.java:1307)

BUILD FAILED
c:\java\verifyanttestng\build.xml:43: The tests failed.

Total time: 2 seconds

c:\java\verifyanttestng>

--
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-dev.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[testng-dev] Re: TestNG ant task throws exception: ava.util.ServiceConfigurationError: org. testng.ITestNGListener: Provider test.serviceloader.TmpSuiteListener not found

Neeraj Lad
HI ,

Any update on this error ?

following is my ant file

i have replaced  "< and >" to "[ and ]"


[project name="TestNGTest" default="run" basedir="."]
[!-- Define [testng] task --]
  [taskdef name="testng" classname="org.testng.TestNGAntTask"]
    [classpath]
      [pathelement location="lib/testng-6.8/testng-6.8.jar"/]
    [/classpath]
  [/taskdef]
   [property name="testdir" location="build" /]
   [property name="srcdir" location="src" /]
   [property name="libdir" location="lib" /]
   [property name="full-compile" value="true" /]
   [path id="classpath.base"/]
   [path id="classpath.build"]
       [fileset dir="${libdir}"]
         [include name="**/*.jar" /]
      [/fileset]
      [pathelement location="${testdir}" /]
      [pathelement location="${srcdir}" /]
      [path refid="classpath.base" /]
   [/path]
   [target name="clean" ]
      [delete verbose="${full-compile}"]
         [fileset dir="${testdir}" includes="**/*.class" /]
      [/delete]
   [/target]
   [target name="compile" depends="clean"]
      [javac srcdir="${srcdir}" destdir="${testdir}" 
         verbose="${full-compile}"]
         [classpath refid="classpath.build"/]
      [/javac]
   [/target]
   [target name="run" depends="compile"]
[testng outputdir="${testdir}" classpathref="classpath.build"] 
      [xmlfileset dir="./suites" includes="AllFlows.xml"/] 
    [/testng]
   [/target]
[/project]

run:
   [testng] Exception in thread "main" java.util.ServiceConfigurationError: org.testng.ITestNGListener: Provider test.serviceloader.TmpSuiteListener not found
   [testng]     at java.util.ServiceLoader.fail(Unknown Source)
   [testng]     at java.util.ServiceLoader.access$300(Unknown Source)
   [testng]     at java.util.ServiceLoader$LazyIterator.next(Unknown Source)
   [testng]     at java.util.ServiceLoader$1.next(Unknown Source)
   [testng]     at org.testng.TestNG.addServiceLoaderListeners(TestNG.java:961)
   [testng]     at org.testng.TestNG.initializeConfiguration(TestNG.java:896)
   [testng]     at org.testng.TestNG.run(TestNG.java:1031)
   [testng]     at org.testng.TestNG.privateMain(TestNG.java:1364)
   [testng]     at org.testng.TestNG.main(TestNG.java:1333)
   [testng] The tests failed.

BUILD SUCCESSFUL
Total time: 4 seconds

I tried your sharing build file but got same problem. 

Please let me know if any solution you found.

Thanks


On Sunday, July 6, 2014 8:30:03 AM UTC+5:30, Pavel Gouchtchine wrote:
On attempt to run testng tests from ant build file, TestNG throws exception - see below.
Please help!!

An example project that includes my build.xml and suite file is here:
<a href="https://drive.google.com/file/d/0B2Oj5VU5ZPzDQloycTFzX0hVTVk/edit?usp=sharing" target="_blank" onmousedown="this.href='https://drive.google.com/file/d/0B2Oj5VU5ZPzDQloycTFzX0hVTVk/edit?usp\75sharing';return true;" onclick="this.href='https://drive.google.com/file/d/0B2Oj5VU5ZPzDQloycTFzX0hVTVk/edit?usp\75sharing';return true;">https://drive.google.com/file/d/0B2Oj5VU5ZPzDQloycTFzX0hVTVk/edit?usp=sharing
(it contains testng 6.8 library i am using)
The command line to execute:

c:\java\verifyanttestng>
c:\java\verifyanttestng>ant -DsuiteName=TestCalculator.xml
Buildfile: c:\java\verifyanttestng\build.xml

init:
   [delete] Deleting directory c:\java\verifyanttestng\bin
    [mkdir] Created dir: c:\java\verifyanttestng\bin
   [delete] Deleting directory c:\java\verifyanttestng\test-output
    [mkdir] Created dir: c:\java\verifyanttestng\test-output

compile:
    [javac] Compiling 2 source files to c:\java\verifyanttestng\bin

Run_Suite:
     [echo] ${browser}
     [echo] ./test_suites/TestCalculator.xml
   [testng] Exception in thread "main" java.util.ServiceConfigurationError: org.
testng.ITestNGListener: Provider test.serviceloader.TmpSuiteListener not found
   [testng]     at java.util.ServiceLoader.fail(ServiceLoader.java:239)
   [testng]     at java.util.ServiceLoader.access$300(ServiceLoader.java:185)
   [testng]     at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoade
r.java:372)
   [testng]     at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:
404)
   [testng]     at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
   [testng]     at org.testng.TestNG.addServiceLoaderListeners(TestNG.java:956)
   [testng]     at org.testng.TestNG.initializeConfiguration(TestNG.java:891)
   [testng]     at org.testng.TestNG.run(TestNG.java:1005)
   [testng]     at org.testng.TestNG.privateMain(TestNG.java:1338)
   [testng]     at org.testng.TestNG.main(TestNG.java:1307)

BUILD FAILED
c:\java\verifyanttestng\build.xml:43: The tests failed.

Total time: 2 seconds

c:\java\verifyanttestng>

--
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-dev.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[testng-dev] Re: TestNG ant task throws exception: ava.util.ServiceConfigurationError: org. testng.ITestNGListener: Provider test.serviceloader.TmpSuiteListener not found

Scott Babcock
In reply to this post by Pavel Gouchtchine
From the exception, it appears that you've declared a listener (test.serviceloader.TmpSuiteListener) to be loaded by the ServiceLoader, but the specified listener class isn't on the class path. Check out http://testng.org/doc/documentation-main.html#listeners-service-loader for details.

On Saturday, July 5, 2014 at 8:00:03 PM UTC-7, Pavel Gouchtchine wrote:
On attempt to run testng tests from ant build file, TestNG throws exception - see below.
Please help!!

An example project that includes my build.xml and suite file is here:
<a href="https://drive.google.com/file/d/0B2Oj5VU5ZPzDQloycTFzX0hVTVk/edit?usp=sharing" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://drive.google.com/file/d/0B2Oj5VU5ZPzDQloycTFzX0hVTVk/edit?usp\x3dsharing&#39;;return true;" onclick="this.href=&#39;https://drive.google.com/file/d/0B2Oj5VU5ZPzDQloycTFzX0hVTVk/edit?usp\x3dsharing&#39;;return true;">https://drive.google.com/file/d/0B2Oj5VU5ZPzDQloycTFzX0hVTVk/edit?usp=sharing
(it contains testng 6.8 library i am using)
The command line to execute:

c:\java\verifyanttestng>
c:\java\verifyanttestng>ant -DsuiteName=TestCalculator.xml
Buildfile: c:\java\verifyanttestng\build.xml

init:
   [delete] Deleting directory c:\java\verifyanttestng\bin
    [mkdir] Created dir: c:\java\verifyanttestng\bin
   [delete] Deleting directory c:\java\verifyanttestng\test-output
    [mkdir] Created dir: c:\java\verifyanttestng\test-output

compile:
    [javac] Compiling 2 source files to c:\java\verifyanttestng\bin

Run_Suite:
     [echo] ${browser}
     [echo] ./test_suites/TestCalculator.xml
   [testng] Exception in thread "main" java.util.ServiceConfigurationError: org.
testng.ITestNGListener: Provider test.serviceloader.TmpSuiteListener not found
   [testng]     at java.util.ServiceLoader.fail(ServiceLoader.java:239)
   [testng]     at java.util.ServiceLoader.access$300(ServiceLoader.java:185)
   [testng]     at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoade
r.java:372)
   [testng]     at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:
404)
   [testng]     at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
   [testng]     at org.testng.TestNG.addServiceLoaderListeners(TestNG.java:956)
   [testng]     at org.testng.TestNG.initializeConfiguration(TestNG.java:891)
   [testng]     at org.testng.TestNG.run(TestNG.java:1005)
   [testng]     at org.testng.TestNG.privateMain(TestNG.java:1338)
   [testng]     at org.testng.TestNG.main(TestNG.java:1307)

BUILD FAILED
c:\java\verifyanttestng\build.xml:43: The tests failed.

Total time: 2 seconds

c:\java\verifyanttestng>

--
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/testng-dev.
For more options, visit https://groups.google.com/d/optout.
Loading...