JSON Format report
kishinao opened this issue · 5 comments
# | Requirements | System requirements |
---|---|---|
1 | Create test report detail path( ex. /test_reports/8497 ) | return Job id with Json |
2 | Know Test result status ( all pass or not ) | Return status Success, Failures |
3 | Know test summary | return test category, device, label, Rerun JOB ID |
FYI
rspec -f j
{
"version":"3.11.0",
"examples":[
{
"id":"./core/report/screen_shot_generator_spec.rb[1:1:1]",
"description":"call Selenium::WebDriver::DriverExtensions::TakesScreenshot#save_screenshot",
"full_description":"Bucky::Core::Report::ScreenShotGenerator.generate_screen_shot call Selenium::WebDriver::DriverExtensions::TakesScreenshot#save_screenshot",
"status":"passed",
"file_path":"./core/report/screen_shot_generator_spec.rb",
"line_number":18,
"run_time":0.00292775,
"pending_message":null
},
{
"id":"./core/report/screen_shot_generator_spec.rb[1:1:2:1]",
"description":"call BuckyException.handle",
"full_description":"Bucky::Core::Report::ScreenShotGenerator.generate_screen_shot get error when calling save_screenshot call BuckyException.handle",
"status":"passed",
"file_path":"./core/report/screen_shot_generator_spec.rb",
"line_number":23,
"run_time":0.000229041,
"pending_message":null
}
],
"summary":{
"duration":0.003611708,
"example_count":2,
"failure_count":0,
"pending_count":0,
"errors_outside_of_examples_count":0
},
"summary_line":"2 examples, 0 failures"
}
jest --json
{
"numFailedTestSuites":0,
"numFailedTests":0,
"numPassedTestSuites":1,
"numPassedTests":1,
"numPendingTestSuites":0,
"numPendingTests":0,
"numRuntimeErrorTestSuites":0,
"numTodoTests":0,
"numTotalTestSuites":1,
"numTotalTests":1,
"openHandles":[
],
"snapshot":{
"added":0,
"didUpdate":false,
"failure":false,
"filesAdded":0,
"filesRemoved":0,
"filesRemovedList":[
],
"filesUnmatched":0,
"filesUpdated":0,
"matched":0,
"total":0,
"unchecked":0,
"uncheckedKeysByFile":[
],
"unmatched":0,
"updated":0
},
"startTime":1652315993560,
"success":true,
"testResults":[
{
"assertionResults":[
{
"ancestorTitles":[
],
"duration":1,
"failureMessages":[
],
"fullName":"adds 1 + 2 to equal 3",
"location":null,
"status":"passed",
"title":"adds 1 + 2 to equal 3"
}
],
"endTime":1652315993705,
"message":"",
"name":"/Users/kishinao/Work/jest/sum.test.js",
"startTime":1652315993586,
"status":"passed",
"summary":""
}
],
"wasInterrupted":false
}
Hi, @lifull-dev/admin-bucky .
Could you please review requirements and json format?
Bucky json format
{
"cases_count": 2,
"failure_count": 0,
"job_id": 1111,
"test_categories": ["e2e", "linkstatus"],
"devices": ["pc", "sp"],
"labes": ["list", "detail"],
"rerun_job_id": 1110
}
@kishinao
I think the format covers almost every requirement. But I have some questions about the result info.
-
Maybe FQDN was missed. (But it's a ENV, not sure we really need to print it in result)
-
Should we also add success_count?
-
Should we provide the result for each round?
ex)
{
summary_result: {
"cases_count": 2,
"failure_count": 0,
"job_id": 1111,
"test_categories": ["e2e", "linkstatus"],
"devices": ["pc", "sp"],
"labes": ["list", "detail"],
"rerun_job_id": 1110,
"round_count": 3 // total round count
},
round_results :{
{
// result for round 1
},
{
// result for round 2
},
}
}
- How about the excluded labels info?
I think we have a feature for excluding labels. (Sorry for not updating the info in README)
#74
@rueyaa332266 Thanks for reviewing.
- Maybe FQDN was missed. (But it's a ENV, not sure we really need to print it in result)
On second thoughts, I think that's unnecessary.
Fixed table
- Should we also add success_count?
I think we need it.
- Should we provide the result for each round?
I think we need it. But I think it would be better to include it in the next feature.
- How about the excluded labels info?
I think we have a feature for excluding labels. (Sorry for not updating the info in README)
add exclude label #74
I think we need it.
Fixed format. Could you please check again?
{
summary: {
"cases_count": 2,
"success_count": 2,
"failure_count": 0,
"job_id": 1111,
"test_categories": ["e2e", "linkstatus"],
"devices": ["pc", "sp"],
"labels": ["list", "detail"],
"exclude_labels": ["inquire"],
"rerun_job_id": 1110,
"round_count": 3 // total round count
}
}
@kishinao
Thanks for fixing!
I think we need it. But I think it would be better to include it in the next feature.
Don't forget to create another issue for it!
LGTM now!