Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Added an automator script for the CoverStory #4

Merged
merged 7 commits into from
This page is out of date. Refresh to see the latest.
View
22 Coverage/ExportHtml.automator
@@ -0,0 +1,22 @@
+on run argv
+
+ tell application "/Applications/CoverStory.app"
+
+ quit
+
+ activate
+
+ set x to open (item 1 of argv)
+
+ tell x to export to HTML in (item 2 of argv)
+
+ quit
+
+ end tell
+
+
+
+ return item 1 of argv & "|" & item 2 of argv
+
+end run
+
View
1  Coverage/ExportHtmlComment.txt
@@ -0,0 +1 @@
+http://jorudolph.wordpress.com/category/ios-continous-integration-series/
View
3  Coverage/README.md
@@ -32,4 +32,5 @@ size_t fwrite$UNIX2003( const void *a, size_t b, size_t c, FILE *d )
}
```
-Add the code above to any .c file that is going to be linked into your application (must be in app itself, not the tests bundle).
+Add the code above to any .c file that is going to be linked into your application (must be in app itself, not the tests bundle). You can find this file in the source tree above.
+Alternatively, you can link libCoverageFopenFix.a to it. This is a "fat" library that can be used both with for device and the simulator build.
View
6 Tests/Jasmine/README.md
@@ -11,7 +11,9 @@
UI Automation has a few issues, to make it work on simulator you need to launch it as follows:
```shell
-TPL=/Developer/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate
+
+XCODE_PATH=`xcode-select -print-path`
+TPL=$XCODE_PATH/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate
APP=/Users/USERNAME/Library/Developer/Xcode/DerivedData/APP-RANDOMHASH/Build/Products/CONFIG-iphonesimulator/APPNAME.app
instruments -t "$TPL" "$APP" -e UIASCRIPT PATHTOYOUR/suite.js -e UIARESULTSPATH PATHTO/ARTIFACTS
@@ -79,4 +81,4 @@ describe("PocketCasts", function() {
2012-02-10 10:07:19 +0000 Fail: Expected 'Tap to download video' to equal 'Tap to subscribe at railscasts.com'.
Instruments Trace Complete (Duration : 8.940802s; Output : /Users/farcaller/Developer/Active/pocketcasts/PocketCasts/instrumentscli4.trace)
-```
+```
View
6 Tests/Jasmine/RunAutomationScript.sh
@@ -0,0 +1,6 @@
+
+XCODE_PATH=`xcode-select -print-path`
+TPL=$XCODE_PATH/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate
+APP=/Users/USERNAME/Library/Developer/Xcode/DerivedData/APP-RANDOMHASH/Build/Products/CONFIG-iphonesimulator/APPNAME.app
+
+instruments -t "$TPL" "$APP" -e UIASCRIPT PATHTOYOUR/suite.js -e UIARESULTSPATH PATHTO/ARTIFACTS
View
38 Tests/Jasmine/SampleSpec.sh
@@ -0,0 +1,38 @@
+describe("PocketCasts", function() {
+ var target = UIATarget.localTarget();
+
+ function dumpTree() {
+ UIATarget.localTarget().frontMostApp().logElementTree();
+ }
+
+ function pickVideoWithIndex(i) {
+ target.frontMostApp().mainWindow().tableViews()[0].visibleCells()[i].tap();
+ }
+
+ function firstTableGroup() {
+ return target.frontMostApp().mainWindow().tableViews()[0].groups()[0];
+ }
+
+ function goBack() {
+ target.frontMostApp().navigationBar().leftButton().tap();
+ }
+
+ afterEach(function(){
+ goBack();
+ });
+
+ it("should show download button for video, that is not downloaded", function(){
+ pickVideoWithIndex(0);
+ expect(firstTableGroup().name()).toEqual("Tap to download video");
+ });
+
+ it("should show play button for video that is downloaded", function(){
+ pickVideoWithIndex(1);
+ expect(firstTableGroup().name()).toEqual("Tap to play video");
+ });
+
+ it("should show subscribe button for pro video when there's no subscription", function(){
+ pickVideoWithIndex(2);
+ expect(firstTableGroup().name()).toEqual("Tap to subscribe at railscasts.com");
+ });
+});
Something went wrong with that request. Please try again.