Example of CTC++ Coverage JSON Report

{
 "header_info": {
  "ctcpost_version": "8.2",
  "copyright": [
    "Copyright (c) 1993-2013 Testwell Oy",
    "Copyright (c) 2013-2017 Verifysoft Technology GmbH"
    ],
  "license_notes": [
    ],
  "symbolfiles": [
   {
    "name": "MON.sym",
    "modified": "Tue Apr 11 13:56:19 2017"
   }
                 ],
  "datafiles": [
   {
    "name": "MON.dat",
    "modified": "Tue Apr 11 13:56:36 2017"
   }
               ],
  "chosen_source_files": [
  ],
  "unchosen_source_files": [
                         ],
  "report_generated": "Thu Apr 13 09:28:54 2017",
  "requested_coverage_view": "As instrumented",
  "ctcpost_options": "-j jasonreport.json",
  "execution_cost_function": "clock",
  "execution_cost_type": "Clock ticks",
  "execution_cost_scaling": "1"
 },
 "ctcpost_notices": [
                    ],
 "file": [
  {
  "name": "F:\\ctcwork\\v82\\doc\\examples\\prime.c",
  "file_type": "source",
  "instrumentation_mode": "multicondition",
  "instrumentation_timestamp": "Tue Apr 11 13:56:19 2017",
  "sym_rewrite_count": 0,
  "sym_update_count": 0,
  "data_rewrite_count": 0,
  "data_update_count": 0,
  "function": [
  {
   "name": "main",
   "parameters": "( void )",
   "defined_at_line": 8,
   "call_count": 1,
   "total_execution_cost": null,
   "average_execution_cost": null,
   "max_execution_cost": null,
   "probe": [
    {
     "type": "function",
     "count1": 1,
     "line": 8,
     "sc_count": 0,
     "nesting": 0,
     "descr": "FUNCTION main()"
    },
    {
     "type": "while",
     "count1": 3,
     "count2": 1,
     "line": 12,
     "sc_count": 1,
     "nesting": 1,
     "descr": "while (( prime_candidate = io_ask ( ) ) > 0)"
    },
    {
     "type": "if",
     "count1": 2,
     "count2": 1,
     "line": 14,
     "sc_count": 1,
     "nesting": 2,
     "descr": "if (is_prime ( prime_candidate ))"
    },
    {
     "type": "block_end",
     "line": 15,
     "sc_count": 2,
     "nesting": 2,
     "exepassed": true,
     "descr": "}"
    },
    {
     "type": "else",
     "line": 16,
     "sc_count": 2,
     "nesting": 2,
     "descr": "else"
    },
    {
     "type": "block_end",
     "line": 17,
     "sc_count": 3,
     "nesting": 2,
     "exepassed": true,
     "descr": "}"
    },
    {
     "type": "block_end",
     "line": 18,
     "sc_count": 3,
     "nesting": 1,
     "exepassed": true,
     "descr": "}"
    },
    {
     "type": "return",
     "count1": 1,
     "line": 19,
     "sc_count": 4,
     "nesting": 1,
     "descr": "return 0"
    },
    {
     "type": "function_end_nr",
     "line": 20,
     "sc_count": 4,
     "nesting": 0,
     "descr": "}"
    }
    ],
   "summary": {
    "ter": 100,
    "hits": 6,
    "all": 6,
    "statement_ter": 100,
    "statement_hits": 6,
    "statement_all": 6,
    "statement_available": true
   }
  }
  ],
  "summary": {
   "functions": 1,
   "lines": 20,
   "ter": 100,
   "hits": 6,
   "all": 6,
   "statement_ter": 100,
   "statement_hits": 6,
   "statement_all": 6,
   "statement_na_functions": 0
  }
  },
  {
  "name": "F:\\ctcwork\\v82\\doc\\examples\\io.c",
  "file_type": "source",
  "instrumentation_mode": "multicondition",
  "instrumentation_timestamp": "Tue Apr 11 13:56:19 2017",
  "sym_rewrite_count": 0,
  "sym_update_count": 0,
  "data_rewrite_count": 0,
  "data_update_count": 0,
  "function": [
  {
   "name": "io_ask",
   "parameters": "( )",
   "defined_at_line": 5,
   "call_count": 4,
   "total_execution_cost": null,
   "average_execution_cost": null,
   "max_execution_cost": null,
   "probe": [
    {
     "type": "function",
     "count1": 4,
     "line": 5,
     "sc_count": 0,
     "nesting": 0,
     "descr": "FUNCTION io_ask()"
    },
    {
     "type": "if",
     "count1": 0,
     "count2": 4,
     "alarmed": true,
     "line": 11,
     "sc_count": 3,
     "nesting": 1,
     "descr": "if (( amount = scanf ( \"%u\" , & val ) ) <= 0)"
    },
    {
     "type": "block_end",
     "line": 13,
     "sc_count": 4,
     "nesting": 1,
     "exepassed": true,
     "descr": "}"
  ; ; ; ;   },
    {
     "type": "return",
     "count1": 4,
     "line": 14,
     "sc_count": 5,
     "nesting": 1,
     "descr": "return val"
    },
    {
     "type": "function_end_nr",
     "line": 15,
     "sc_count": 5,
     "nesting": 0,
     "descr": "}"
    }
    ],
   "summary": {
    "ter": 75,
    "hits": 3,
    "all": 4,
    "statement_ter": 83,
    "statement_hits": 5,
    "statement_all": 6,
    "statement_available": true
   }
  }
,
                      {
   "name": "io_report",
   "parameters": "( unsigned val , char * str )",
   "defined_at_line": 18,
   "call_count": 3,
   "total_execution_cost": null,
   "average_execution_cost": null,
   "max_execution_cost": null,
   "probe": [
    {
     "type": "function",
     "count1": 3,
     "line": 18,
     "sc_count": 0,
     "nesting": 0,
     "descr": "FUNCTION io_report()"
    },
    {
     "type": "function_end",
     "count1": 3,
     "line": 21,
     "sc_count": 1,
     "nesting": 0,
     "descr": "}"
    }
    ],
   "summary": {
    "ter": 100,
    "hits": 2,
    "all": 2,
    "statement_ter": 100,
    "statement_hits": 1,
    "statement_all": 1,
    "statement_available": true
   }
  }
  ],
  "summary": {
   "functions": 2,
   "lines": 21,
   "ter": 83,
   "hits": 5,
   "all": 6,
   "statement_ter": 86,
   "statement_hits": 6,
   "statement_all": 7,
   "statement_na_functions": 0
  }
  },
  {
  "name": "F:\\ctcwork\\v82\\doc\\examples\\calc.c",
  "file_type": "source",
  "instrumentation_mode": "multicondition",
  "instrumentation_timestamp": "Tue Apr 11 13:56:19 2017",
  "sym_rewrite_count": 0,
  "sym_update_count": 0,
  "data_rewrite_count": 0,
  "data_update_count": 0,
  "function": [
  {
   "name": "is_prime",
   "parameters": "( unsigned val )",
   "defined_at_line": 4,
   "call_count": 3,
   "total_execution_cost": null,
   "average_execution_cost": null,
   "max_execution_cost": null,
   "probe": [
    {
     "type": "function",
     "count1": 3,
     "line": 4,
     "sc_count": 0,
     "nesting": 0,
     "descr": "FUNCTION is_prime()"
    },
    {
     "type": "if",
     "count1": 1,
     "count2": 2,
     "line": 8,
     "sc_count": 1,
     "nesting": 1,
     "descr": "if (val == 1 || val == 2 || val == 3)"
    },
    {
     "type": "multi_cond_t",
     "count1": 0,
     "alarmed": true,
     "line": 8,
     "sc_count": 1,
     "nesting": 1,
     "eval_no": 1,
     "descr": "T || _ || _"
    },
    {
     "type": "multi_cond_t",
     "count1": 1,
     "line": 8,
     "sc_count": 1,
     "nesting": 1,
     "eval_no": 2,
     "descr": "F || T || _"
    },
    {
     "type": "multi_cond_t",
     "count1": 0,
     "alarmed": true,
     "line": 8,
     "sc_count": 1,
     "nesting": 1,
     "eval_no": 3,
     "descr": "F || F || T"
    },
    {
     "type": "multi_cond_f",
     "count2": 2,
     "line": 8,
     "sc_count": 1,
     "nesting": 1,
     "eval_no": 4,
     "descr": "F || F || F"
    },
    {
     "type": "return",
     "count1": 1,
     "line": 9,
     "sc_count": 2,
     "nesting": 2,
     "descr": "return 1"
    },
    {
     "type": "block_end",
     "line": 9,
     "sc_count": 2,
     "nesting": 1,
     "exepassed": true,
     "descr": "}"
    },
    {
     "type": "if",
     "count1": 1,
     "count2": 1,
     "line": 10,
     "sc_count": 2,
     "nesting": 1,
     "descr": "if (val % 2 == 0)"
    },
    {
     "type": "return",
     "count1": 1,
     "line": 11,
     "sc_count": 3,
     "nesting": 2,
     "descr": "return 0"
    },
    {
     "type": "block_end",
     "line": 11,
     "sc_count": 3,
     "nesting": 1,
     "exepassed": true,
&am p;am p;am p;nb sp;    "descr": "}"
    },
    {
     "type": "for",
     "count1": 0,
     "count2": 1,
     "alarmed": true,
     "line": 12,
     "sc_count": 5,
     "nesting": 1,
     "descr": "for (;divisor < val / 2;)"
    },
    {
     "type": "if",
     "count1": 0,
     "count2": 0,
     "alarmed": true,
     "line": 14,
     "sc_count": 5,
     "nesting": 2,
     "descr": "if (val % divisor == 0)"
    },
    {
     "type": "return",
     "count1": 0,
     "alarmed": true,
     "line": 15,
     "sc_count": 6,
     "nesting": 3,
     "descr": "return 0"
    },
    {
     "type": "block_end",
     "line": 15,
     "sc_count": 6,
     "nesting": 2,
     "exepassed": false,
     "descr": "}"
    },
    {
     "type": "block_end",
     "line": 16,
     "sc_count": 6,
     "nesting": 1,
     "exepassed": true,
     "descr": "}"
    },
    {
     "type": "return",
     "count1": 1,
     "line": 17,
     "sc_count": 7,
     "nesting": 1,
     "descr": "return 1"
    },
    {
     "type": "function_end_nr",
     "line": 18,
     "sc_count": 7,
     "nesting": 0,
     "descr": "}"
    }
    ],
   "summary": {
    "ter": 65,
    "hits": 11,
    "all": 17,
    "statement_ter": 82,
    "statement_hits": 9,
    "statement_all": 11,
    "statement_available": true
   }
  }
  ],
  "summary": {
   "functions": 1,
   "lines": 18,
   "ter": 65,
   "hits": 11,
   "all": 17,
   "statement_ter": 82,
   "statement_hits": 9,
   "statement_all": 11,
   "statement_na_functions": 0
  }
  }
 ],
 "summary": {
  "shown_coverage_views": "multicondition",
  "files": 3,
  "headers": 0,
  "functions": 4,
  "lines": 59,
  "ter": 76,
  "hits": 22,
  "all": 29,
  "statement_ter": 88,
  "statement_hits": 21,
  "statement_all": 24,
  "statement_na_functions": 0
 }
}

The JSON report contains in JSON format the same information as the XML report.