Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract code coverage from Android device #21

Open
wants to merge 23 commits into
base: feature/agoda-android-ci
Choose a base branch
from

Conversation

karthyks
Copy link

@karthyks karthyks commented Sep 26, 2023

Coverage report is generated in the folder /data/data/$appPackage/files/coverage.ec

TestFinished -> Get coverage.ec file from the device -> Copy the file contents to the output directory with file name (testClass#testMethod.ec)

@karthyks karthyks requested review from atatadev and a team September 26, 2023 10:27
Comment on lines +19 to +36
val point = Point.measurement("tests")
.time(System.currentTimeMillis(), TimeUnit.MILLISECONDS)
.tag("testname", testResult.test.toSafeTestName())
.tag("package", testResult.test.pkg)
.tag("class", testResult.test.clazz)
.tag("method", testResult.test.method)
.tag("deviceSerial", device.serialNumber)
.addField("ignored", if (testResult.isIgnored) 1.0 else 0.0)
.addField("success", if (testResult.status == TestStatus.PASSED) 1.0 else 0.0)
.addField("duration", testResult.durationMillis())
.build()
runCatching {
influxDb.write(point)
}.onSuccess {
logger.trace { "Tracked in influxDB $point" }
}.onFailure {
logger.error(it) { "Error writing to influxDB with $point" }
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are having an issue writing to influxDB 400 Bad Request, just want to log the request marathon is sending.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant