8000 Support Multiple Submissions from Hosts: Research Runner and Reporter Codebase · Issue #65 · WordPress/phpunit-test-reporter · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Support Multiple Submissions from Hosts: Research Runner and Reporter Codebase #65

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

Open
kittenkamala opened this issue Feb 11, 2020 · 7 comments

Comments

@kittenkamala
Copy link

Research the existing code base and configuration for reporting test results to identify all the specific points that need to be updated in the reporter and runner code. Document that here to help facilitate a solution for supporting multiple test submissions from hosts.

@kittenkamala kittenkamala changed the title Support Multiple Submissions from Hosts: Research Support Multiple Submissions from Hosts: Research Runner and Reporter Codebase Feb 11, 2020
@kittenkamala
Copy link
Author

result-set.php makes a table / template that test results get pushed to

result data is being iterated through here: https://github.com/WordPress/phpunit-test-reporter/blob/master/parts/result-set.php#L34

from the result data the post author is being grabbed here: https://github.com/WordPress/phpunit-test-reporter/blob/master/parts/result-set.php#L43

@kittenkamala
Copy link
Author
kittenkamala commented Feb 19, 2020

In the runner, results get put in an array, json encoded and sent to the api:

https://github.com/WordPress/phpunit-test-runner/blob/master/functions.php#L106

@pfefferle
Copy link
Member

What about starting with a simple env var like export WPT_HOSTING_PACKAGE=Cloud Hosting? I think it is no problem to have multiple runners for multiple hosting packages.

@getsource
Copy link
Member

@pfefferle Thanks for the note! I think that makes sense. I like that it would make it really easy for hosts to add/specify another environment.

Agreed it isn't a problem! What do you think should be the next step?

On getting it to the reporter, we could roll it up into $env, a different existing field, or add a new one.

Some details on the $env option:
$env is curated information in JSON about the environment where tests are run. It's currently generated in a couple of places. It doesn't contain any info from the.env file, and because it is sometimes run on a different machine, that'd probably have to be injected somehow.

@pfefferle
Copy link
Member

Semantically $env would be perfect. get_env_details() would be a good place to start, but then it will be ignored for the env.json file? Perhaps the reporter.php should add the info: https://github.com/WordPress/phpunit-test-runner/blob/67347895ad59d94abec722c69753a8184daa4aa8/report.php#L47

@pfefferle
Copy link
Member

What speaks against using $env is, that it is a very dominant parameter, that will also be used to group and filter the output (a hoster will be represented with one, two or more item types in a revision segment, with the name of the hosting type), so it might be better to use a more prominent field?!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In progress
Development

No branches or pull requests

3 participants
0