Skip to content

Instantly share code, notes, and snippets.

@klaeufer
Last active January 14, 2017 02:31
Show Gist options
  • Select an option

  • Save klaeufer/284a51ad53ceda601dbeed8db5d256f5 to your computer and use it in GitHub Desktop.

Select an option

Save klaeufer/284a51ad53ceda601dbeed8db5d256f5 to your computer and use it in GitHub Desktop.
Basic testing metrics for Android and Maven
#!/usr/bin/env python
from bs4 import BeautifulSoup
soup = BeautifulSoup(open("target/site/surefire-report.html"), "html.parser")
table = soup.find("table")
headings = [th.get_text() for th in table.find("tr").find_all("th")]
row = table.find_all("tr")[1]
dataset = [td.get_text() for td in row.find_all("td")]
print ','.join(map(str,dataset))
#!/bin/sh
for c in $(git rev-list master)
do
git checkout $c
../test-single-commit.sh
done
#!/bin/sh
OUTPUT=../test-results.txt
git show -s --format="%cI, %H, " >> $OUTPUT
mvn clean test surefire-report:report && ../extract-summary.py >> $OUTPUT && exit
echo no tests for this commit >> $OUTPUT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment