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

Fix Yacht tests in online test runner #790

Merged
merged 1 commit into from Jul 13, 2023

Conversation

artamonovkirill
Copy link
Contributor

Context: https://forum.exercism.org/t/scala-test-runner-reports-error-erroneously-for-prime-factors/6314/11

Test report is generated based on class name (=> TEST-YachtTests.xml in main), while the test runner expects TEST-YachtTest.xml.
The PR aligns class name with file name.

@github-actions
Copy link

Hello. Thanks for opening a PR on Exercism. We are currently in a phase of our journey where we have paused community contributions to allow us to take a breather and redesign our community model. You can learn more in this blog post. As such, all issues and PRs in this repository are being automatically closed.

That doesn't mean we're not interested in your ideas, or that if you're stuck on something we don't want to help. The best place to discuss things is with our community on the Exercism Community Forum. You can use this link to copy this into a new topic there.


Note: If this PR has been pre-approved, please link back to this PR on the forum thread and a maintainer or staff member will reopen it.

@github-actions github-actions bot closed this Jul 12, 2023
@ErikSchierboom
Copy link
Member

Test report is generated based on class name (=> TEST-YachtTests.xml in main), while the test runner expects TEST-YachtTest.xml.

As a follow-up, could we maybe look for a *Test.xml file to make it less error prone?

@ErikSchierboom ErikSchierboom merged commit 42ebf86 into exercism:main Jul 13, 2023
3 checks passed
@artamonovkirill
Copy link
Contributor Author

artamonovkirill commented Jul 13, 2023

As a follow-up, could we maybe look for a *Test.xml file to make it less error prone?

That would probably help for "Prime Factors", but not for "Yacht" (where the class was named "YachtTests").
I haven't dug too deep but it looks like Scala picks up whatever class (probably ones that extend AnyFunSuite).
Even

class YachtFooBar extends AnyFunSuite with Matchers {
  ...
}

is run and the result XML is TEST-YachtFooBar.xml.

I see two options:

  • add a CI check for Scala project to make sure class name and file names match (also removes IDE warnings like below)
Screenshot 2023-07-13 at 18 39 02
  • have the test runner read the test file (we already fetch the file name from config here)

@ErikSchierboom
Copy link
Member

add a CI check for Scala project to make sure class name and file names match (also removes IDE warnings like below)

Ah, this might be even better

@artamonovkirill artamonovkirill deleted the fix/yacht branch July 13, 2023 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants