Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
fastlane-plugin-xcodetestcoverage
Advanced tools
This project is a fastlane plugin. To get started with fastlane-plugin-xcodetestcoverage
, add it to your project by running:
fastlane add_plugin xcodetestcoverage
Plugin for getting test data from Xcode
It has to be run after tests. Returns hash contains keys: name, coverage, coveredLines, executableLines:
run_tests()
result = xcodetestcoverage()
puts(result["name"]) #current test target name
puts(result["coverage"]) #current coverage percentage
puts(result["coveredLines"])
puts(result["executableLines"])
parameters:
minimumCoveragePercentage - Minimum acceptable coverage percentage. Call coverageExceptionCallback. Then raise error if overall coverage percentage is under this value and the option enableDefaultCoverageException is enabled", type: Float, optional: true.
enableDefaultCoverageException - Raise error if overall coverage percentage is under this minimumCoveragePercentage and this option is enabled, optional: true, default_value: true
enableDataFailedException - Raise error if can not read the test data and this option is enabled optional: true, default_value: false
dataFailedExceptionCallback - Optional data failed exception callback argument, optional: true, type: Proc
coverageExceptionCallback - Optional coverage exception callback argument" optional: true, type: Proc
testTargetName - searches test target to display coverage percentages, if it is empty the results contains the target with the highest percentage value, optional: true, type: String
xcresultPath - alternative path to xcresult, optional: true, type: String
Check out the example Fastfile
to see how to use this plugin. Try it by cloning the repo, running fastlane install_plugins
and bundle exec fastlane tests
.
If you need to throw an exception on coverage percantage, set the parameter minimumCoveragePercentage. If you want to call your code in this case set coverageExceptionCallback. You can disable defaultException if you set enableDefaultCoverageException = false.
xcodetestcoverage(minimumCoveragePercentage: 40.0,
coverageExceptionCallback: ->(value) {
UI.message("Test coverage failed #{value}")
})
If you need to throw an exception on test data read error, set the parameter enableDataFailedException = true. If you want to call your code in this case set dataFailedExceptionCallback.
xcodetestcoverage(minimumCoveragePercentage: 45.0,
enableDataFailedException: true,
dataFailedExceptionCallback: ->() {
UI.message("Data reading error")
}
)
You can use alternative path to xcresult. In this case, running a test via fastlane (with the command scan or run_tests) before xcodetestcoverage is optional.
reportPath = "test.xcresult"
xcodetestcoverage(minimumCoveragePercentage: 30.0,
enableDataFailedException: true,
xcresultPath: reportPath)
For any other issues and feedback about this plugin, please submit it to this repository.
If you have trouble using plugins, check out the Plugins Troubleshooting guide.
For more information about how the fastlane
plugin system works, check out the Plugins documentation.
fastlane is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out fastlane.tools.
FAQs
Unknown package
We found that fastlane-plugin-xcodetestcoverage demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.