tornaia / karma-sonarqube-unit-reporter

A Karma plugin. Unit tests execution report for SonarQube/Generic Coverage Plugin
MIT License
33 stars 28 forks source link

Provide a more detailed description of the test name to avoid duplication #11

Closed cteyton closed 8 years ago

cteyton commented 8 years ago

By default, only the test description is written in the attribute name of each testCase.

Currently, if i write my file as follows :

describe('TestTools', function() {

       describe("testArray", function() {
              it('should return null', function() {
              })
       }

       describe("testObject", function() {
              it('should return null', function() {
              })
       }

}

i'll get something like :

<file path="TestTools">
    <testCase name="should return null" duration="476"/>
    <testCase name="should return null" duration="101"/>
...

which raises issues because of duplication.

With this fix, we would get :

<file path="TestTools">
    <testCase name="TestTools testArray should return null" duration="476"/>
    <testCase name="TestTools testObject should return null" duration="101"/>