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

Migrated to Testing framework #43

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

skprasadu
Copy link

Migrate to Swift Testing from XCTest

♻️ Current situation & Problem

All Swift unit tests and should migrate from XCTest to the new Swift Testing framework included in the Swift 6 toolchain. We can follow the documentation article to migrating a test from XCTest.

⚙️ Release Notes

Added Swift testing capability

📚 Documentation

Migrated to Swift testing as per this document, https://developer.apple.com/documentation/testing/migratingfromxctest

✅ Testing

Please ensure that the PR meets the testing requirements set by CodeCov and that new functionality is appropriately tested.
This section describes important information about the tests and why some elements might not be testable.

Code of Conduct & Contributing Guidelines

By submitting creating this pull request, you agree to follow our Code of Conduct and Contributing Guidelines:

@PSchmiedmayer PSchmiedmayer added the enhancement New feature or request label Feb 4, 2025
Copy link
Member

@PSchmiedmayer PSchmiedmayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@skprasadu Thank you for your first PR! Thank you for finding the project & taking the time to contribute to it!

A few high-level elements: Please ensure that all automated checks from SwiftLint, REUSE, and the automated tests are passing.

It also seems like some of the code might be AI generated; please ensure that you properly attribute the usage of AI & remove any obvious AI-generated comments and modifications.

Please ensure that all UI tests and unit tests are still passing despite the rework. Feel free to ping us once you have incorporated these first basics initial checks. Thank you for taking the time to contribute to HealthGPT!

HealthGPT.xcodeproj/project.pbxproj Outdated Show resolved Hide resolved
HealthGPT/Supporting Files/HealthGPT.entitlements Outdated Show resolved Hide resolved
HealthGPTTests/PromptGeneratorTests.swift Outdated Show resolved Hide resolved
HealthGPTTests/PromptGeneratorTests.swift Outdated Show resolved Hide resolved
HealthGPTUITests/HealthGPTViewUITests.swift Outdated Show resolved Hide resolved
@PSchmiedmayer PSchmiedmayer removed the request for review from vishnuravi February 4, 2025 07:23
@skprasadu
Copy link
Author

Hello Paul, it looks like we have 2 UI components, under package HealthGPTUITests, that uses XCUIApplication. But as I read, right now Swift testing is good only for API testing. Do you want me to not change the UI test and change only HealthGPTTests package. HealthGPTTests package testing is right now working in my machine. Please suggest. Or if you can guide me, I can also do UI test change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants