Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.5%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

Basic Info
  • Host: GitHub
  • Owner: philippzagar
  • License: mit
  • Language: Swift
  • Default Branch: feature/fix-flakey-healthkit-tests
  • Size: 46.9 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created almost 3 years ago · Last pushed almost 3 years ago
Metadata Files
Readme License Citation

README.md

XCTHealthKit

Build and Test codecov DOI

XCTHealthKit is an XCTest-based framework to test the creation of HealthKit samples using the Apple Health App on the iPhone simulator.

How To Use XCTHealthKit

You can use XCTHealthKit in your UI tests. The API documentation provides a detailed overview of the public interface of XCTHealthKit.

The framework has the following functionalities:

Add Mock Data Using the Apple Health App

Use the XCTestCase's exitAppAndOpenHealth(_: HealthAppDataType) throws function passing in an HealthAppDataType instance to add mock data using the Apple Health app: ```swift import XCTest import XCTHealthKit

class HealthKitUITests: XCTestCase { func testAddMockDataUsingTheAppleHealthApp() throws { try exitAppAndOpenHealth(.electrocardiograms) try exitAppAndOpenHealth(.steps) try exitAppAndOpenHealth(.pushes) try exitAppAndOpenHealth(.restingHeartRate) try exitAppAndOpenHealth(.activeEnergy) } } ```

Handle the HealthKit Authorization Sheet

You can use the XCUIApplication's handleHealthKitAuthorization() throws function to handle the HealthKit authorization sheet: ```swift import XCTest import XCTHealthKit

class HealthKitUITests: XCTestCase { func testHandleTheHealthKitAuthorizationSheet() throws { let app = XCUIApplication() app.launch()

    app.buttons["Request HealthKit Authorization"].tap()
    try app.handleHealthKitAuthorization()
}

} ```

Installation

The project can be added to your Xcode project or Swift Package using the Swift Package Manager.

Xcode: For an Xcode project, follow the instructions on Adding package dependencies to your app.

Swift Package: You can follow the Swift Package Manager documentation about defining dependencies to add this project as a dependency to your Swift Package.

License

This project is licensed under the MIT License. See Licenses for more information.

Contributors

This project is developed as part of the Stanford Byers Center for Biodesign at Stanford University. See CONTRIBUTORS.md for a full list of all XCTHealthKit contributors.

Stanford Byers Center for Biodesign Logo Stanford Byers Center for Biodesign Logo

Owner

  • Name: Philipp Zagar
  • Login: philippzagar
  • Kind: user
  • Location: Stanford, United States
  • Company: Stanford University

SWE @ Apple | SWE @ Stanford Biodesign | prev. Google DSC, Stanford, TUM

Citation (CITATION.cff)

#
# This source file is part of the XCTHealthKit open source project
#
# SPDX-FileCopyrightText: 2022 Stanford University and the project authors (see CONTRIBUTORS.md)
#
# SPDX-License-Identifier: MIT
# 

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Schmiedmayer"
  given-names: "Paul"
  orcid: "https://orcid.org/0000-0002-8607-9148"
title: "XCTHealthKit"
doi: 10.5281/zenodo.7538174
url: "https://github.com/StanfordBDHG/XCTHealthKit"

GitHub Events

Total
Last Year

Committers

Last synced: about 1 year ago

All Time
  • Total Commits: 18
  • Total Committers: 2
  • Avg Commits per committer: 9.0
  • Development Distribution Score (DDS): 0.056
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Paul Schmiedmayer P****r 17
Philipp Zagar p****r@g****m 1

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 0
  • Total pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: less than a minute
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • philippzagar (1)
Top Labels
Issue Labels
Pull Request Labels

Dependencies

.github/workflows/build-and-test.yml actions
.github/workflows/pull_request.yml actions
Package.swift swiftpm