code: function extractClassName(test) {
      var relativeTestDir = process.env.npm_package_config_mocha_sonar_reporter_testdir;
      var classnameSuffix = process.env.npm_package_config_mocha_sonar_reporter_classnameSuffix || '';
  
      if (relativeTestDir === undefined || test.file === undefined) {
        return undefined;
      }
  
      var absoluteTestDir = path.join(process.cwd(), relativeTestDir);
  
      var relativeFilePath = path.relative(absoluteTestDir, test.file);
  
      var suffixIndex = relativeFilePath.lastIndexOf('.');
  
      return (suffixIndex >= 0 ? relativeFilePath.substring(0, suffixIndex) : relativeFilePath) + classnameSuffix;
    }
docs: Extract the classname (test relative file path) from the test absolute file path
  @param test
  @returns classname