{
  "version": "https://jsonfeed.org/version/1.1",
  "title": "chem-bla-ics",
  "description": "Chemblaics (pronounced chem-bla-ics) is the science that uses open science and computers to solve problems in chemistry, biochemistry and related fields.",
  "home_page_url": "https://chem-bla-ics.linkedchemistry.info/",
  "feed_url": "https://chem-bla-ics.linkedchemistry.info/2008/05/02/comparing-junit-test-results-between.json",
  "icon": "https://chem-bla-ics.linkedchemistry.info/assets/images/chem-bla-ics_logo.png",
  "language": "en",
  "authors": [
    {
      "name": "Egon Willighagen",
      "url": "https://orcid.org/0000-0001-7542-0286",
      "_orcid": "0000-0001-7542-0286"
    }
  ],
  "items": [

    {
      "id": "https://doi.org/10.59350/frwk8-r6898",
      "url": "https://chem-bla-ics.linkedchemistry.info/2008/05/02/comparing-junit-test-results-between.html",
      "title": "Comparing JUnit test results between CDK trunk/ and a branch #2",
      "content_html": "<p>I reported earlier on how to compare unit test results <a href=\"https://chem-bla-ics.linkedchemistry.info/2007/11/07/comparing-junit-test-results-between.html\">between CDK trunk and a branch <i class=\"fa-solid fa-recycle fa-xs\"></i></a>.\nLater, I noted that the diff typically overestimates the fail count, when unit tests had been moved to a different module. Therefore, a sort has\nto be added. The code is also updated for the SVN directory restructuring:</p>\n\n<div class=\"language-shell highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nv\">$ </span>cdk cdk/\n<span class=\"nv\">$ </span>cdk trunk/\n<span class=\"nv\">$ </span>ant <span class=\"nt\">-lib</span> develjar/junit-4.3.1.jar <span class=\"nt\">-logfile</span> ant.log test-all\n<span class=\"nv\">$ </span><span class=\"nb\">cd</span> ../branches/miguelrojasch-CMLReact\n<span class=\"nv\">$ </span>ant <span class=\"nt\">-lib</span> develjar/junit-4.3.1.jar <span class=\"nt\">-logfile</span> ant.log test-all\n<span class=\"nv\">$ </span><span class=\"nb\">cd</span> ..\n<span class=\"nv\">$ </span><span class=\"nb\">grep </span>Testcase trunk/reports/<span class=\"k\">*</span>.txt | <span class=\"nb\">cut</span> <span class=\"nt\">-d</span><span class=\"s1\">':'</span> <span class=\"nt\">-f2</span>,3 | <span class=\"nb\">sort</span> <span class=\"o\">&gt;</span> trunk.results\n<span class=\"nv\">$ </span><span class=\"nb\">grep </span>Testcase branches/miguelrojasch-CMLReact/reports/<span class=\"k\">*</span>.txt | <span class=\"nb\">cut</span> <span class=\"nt\">-d</span><span class=\"s1\">':'</span> <span class=\"nt\">-f2</span>,3 | <span class=\"nb\">sort</span> <span class=\"o\">&gt;</span> branch.results\n<span class=\"nv\">$ </span>diff <span class=\"nt\">-u</span> trunk.results branch.results\n</code></pre></div></div>\n\n<p>Obviously, you can still use wc for counting changes:</p>\n\n<div class=\"language-shell highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nv\">$ </span>diff <span class=\"nt\">-u</span> trunk.results branch.results | <span class=\"nb\">grep</span> <span class=\"s2\">\"^-Testcase\"</span> | <span class=\"nb\">wc</span> <span class=\"nt\">-l</span>\n<span class=\"nv\">$ </span>diff <span class=\"nt\">-u</span> trunk.results branch.results | <span class=\"nb\">grep</span> <span class=\"s2\">\"^+Testcase\"</span> | <span class=\"nb\">wc</span> <span class=\"nt\">-l</span>\n</code></pre></div></div>\n\n<p>A second improvement, would be taking advantage of the ant.log files that are created anyway. Using the\n<a href=\"http://www.beanshell.org/\">BeanShell</a> tool <a href=\"http://cdk.svn.sourceforge.net/viewvc/cdk/cdk/trunk/tools/extractTestStats.bsh?revision=10760&amp;view=markup\">tools/extractTestStats.bsh <i class=\"fa-solid fa-recycle fa-xs\"></i></a>\nrevision 10760 (see also <a href=\"https://chem-bla-ics.linkedchemistry.info/2008/02/27/cdk-is-now-available-from-your-nearest.html\">this blog on bsh</a>):</p>\n\n<div class=\"language-shell highlighter-rouge\"><div class=\"highlight\"><pre class=\"highlight\"><code><span class=\"nv\">$ </span>bsh trunk/tools/extractTestStats.bsh trunk/ant.log | <span class=\"nb\">grep </span>run | <span class=\"nb\">grep</span> <span class=\"nt\">-v</span> total | <span class=\"nb\">grep</span> <span class=\"nt\">-v</span> antlogFile | <span class=\"nb\">cut</span> <span class=\"nt\">-d</span><span class=\"s1\">' '</span> <span class=\"nt\">-f1-4</span> | <span class=\"nb\">sort</span> <span class=\"o\">&gt;</span> trunk.overview\n<span class=\"nv\">$ </span>bsh trunk/tools/extractTestStats.bsh branches/miguelrojasch-CMLReact/ant.log | <span class=\"nb\">grep </span>run | <span class=\"nb\">grep</span> <span class=\"nt\">-v</span> total | <span class=\"nb\">grep</span> <span class=\"nt\">-v</span> antlogFile | <span class=\"nb\">cut</span> <span class=\"nt\">-d</span><span class=\"s1\">' '</span> <span class=\"nt\">-f1-4</span> | <span class=\"nb\">sort</span> <span class=\"o\">&gt;</span> branch.overview\n<span class=\"nv\">$ </span>diff <span class=\"nt\">-u</span> trunk.overview branch.overview\n</code></pre></div></div>",
      "summary": "I reported earlier on how to compare unit test results between CDK trunk and a branch . Later, I noted that the diff typically overestimates the fail count, when unit tests had been moved to a different module. Therefore, a sort has to be added. The code is also updated for the SVN directory restructuring:",
      
      "date_published": "2008-05-02T00:00:00+00:00",
      "date_modified": "2025-10-11T00:00:00+00:00",
      "tags": ["cdk","junit"],
      
      
      
      
      
      
        "authors": [ { "name": "Egon Willighagen", "url": "https://orcid.org/0000-0001-7542-0286" } ]
      
    }

  ]
}
