https://github.com/anscoder/appunittest
AppUnitTest is a Swift project demonstrating unit testing for iOS applications using XCTest.
https://github.com/anscoder/appunittest
ios-swift protocol-oriented-programming swift swiftdesignpatterns unittesting
Last synced: 2 months ago
JSON representation
AppUnitTest is a Swift project demonstrating unit testing for iOS applications using XCTest.
- Host: GitHub
- URL: https://github.com/anscoder/appunittest
- Owner: ANSCoder
- Created: 2025-01-25T18:08:11.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-01-25T19:15:34.000Z (11 months ago)
- Last Synced: 2025-06-06T07:42:50.026Z (7 months ago)
- Topics: ios-swift, protocol-oriented-programming, swift, swiftdesignpatterns, unittesting
- Language: Swift
- Homepage:
- Size: 27.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# AppUnitTest
**AppUnitTest** is a sample Swift project designed to demonstrate unit testing in iOS development. The project includes configurations for GitHub Actions to automate builds and tests, ensuring robust and reliable code.
---
## 🚀 Features
- **Unit Testing**: Comprehensive unit tests to ensure code reliability.
- **CI/CD Integration**: GitHub Actions workflow for automated builds and tests.
- **Modern Swift Practices**: Leverages Swift and XCTest for a seamless developer experience.
---
## 📂 Project Structure
- **`AppUnitTest`**: The main Xcode project directory.
- **`Tests`**: Contains unit test cases for various components of the project.
- **`.github/workflows`**: CI workflow files for automating builds and tests.
---
## ⚡ GitHub Actions Workflow
The project is configured with a GitHub Actions workflow that:
1. **Triggers**:
- On `push` to the `main` branch.
- On `pull_request` to the `main` branch.
2. **Steps**:
- Checks out the code.
- Builds the project using `xcodebuild`.
- Runs unit tests on an iOS Simulator.
---
## 🛠️ Requirements
- **Xcode 15.0.1** or higher
- **macOS 14.7.2** or higher
- **iOS Simulator** (e.g., iPhone 14)
---
## 📝 Usage
### Running Locally
1. Clone the repository:
```bash
git clone https://github.com/ANSCoder/AppUnitTest.git
cd AppUnitTest
```
2. Open the project in Xcode:
```bash
open AppUnitTest.xcodeproj
```
3. Run the unit tests:
- Select the `AppUnitTest` scheme.
- Press `Cmd+U` to execute the tests.
### Running Tests via CI
The workflow automatically:
1. Builds the project.
2. Runs unit tests using GitHub Actions.
---
## 🖇️ Contributing
Contributions are welcome! Please follow these steps:
1. Fork the repository.
2. Create a feature branch:
```bash
git checkout -b feature/your-feature-name
```
3. Commit your changes:
```bash
git commit -m "Add your feature"
```
4. Push to the branch:
```bash
git push origin feature/your-feature-name
```
5. Open a pull request.
---
## 📜 License
This project is open source and available under the [MIT License](LICENSE).
---
## 🤝 Acknowledgments
Thanks to all contributors and the iOS developer community for their support and inspiration.
---
Feel free to customize it further to fit your project details! 🚀