Awesome
Mussel
As of Xcode 12.4, users are able to test Push Notifications via the simulator. Unfortunately, Apple has yet to introduce the ability to leverage this new method within the XCUITest Framework.
Testing Universal Links can also be an adventure, potentially accumulating lots of extra unwanted time in UI Tests, especially if your team wants to speed up your app's regression progress. Conventional methods resorted to using iMessage or Contacts to open Universal Links which routed to a specific feature within an application.
Mussel introduces a quick and simple way to test Push Notifications and Universal Links which route to any specific features within your iOS app.
Checkout the Mussel
framework for use within your iOS projects: https://github.com/UrbanCompass/Mussel
How It Works:
- An Engineer triggers XCUITests in XCode manually or through your Continuous Integration platform of choice.
- Mussel Server boots up along with the iOS Simulator.
- A Test Case triggers a Push Notification or Universal Link Test Case
- The Test Case sends a payload containing Push Notification or Universal Link data via POST Request.
- Server runs respective xcrun simctl command for Push Notifications or Universal Links.
- The command presents a Push Notification or launches a Universal Link within the iOS Simulator.
How to use this Step
Can be run directly with the bitrise CLI,
just git clone
this repository, cd
into it's folder in your Terminal/Command Line
and call bitrise run test
.
Check the bitrise.yml
file for required inputs which have to be
added to your .bitrise.secrets.yml
file!
Step by step:
- Open up your Terminal / Command Line
git clone
the repositorycd
into the directory of the step (the one you justgit clone
d)- Create a
.bitrise.secrets.yml
file in the same directory ofbitrise.yml
(the.bitrise.secrets.yml
is a git ignored file, you can store your secrets in it) - Check the
bitrise.yml
file for any secret you should set in.bitrise.secrets.yml
- Best practice is to mark these options with something like
# define these in your .bitrise.secrets.yml
, in theapp:envs
section.
- Once you have all the required secret parameters in your
.bitrise.secrets.yml
you can just run this step with the bitrise CLI:bitrise run test
An example .bitrise.secrets.yml
file:
envs:
- A_SECRET_PARAM_ONE: the value for secret one
- A_SECRET_PARAM_TWO: the value for secret two
How to contribute to this Step
- Fork this repository
git clone
it- Create a branch you'll work on
- To use/test the step just follow the How to use this Step section
- Do the changes you want to
- Run/test the step before sending your contribution
- You can also test the step in your
bitrise
project, either on your Mac or on bitrise.io - You just have to replace the step ID in your project's
bitrise.yml
with either a relative path, or with a git URL format - (relative) path format: instead of
- original-step-id:
use- path::./relative/path/of/script/on/your/Mac:
- direct git URL format: instead of
- original-step-id:
use- git::https://github.com/user/step.git@branch:
- You can find more example of alternative step referencing at: https://github.com/bitrise-io/bitrise/blob/master/_examples/tutorials/steps-and-workflows/bitrise.yml
- Once you're done just commit your changes & create a Pull Request
How to share this Step
You can share your Step or step version with the bitrise CLI. If you use the bitrise.yml
included in this repository, all you have to do is:
- In your Terminal / Command Line
cd
into this directory (where thebitrise.yml
of the step is located) - Run:
bitrise run test
to test the step - Run:
bitrise run audit-this-step
to audit thestep.yml
- Check the
share-this-step
workflow in thebitrise.yml
, and fill out theenvs
if you haven't done so already (don't forget to bump the version number if this is an update of your step!) - Then run:
bitrise run share-this-step
to share the step (version) you specified in theenvs
- Send the Pull Request, as described in the logs of
bitrise run share-this-step