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

JSON Format report #92

Closed
ghost opened this issue May 12, 2022 · 5 comments
Closed

JSON Format report #92

ghost opened this issue May 12, 2022 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented May 12, 2022

# 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
@ghost ghost added the enhancement New feature or request label May 12, 2022
@ghost ghost assigned nk-ty May 12, 2022
@ghost
Copy link
Author

ghost commented May 12, 2022

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
}

@ghost ghost assigned hikimochi May 12, 2022
@ghost
Copy link
Author

ghost commented May 12, 2022

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
}

@rueyaa332266
Copy link
Contributor

rueyaa332266 commented May 12, 2022

@kishinao
I think the format covers almost every requirement. But I have some questions about the result info.

  1. Maybe FQDN was missed. (But it's a ENV, not sure we really need to print it in result)

  2. Should we also add success_count?

  3. 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
		},
	}
}
  1. 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

@ghost
Copy link
Author

ghost commented May 12, 2022

@rueyaa332266 Thanks for reviewing.

  1. 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

  1. Should we also add success_count?

I think we need it.

  1. 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.

  1. 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
	}
}

@rueyaa332266
Copy link
Contributor

@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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants