TestNG support in 2.0 beta?

Hi all,

I finally got around to setting up TeamCity, and decided to try the 2.0 beta. One problem I have is that I can't build, I get the following error:

INFO - nt.runner.GenericProgramRunner - test:
INFO - nt.runner.GenericProgramRunner - java.io.FileNotFoundException: /home/teamcity/TeamCity/buildAgent/work/Server/Devbench_(graphmodel)/junitvmwatcher145775425.properties (No such file o
r directory)
INFO - nt.runner.GenericProgramRunner - at java.io.FileInputStream.open(Native Method)
INFO - nt.runner.GenericProgramRunner - at java.io.FileInputStream.]]>(FileInputStream.java:106)
INFO - nt.runner.GenericProgramRunner - at java.io.FileReader.]]>(FileReader.java:55)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeAsForked(JUnitTask.java:1028)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:859)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:782)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
INFO - nt.runner.GenericProgramRunner - at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
INFO - nt.runner.GenericProgramRunner - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
INFO - nt.runner.GenericProgramRunner - at java.lang.reflect.Method.invoke(Method.java:585)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.Task.perform(Task.java:348)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.Target.execute(Target.java:357)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.Target.performTasks(Target.java:385)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.Main.runBuild(Main.java:698)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.Main.startAnt(Main.java:199)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
INFO - nt.runner.GenericProgramRunner - at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
INFO - nt.runner.GenericProgramRunner - Tests FAILED (crashed)
INFO - nt.runner.GenericProgramRunner -

We're not actually using JUnit, we're using TestNG, and I can't seem to find anything on setting it up. Any pointers?

Cheers,
Colin

5 comments
Comment actions Permalink

One thing I should have mentioned - this is using the IPR builder. I see there's a JIRA to enable TestNG support with this builder - I don't mind not being able to run the tests from here (they'll be run from Ant), but there doesn't seem to be a way to not run any tests at all. I've removed all the test file patterns.

Thanks,
Colin

0
Comment actions Permalink

Thanks Kirill. I already have that watched. Is there any way to stop the IPR runner trying to run my tests as JUnit tests? Can I set it up to just build? I couldn't find a way.

Thanks,
Colin

0
Comment actions Permalink

Hi Colin,

I think you can specify test pattern to something non-existing, like
*:non-existing.java

Hope this helps,
KIR

0
Comment actions Permalink

That's great, that works a treat, thanks!

0

Please sign in to leave a comment.