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
[SPARK-32647][INFRA] Report SparkR test results with JUnit reporter #29456
Conversation
Test build #127525 has finished for PR 29456 at commit
|
This reverts commit 8fb651a.
cc @dongjoon-hyun, @viirya, @felixcheung, @shivaram, @gengliangwang FYI |
Note that PySpark, Scala and Java are already doing this. SparkR is only the one which currently does not leverage JUnit XML reports. This PR completes and consistently supports it in all languages with the consistent directory names ( Jenkins and GitHub Actions are already configured to look up these directories to report in test results. |
dir.create("target/test-reports", showWarnings = FALSE) | ||
reporter <- MultiReporter$new(list( | ||
SummaryReporter$new(), | ||
JunitReporter$new(file = "target/test-reports/test-results.xml") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it only supported by testthat 2.0+?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks supported in testthat 1.x but testthat 1.x support here is supposed to be removed soon at SPARK-30663. I didn't bother test as Jenkins and GitHub Actions use testthat 2+ anyway.
SummaryReporter$new(), | ||
JunitReporter$new(file = "target/test-reports/test-results.xml") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need both SummaryReporter
and JunitReporter
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, otherwise, the console output is not shown. I manually tested.
It was previously ProgressReporter
(from testthat 2+) by default. It shows the console output such as:
��� | 0 | SparkSQL functions
��� | 1 | SparkSQL functions
��� | 2 | SparkSQL functions
...
in Jenkins (ever since we switched the default system encoding if I am not mistaken).
Now it follows the default format SummaryReporter
(in testthat 1.x). It shows the console output as below:
functions in client.R: .....
test functions in sparkR.R: ..............................................
include R packages: ..
JVM API: ..
MLlib classification algorithms, except for tree-based algorithms: ...........................................................................
There are no differences in the report format when some tests are failed.
oh, cc @zero323 too. |
Test build #127533 has finished for PR 29456 at commit
|
Thanks guys. Let me merge this after I cherry-pick Github Actions to other branches (at #29460) |
Test build #127544 has finished for PR 29456 at commit
|
Test build #127557 has finished for PR 29456 at commit
|
Merged to master. |
This PR proposes to generate JUnit XML test report in SparkR tests that can be leveraged in both Jenkins and GitHub Actions. **GitHub Actions** ![Screen Shot 2020-08-18 at 12 42 46 PM](https://user-images.githubusercontent.com/6477701/90467934-55b85b00-e150-11ea-863c-c8415e764ddb.png) **Jenkins** ![Screen Shot 2020-08-18 at 2 03 42 PM](https://user-images.githubusercontent.com/6477701/90472509-a5505400-e15b-11ea-9165-777ec9b96eaa.png) NOTE that while I am here, I am switching back the console reporter from "progress" to "summary". Currently non-ascii codes are broken in Jenkins console and switching it to "summary" can work around it. "summary" is the default format used in testthat 1.x. To check the test failures more easily. No, dev-only It is tested in GitHub Actions at https://github.com/HyukjinKwon/spark/pull/23/checks?check_run_id=996586446 In case of Jenkins, https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127525/testReport/ Closes #29456 from HyukjinKwon/sparkr-junit. Authored-by: HyukjinKwon <gurwls223@apache.org> Signed-off-by: HyukjinKwon <gurwls223@apache.org>
I merged into branch-3.0 and branch-2.4 as well. cc @zhengruifeng and @ScrapCodes . this is test-only so should be fine. |
This PR proposes to generate JUnit XML test report in SparkR tests that can be leveraged in both Jenkins and GitHub Actions. **GitHub Actions** ![Screen Shot 2020-08-18 at 12 42 46 PM](https://user-images.githubusercontent.com/6477701/90467934-55b85b00-e150-11ea-863c-c8415e764ddb.png) **Jenkins** ![Screen Shot 2020-08-18 at 2 03 42 PM](https://user-images.githubusercontent.com/6477701/90472509-a5505400-e15b-11ea-9165-777ec9b96eaa.png) NOTE that while I am here, I am switching back the console reporter from "progress" to "summary". Currently non-ascii codes are broken in Jenkins console and switching it to "summary" can work around it. "summary" is the default format used in testthat 1.x. To check the test failures more easily. No, dev-only It is tested in GitHub Actions at https://github.com/HyukjinKwon/spark/pull/23/checks?check_run_id=996586446 In case of Jenkins, https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127525/testReport/ Closes #29456 from HyukjinKwon/sparkr-junit. Authored-by: HyukjinKwon <gurwls223@apache.org> Signed-off-by: HyukjinKwon <gurwls223@apache.org>
LGTM
|
What changes were proposed in this pull request?
This PR proposes to generate JUnit XML test report in SparkR tests that can be leveraged in both Jenkins and GitHub Actions.
GitHub Actions
Jenkins
NOTE that while I am here, I am switching back the console reporter from "progress" to "summary". Currently non-ascii codes are broken in Jenkins console and switching it to "summary" can work around it.
"summary" is the default format used in testthat 1.x.
Why are the changes needed?
To check the test failures more easily.
Does this PR introduce any user-facing change?
No, dev-only
How was this patch tested?
It is tested in GitHub Actions at https://github.com/HyukjinKwon/spark/pull/23/checks?check_run_id=996586446
In case of Jenkins, https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/127525/testReport/