<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 25, 2015 at 4:53 PM, Lukáš Fryč <span dir="ltr">&lt;<a href="mailto:lukas.fryc@gmail.com" target="_blank">lukas.fryc@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">This sounds great, Stefan,<br><br>questions:<div>1. what about automate this as a commit-triggered CI build on AeroGear CloudBees jenkins?<div>2. are we able to automate more platforms such as iOS?</div></div></div></blockquote><div><br></div><div>Yes but not on iOS simulator so it won&#39;t be possible to do this on remote Jenkins. iOS unfortunately supports push notifications only on real devices.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>It would be huge time-saver if this build could actually test that UPS pushes successfully to Android (and potentially iOS) and report that as a comment to each Pull Request. No matter how long it would take, half an hour is my ideal here considering the use case ;-)</div><div><br></div><div>~ Lukas</div><div><br></div></div><br><div class="gmail_quote">st 25. 3. 2015 v 16:37 odesílatel Stefan Miklosovic &lt;<a href="mailto:smikloso@redhat.com" target="_blank">smikloso@redhat.com</a>&gt; napsal:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi,<div><br></div><div>I think few days ago there was some information from Karel Piwko that we developed fully automatic functional tests when it comes to Cordova quickstarts (1) (hello world and shoot and share)</div><div><br></div><div>We think that it could be useful for developers as well. This tests the whole life cycle of the push from creation of UPS cartridge through building of the example to the functional test in a fully automatic manner from zero setup to push notification receive at mobile device you have connected to your notebook and it could be useful for developers in order to not execute it manually every time and set it up all over again.</div><div><br></div><div>By what I mean &quot;fully automatic&quot; is the following scenario:</div><div><br></div><div>1) Automatic creation of UPS cartridge on OpenShift right from our test, patched with this extension * (2), (3)</div><div>2) Because of the deployed extension to UPS in 1), we can login via REST and we do not need to change passwords so we can create application with some variant directly from our test script (4)</div><div>3) After this is done, quickstart example is downloaded from GH, Android SDK is installed locally at your PC, quickstart is filled with application and google credentials automatically and after that it is built</div><div>4) APK built in 3) is then used in functional test by Arquillian Droidium (5) which deploys that APK to physical device and in that test, we send push notification request to UPS</div><div>5) Once push notification comes to UPS, it sends it to GCM which in turn sends it to physical device and Droidium test asserts that the message really came and appeared on the mobile device.</div><div><br></div><div>It takes about 10 minutes, you have to have Android device attached to your PC since test will communicate with it. Time could be massively decreased when you do not expect new OS UPS instance to be created every time.<br></div><div><br></div><div>You execute it like this in <a href="https://github.com/aerogear/aerogear-unifiedpush-server-integration-tests" target="_blank">https://github.com/aerogear/aerogear-unifiedpush-server-integration-tests</a> repository</div><div><br></div><div>./gradlew test -Pprofile=helloWorldCordovaQuickstart \ </div><div>    -PgoogleProjectNumber=&lt;your  project number&gt; \</div><div>    -PgoogleKey=&lt;your google key&gt; \</div><div>    -PopenShiftUsername=&lt;email of your openshift account&gt;</div><div>    -PopenShiftPassword=&lt;password for your openshift account&gt; \ </div><div>    -PopenShiftCartridge=<a href="https://cartreflect-claytondev.rhcloud.com/reflect?github=aerogear/openshift-origin-cartridge-aerogear-push" target="_blank">https://cartreflect-claytondev.rhcloud.com/reflect?github=aerogear/openshift-origin-cartridge-aerogear-push</a> \</div><div>    -PopenShiftAppDirectory=aerogear-push<br></div><div><br></div><div>Similar process is executed with Shoot &amp; Share demo where we send image to Facebook. All triggered by one shell command from integration tests and after that the above magic happens.</div><div><br></div><div>I case you want to use it and you struggle with it, feel free to ask me for guidance.</div><div><br></div><div>* unified-test-extension adds custom functionality to UPS cartridge, it adds fancy performance test endpoints where you can feed UPS instance with custom number of generated installations / categories / variants and so on. More to it, it can put proxy behind sender API so push notifications goes nowhere in the end but it seems like they were indeed sent from UPS point of view. This is particularly handy in test environment where you really do not want to send anything to APNS or GCM.<br></div><div><div><br></div><div>(1) <a href="https://github.com/jboss-mobile/unified-push-helloworld" target="_blank">https://github.com/jboss-mobile/unified-push-helloworld</a></div><div>(2) <a href="https://github.com/aerogear/aerogear-testing-tools/tree/master/unifiedpush-test-extension" target="_blank">https://github.com/aerogear/aerogear-testing-tools/tree/master/unifiedpush-test-extension</a></div><div>(3) <a href="https://github.com/aerogear/aerogear-unifiedpush-server-integration-tests/blob/master/build.gradle#L354-L356" target="_blank">https://github.com/aerogear/aerogear-unifiedpush-server-integration-tests/blob/master/build.gradle#L354-L356</a></div><div>(4) <a href="https://github.com/aerogear/aerogear-unifiedpush-server-integration-tests/blob/master/build.gradle#L472-L543" target="_blank">https://github.com/aerogear/aerogear-unifiedpush-server-integration-tests/blob/master/build.gradle#L472-L543</a></div><div>(5) <a href="https://github.com/aerogear/aerogear-unifiedpush-server-integration-tests/blob/master/quickstartTests/aerogear-push-helloworld-cordova/src/test/java/org/jboss/aerogear/push/helloworld/cordova/test/AerogearPushHelloworldCordovaTestCase.java#L65-L85" target="_blank">https://github.com/aerogear/aerogear-unifiedpush-server-integration-tests/blob/master/quickstartTests/aerogear-push-helloworld-cordova/src/test/java/org/jboss/aerogear/push/helloworld/cordova/test/AerogearPushHelloworldCordovaTestCase.java#L65-L85</a></div><div><br></div>-- <br><div><div dir="ltr"><div>Stefan Miklosovic</div><div>Red Hat Brno - JBoss Mobile Platform</div><div><br></div><div>e-mail: <a href="mailto:smikloso@redhat.com" target="_blank">smikloso@redhat.com</a></div><div>irc: smikloso</div></div></div>
</div></div></div></div>
______________________________<u></u>_________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org" target="_blank">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/<u></u>mailman/listinfo/aerogear-dev</a></blockquote></div>
<br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">--<div>Tadeas Kriz</div></div></div>
</div></div>