<commit_before>#!/bin/bash
#
# This script provides an accurate code coverage report using Cobertura. Integration tests are included.
# Based on http://thomassundberg.wordpress.com/2012/02/18/test-coverage-in-a-multi-module-maven-project/
#
# This must be run from the root project directory:
#   bin/testCoverage.sh
# If you want to use your local server so the integration tests run faster, define the ITEST_SERVER env variable:
#   ITEST_SERVER=192.168.33.10 bin/testCoverage.sh
# Note that using ITEST_SERVER wipes all data from the test server.
#

trap 'exit' ERR

COBERTURA_TARGET_DIR=target/cobertura
TEMP_SRC_DIR=${COBERTURA_TARGET_DIR}/src
TEST_CLASSPATH_FILE=${COBERTURA_TARGET_DIR}/classpath
REPORT_DIR=${COBERTURA_TARGET_DIR}/report
COBERTURA_SER_FILE=${COBERTURA_TARGET_DIR}/cobertura.ser

# Instrument
mvn clean compile cobertura:instrument
find . -name generated-classes | while read dir
do
  cp -R ${dir}/cobertura/* $(dirname ${dir})/classes/
  rm -r ${dir}/cobertura<commit_msg>Changed test coverage example comment to use lumify-dev<commit_after>#!/bin/bash
#
# This script provides an accurate code coverage report using Cobertura. Integration tests are included.
# Based on http://thomassundberg.wordpress.com/2012/02/18/test-coverage-in-a-multi-module-maven-project/
#
# This must be run from the root project directory:
#   bin/testCoverage.sh
# If you want to use your local server so the integration tests run faster, define the ITEST_SERVER env variable:
#   ITEST_SERVER=lumify-dev bin/testCoverage.sh
# Note that using ITEST_SERVER wipes all data from the test server.
#

trap 'exit' ERR

COBERTURA_TARGET_DIR=target/cobertura
TEMP_SRC_DIR=${COBERTURA_TARGET_DIR}/src
TEST_CLASSPATH_FILE=${COBERTURA_TARGET_DIR}/classpath
REPORT_DIR=${COBERTURA_TARGET_DIR}/report
COBERTURA_SER_FILE=${COBERTURA_TARGET_DIR}/cobertura.ser

# Instrument
mvn clean compile cobertura:instrument
find . -name generated-classes | while read dir
do
  cp -R ${dir}/cobertura/* $(dirname ${dir})/classes/
  rm -r ${dir}/cobertura
{'fraction_non_alphanumeric': 0.09699655342195962, 'fraction_numerical': 0.012801575578532743, 'mean_word_length': 5.410094637223975, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6157562', 'n_tokens_mistral': 707, 'n_tokens_neox': 680, 'n_words': 182}