Sunday, November 2, 2014

HTML report for unit tests

# Run tests and generate .xml reports
mvn clean test

# Convert .xml reports into .html report, but without the CSS or images
mvn surefire-report:report-only

# Put the CSS and images where they need to be without the rest of the
# time-consuming stuff
mvn site -DgenerateReports=false

Go to target/site/surefire-report.html for the report.

Terminal code \E?1034h

When  I was working with cqlsh (the command line client for Cassandra database), I tried to create a cleanup script which execute some CQL delete queries.  It turns out, the cqlsh client is a python-based command line client and it could generate a special code, a shell escape sequence (\E[?1034h).
I found more inforation here.