TeamCity does not display the parameters a test method is invoked with when using TestNGs DataProvider

Hi,

I am using a gradle + testng setup for one of my current projects. As I looked on the test results of the first successful build in TeamCity I realized that regretfully the parameters of a test method are not shown when I use TestNGs @DataProvider annotation.

For example it displays:

PrimeFactoryKataTest.testPrimeFactors (Gradle test:prime_factors)     11ms View trend  1
PrimeFactoryKataTest.testPrimeFactors (Gradle test:prime_factors)     1ms View trend     3
PrimeFactoryKataTest.testPrimeFactors (Gradle test:prime_factors)     1ms View trend     5

But I'd be glad if it could display something more helpful like:

PrimeFactoryKataTest.testPrimeFactors( 4, [2, 2] ) (Gradle test:prime_factors)     11ms View trend  1
PrimeFactoryKataTest.testPrimeFactors( 60, [ 2, 2, 3, 5] ) (Gradle test:prime_factors)     1ms View trend     3

Is there any option to enable this in the current TeamCity version?

Best regards,
Ulf

5 comments
Comment actions Permalink

Hello Ulf,

  Actually, parameterized testNG tests should be reported correctly in TeamCity (with parameters in test name)

  I'd appreciate if you create an issue in our tracker with a sample project, which allows to reproduce the problem.

  Thanks!
  KIR

0
Comment actions Permalink

Hello Ulf,

  Actually, parameterized testNG tests should be reported correctly in TeamCity (with parameters in test name)

  I'd appreciate if you create an issue in our tracker with a sample project, which allows to reproduce the problem.

  Thanks!
  KIR

0
Comment actions Permalink

Hello Kirill,

Sorry for my late response, but I was busy the last few days. I added a zipped project file with a simple PrimeFactroy class and its related test. When I execute gradle test on the command line and afterwards have a look in the testng resulst, I see the parameters being transferd to the output file but in TeamCity they are not shown.

I hope this helps, if you need anything else, just let me know.

Best,
Ulf



Attachment(s):
code_kata.tgz
0
Comment actions Permalink

I created a new issue as requested (TW-22866)

Kind regards,
Ulf

0
Comment actions Permalink

Hello Ulf,

  Thanks for filing the issue with the testcase. It looks like we don't support TestNG parameters for the Gradle runner yet.

  But you can see TestNG parameters if you run your tests with Ant or IntelliJ IDEA runner.

  Kind regards,
  KIR

0

Please sign in to leave a comment.