karma-runner / karma-teamcity-reporter

A Karma plugin. Report results for Teamcity CI.
MIT License
34 stars 47 forks source link

Jasmine tests are identified wrong in TeamCity #17

Open stevebroshar opened 10 years ago

stevebroshar commented 10 years ago

I'm using jasmine where tests are named/identified based on the test description plus each containing describe block description. For example:

describe('dockDirective', function(){
  describe('click-handler', function(){
    it('should set window active', ...)
  });
});

defines the test "dockDirective click-handler should set window active".

But, when I run the test in TeamCity with Karma, the test is identified as "should set window active (dockDirective click-handler.PhantomJS 1.9.0 (Windows 7))". The information (plus extra) is in there, but in the wrong order. It's hard to read.

I ran the same command outside of TeamCity and see that the raw output is like this:

##teamcity[testSuiteStarted name='dockDirective click-handler.PhantomJS 1.9.0 (Windows 7)']
##teamcity[testStarted name='should set window active']

Seems that to make it look right in TC, the output should include the suite text in each test name like this:

##teamcity[testSuiteStarted name='dockDirective click-handler.PhantomJS 1.9.0 (Windows 7)']
##teamcity[testStarted name='dockDirective click-handler should set window active']
memark commented 9 years ago

I've also noticed this. What I'd like to do is actually split up the ##teamcity[testSuiteStarted name='dockDirective click-handler.PhantomJS 1.9.0 (Windows 7)'] string into properly nested "suites". I have yet to figure out if this caused by the reporter, or by Karma itself. I'd be happy to do some coding, but it would be nice to get an official response first, endorsing the idea, and pointing me in the right direction!

(If this project is even alive? The build seems to have been broken for the past 5 months. :-()

stevebroshar commented 9 years ago

I wonder myself whether the project is alive ... still loved by any of its developers. I submitted this issue well over a year ago. I submitted an issue with karma-safari-launcher https://github.com/karma-runner/karma-safari-launcher/issues/12 a month ago. Neither have had any progress towards a fix. I don't know whether karma in general is dead/unloved, or maybe it's just that some of the peripheral components get less attention/love.

dignifiedquire commented 9 years ago

@stevebroshar I'm really sorry about that. The fact is that I'm nearly working alone on the karma code base, and that only in my free time so I'm simply not getting to some modules as quickly as I would like to. If you want to help out by investigation/writing PRs I'm more than happy to accept the help, but otherwise things simply progress not very fast right now.

memark commented 9 years ago

@Dignifiedquire No problem, that's perfectly understandable. I'd just like some basic input on this idea, before I start coding. No fun writing a PR if it never gets accepted later on. :)

dignifiedquire commented 9 years ago

@memark I personally don't use teamcity so I have to rely on you guys to guide me when it comes to needed features. Your suggestion does sound good though so I'm happy to look at PR from you :)