Skip to content

Support user output again#109

Merged
mk-mxp merged 6 commits intoexercism:mainfrom
mk-mxp:support-user-output-again
May 4, 2024
Merged

Support user output again#109
mk-mxp merged 6 commits intoexercism:mainfrom
mk-mxp:support-user-output-again

Conversation

@mk-mxp
Copy link
Copy Markdown
Contributor

@mk-mxp mk-mxp commented Apr 27, 2024

I tried a lot of things to make PHPUnit render user output into JUnit logs. I then found out, that this is intentionally removed. So I looked for another way to get the output.

The output is contained in teamcity logs, with additional commandline settings. So I used this to add the output to the result.

Also added tests for the various conditions.

Closes #108

mk-mxp added 4 commits April 27, 2024 17:55
- User input is not logged in JUnit log anymore
- There is no way to make JUnit logs with the output (--fail-on-risky
  is not accounted for!)
- To get the output logged in teamcity logger, the test must fail
  (--disallow-test-output --fail-on-risky)
- Use the teamcity log to add output to tests from JUnit log
@mk-mxp mk-mxp requested a review from neenjaw as a code owner April 27, 2024 16:19
@mk-mxp mk-mxp requested a review from homersimpsons April 28, 2024 07:25
@mk-mxp mk-mxp self-assigned this Apr 28, 2024
@mk-mxp mk-mxp added x:action/fix Fix an issue x:knowledge/elementary Little Exercism knowledge required x:module/test-runner Work on Test Runners x:type/coding Write code that is not student-facing content (e.g. test-runners, generators, but not exercises) x:size/medium Medium amount of work x:rep/medium Medium amount of reputation labels Apr 28, 2024
@homersimpsons
Copy link
Copy Markdown
Contributor

For this I wanted to create a phpunit extension that would hook itself on phpunit and could do anything we want.

I feel like the current setup with junit export and parsing is quite "hacky".

Comment thread junit-handler/src/TeamcityResult.php Outdated
@mk-mxp mk-mxp requested a review from homersimpsons April 29, 2024 03:44
@mk-mxp
Copy link
Copy Markdown
Contributor Author

mk-mxp commented May 4, 2024

JetBrains TeamCity message escaping found. There is no Unicode escaping done in PHPUnit.

@mk-mxp mk-mxp merged commit f3304ca into exercism:main May 4, 2024
@mk-mxp mk-mxp deleted the support-user-output-again branch May 4, 2024 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

x:action/fix Fix an issue x:knowledge/elementary Little Exercism knowledge required x:module/test-runner Work on Test Runners x:rep/medium Medium amount of reputation x:size/medium Medium amount of work x:type/coding Write code that is not student-facing content (e.g. test-runners, generators, but not exercises)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No debug output in online editor anymore

2 participants