-
Notifications
You must be signed in to change notification settings - Fork 118
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
Save flank output as json file #1437
Comments
I think that we should prepare some output json with information about tests results |
What output do we need that’s not already captured in junit xml? |
I thinking about something like Flank console output but in json format. That output could contain
|
That makes sense. Maybe we should look at how gcloud CLI supports saving output to JSON and implement that?
|
Yes, I will check how it's looks. |
Save Flank output as json fileSave information displayed during executing Flank process as easily parsed json report. References
MotivationCurrently parsing output is not easy. The user gets exit code and plain console output. Goals
Non-GoalsAfter finishing this task parsing integrations tests output could be improved. DesignImplementation steps
Risks
APIOptionIn class @set:CommandLine.Option(
names = ["--enable-output-report"],
description = ["Saves output results as parsable json file and optionally upload it to Gcloud."]
)
@set:JsonProperty("enable-output-report")
var enableOutputReport: Boolean? by data ReportCreate new class typealias OutputData = Map<String, Any>
object OutputReport {
private val outputData: OutputData = mutableMapOf()
fun addToOutputReport(key: String, reportNode: Any) {..}
private fun generateReport(): File {
val report = outputData.toJson()
report <save to file>
}
private fun OutputData.toJson() {...}
private fun File.uploadToGcloud(args: IArgs) {...}
}
Json report {
"args":<object>,
"weblinks":<string array>,
"testresults": [
"matrix_id": {
"test_axis_value":<String>,
"passed" : <int>,
"failed": <int>,
"flaky":<int>,
"error" <int>,
"outcome": <String>,
"test_details" : <String>
},
...
],
"cost":<float>,
"error":<String>
} ResultsFlank's run output is saved as JSON file if the user enables this feature. Task for improving parsing integrations tests will be created. DependenciesCurrently, there are not any blockers for this task. However, the addition of this task should be included in research results for task #1317 Testing
|
I would love to see also the proposition of structured JSON or YAML output. This could help to identify the best way for implementation. |
Author the user story for this feature
As a Flank user, I want to have the output saved to the file so I can easily parse this file on CI or use it in Flank integration tests.
Describe the solution
--output-file-format
to determine the output file type.What team think about this proposal?
@bootstraponline @piotradamczyk5 @jan-gogo @pawelpasterz @Sloox @axelzuziak-gogo
The text was updated successfully, but these errors were encountered: