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

Any plans to support test run? #19

Open
rafaelpedretti-toast opened this issue Jun 17, 2024 · 10 comments
Open

Any plans to support test run? #19

rafaelpedretti-toast opened this issue Jun 17, 2024 · 10 comments

Comments

@rafaelpedretti-toast
Copy link
Contributor

Hi

Are there plans to support tests via the extension, like showing/running via test explorer?

@hyzyla
Copy link
Collaborator

hyzyla commented Jun 17, 2024

Hello! Yes, tests are definitely on the to-do list. I think I can fairly easily add the "test" command to the context menu of the scheme on the "Build" panel to add basic support for running tests. However, later it should be rewritten to run and watch test statuses via "Test Explorer" using VScode Testing API.

@kkHAIKE
Copy link

kkHAIKE commented Sep 24, 2024

Maybe we should have a place to display the current to-do list. 😊

@hyzyla
Copy link
Collaborator

hyzyla commented Sep 24, 2024

@kkHAIKE nice idea!

@ahmed-ibrahim-salim
Copy link

@kkHAIKE nice idea!

maybe readme will be a great place for todo list section

@hyzyla
Copy link
Collaborator

hyzyla commented Oct 6, 2024

@kkHAIKE @ahmed-ibrahim-salim here I've created todo list using "Projects" feature on Github https://github.com/orgs/sweetpad-dev/projects/2/views/1

I've never worked with "Projects" on GitHub, so I'm still getting used to it, but overall, I think I will add more tasks and prioritize them in the next few weeks

@cameroncooke
Copy link

I second this issue, this is the biggest pain point for using this extension for full-time iOS/macOS development. The fact that it can run the tests is fine but there is zero integration into the IDE other than the test log output.

@hyzyla hyzyla pinned this issue Oct 20, 2024
@hyzyla
Copy link
Collaborator

hyzyla commented Oct 20, 2024

Hi! I've added basic support for running tests using Test Explorer. I would say it's in beta, and any feedback is welcome. It currently works only with XCTestCase classes and shows tests for the last opened file with tests. Configuration options like scheme, destination, and workspace path currently reuse the existing build configuration (I'm still not sure if this is the best option for running tests). Also, I recently noticed that tests for iOS don't show errors in stdout, unlike macOS, so currently only macOS supports inline error messages. For iOS, I'll need some time to figure out how to parse the .xcresult bundle to extract the error message.

CleanShot 2024-10-20 at 11 52 27@2x

CleanShot 2024-10-20 at 12 01 51@2x

@cameroncooke
Copy link

Thank you @hyzyla how can we test (excuse the pun) this out?

@hyzyla
Copy link
Collaborator

hyzyla commented Oct 20, 2024

Thank you @hyzyla how can we test (excuse the pun) this out?

  1. Update the extension from the marketplace (v0.1.38).
  2. Open the Swift file with tests using XCTestCase.
  3. Open the test explorer (the flask icon in your side panel).
  4. Click "Run test" on any individual test or the entire test suite

CleanShot 2024-10-20 at 12 43 42@2x

@bitomule
Copy link

bitomule commented Dec 3, 2024

Super interested in the part about parsing to get iOS test reported in tests explorer. Is there a way to help?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants