Skip to content

ianrhamilton/fastlane-plugin-saucectl

Repository files navigation

fastlane-plugin-saucectl

fastlane Plugin Badge Gem Version Gem Downloads

Getting Started

This project is a fastlane plugin. To get started with fastlane-plugin-saucectl, add it to your project by running:

fastlane add_plugin saucectl

About fastlane-plugin-saucectl

The purpose of this plugin is to simplify the set-up, configuration, upload, and execution of espresso and XCUITest on the Sauce Labs platform by utilizing fastlane which will enable you to test your iOS and Android apps at scale.

IMPORTANT: To use this plugin to execute UI tests on Sauce Labs, your test class names must proceed with Spec, Specs, Tests, or Test, for example ExampleSpec, ExampleSpecs, ExampleTest, or ExampleTests. Your test case names must also begin with test, for example testIDoSomething, testIDoSomethingElse. This is so that the plugin can search for test classes and their included test cases.

Failure to do this will result in missing test classes and test cases from your test run.

For a detailed introduction to each of the actions available within this plugin, please see the documentation.

Available Actions Description
install_saucectl Downloads the Sauce Labs saucectl cli binary for test execution. Optionally specify the version you wish to install or automatically download the latest.
sauce_upload Upload test artifacts to sauce labs storage
sauce_config Create SauceLabs configuration file for test execution based on given parameters
sauce_runner Execute automated tests on sauce labs platform via saucectl binary for specified configuration
delete_from_storage Delete test artifacts from sauce labs storage by storage id or group id
sauce_apps Returns the set of files by specific app id that have been uploaded to Sauce Storage by the requester
sauce_devices Returns a list of Device IDs for all devices in the data center that are currently free for testing.
disabled_tests Fetches any disabled ui test cases (for android searches for @Ignore tests, and for ios skipped tests within an xcode test plan). Plan is to use this in the future for generating pretty HTML reports

Example

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 test.

Note to author: Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary)

Run tests for this plugin

To run both the tests, and code style validation, run

rake

To automatically fix many of the styling issues, use

rubocop -a

Issues and Feedback

For any other issues and feedback about this plugin, please submit it to this repository.

Troubleshooting

If you have trouble using plugins, check out the Plugins Troubleshooting guide.

Using fastlane Plugins

For more information about how the fastlane plugin system works, check out the Plugins documentation.

About fastlane

fastlane is the easiest way to automate beta deployments and releases for your iOS and Android apps. To learn more, check out fastlane.tools.

Buy me a coffee

If you're enjoying this plugin, feel free to optionally buy me a coffee :)

"Buy Me A Coffee"