Skip to content

AppUnitTest is a Swift project demonstrating unit testing for iOS applications using XCTest.

Notifications You must be signed in to change notification settings

ANSCoder/AppUnitTest

Repository files navigation

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:
    git clone https://github.com/ANSCoder/AppUnitTest.git
    cd AppUnitTest
  2. Open the project in Xcode:
    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:
    git checkout -b feature/your-feature-name
  3. Commit your changes:
    git commit -m "Add your feature"
  4. Push to the branch:
    git push origin feature/your-feature-name
  5. Open a pull request.

📜 License

This project is open source and available under the MIT 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! 🚀

About

AppUnitTest is a Swift project demonstrating unit testing for iOS applications using XCTest.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages