calabash-android 0.0.19 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES.txt +8 -0
- data/bin/calabash-android-run.rb +11 -0
- data/features-skeleton/support/app_life_cycle_hooks.rb +1 -1
- data/lib/calabash-android/version.rb +2 -2
- data/test-server/AndroidManifest.xml +1 -1
- data/test-server/instrumentation-backend/.classpath +1 -1
- data/test-server/instrumentation-backend/.settings/org.eclipse.jdt.core.prefs +11 -0
- data/test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/CalabashInstrumentationTestRunner.java +23 -0
- metadata +6 -4
data/CHANGES.txt
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
0.1.0:
|
2
|
+
Added support for testing Xamarin Mono for Android apps.
|
3
|
+
Currently only Release builds are supported.
|
4
|
+
This new version requires you make changes in
|
5
|
+
features/support/app_life_cycle_hooks.rb.
|
6
|
+
The first time you execute "calabash-android run" upgrade instructions
|
7
|
+
will be displayed.
|
8
|
+
|
1
9
|
0.0.19:
|
2
10
|
take_screenshot now works with Ruby 1.8.7
|
3
11
|
|
data/bin/calabash-android-run.rb
CHANGED
@@ -1,6 +1,17 @@
|
|
1
1
|
def calabash_run(args)
|
2
2
|
run_build_if_test_server_does_not_exist
|
3
3
|
|
4
|
+
old_runner = "android.test.InstrumentationTestRunner"
|
5
|
+
new_rummer = "sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner"
|
6
|
+
f = "features/support/app_life_cycle_hooks.rb"
|
7
|
+
|
8
|
+
if File.exist?(f) and IO.read(f).include? old_runner
|
9
|
+
puts "Calabash has been updated"
|
10
|
+
puts "Please do the following to update your project:"
|
11
|
+
puts "1) Open #{f} in a text editor"
|
12
|
+
puts "2) Replace #{old_runner} with #{new_rummer}"
|
13
|
+
exit
|
14
|
+
end
|
4
15
|
|
5
16
|
settings = JSON.parse(IO.read(".calabash_settings"))
|
6
17
|
|
@@ -3,7 +3,7 @@ require 'calabash-android/management/adb'
|
|
3
3
|
Before do |scenario|
|
4
4
|
|
5
5
|
return if scenario.failed? #No need to start the server is anything before this has failed.
|
6
|
-
cmd = "#{adb_command} shell am instrument -w -e class sh.calaba.instrumentationbackend.InstrumentationBackend #{ENV['TEST_PACKAGE_NAME']}/
|
6
|
+
cmd = "#{adb_command} shell am instrument -w -e class sh.calaba.instrumentationbackend.InstrumentationBackend #{ENV['TEST_PACKAGE_NAME']}/sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner"
|
7
7
|
log "Starting test server using:"
|
8
8
|
log cmd
|
9
9
|
if is_windows?
|
@@ -8,6 +8,6 @@
|
|
8
8
|
<uses-library android:name="android.test.runner" />
|
9
9
|
</application>
|
10
10
|
<uses-sdk android:minSdkVersion="4" />
|
11
|
-
<instrumentation android:targetPackage="#TESTED_APP_PACKAGE#" android:name="
|
11
|
+
<instrumentation android:targetPackage="#TESTED_APP_PACKAGE#" android:name="sh.calaba.instrumentationbackend.CalabashInstrumentationTestRunner" />
|
12
12
|
<uses-permission android:name="android.permission.INTERNET" />
|
13
13
|
</manifest>
|
@@ -5,6 +5,6 @@
|
|
5
5
|
<classpathentry kind="src" path="assets"/>
|
6
6
|
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
|
7
7
|
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
|
8
|
-
<classpathentry kind="lib" path="libs/robotium-solo-3.
|
8
|
+
<classpathentry kind="lib" path="libs/robotium-solo-3.3.jar"/>
|
9
9
|
<classpathentry kind="output" path="bin/classes"/>
|
10
10
|
</classpath>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
eclipse.preferences.version=1
|
2
|
+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
3
|
+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
4
|
+
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
5
|
+
org.eclipse.jdt.core.compiler.compliance=1.6
|
6
|
+
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
7
|
+
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
8
|
+
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
9
|
+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
10
|
+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
11
|
+
org.eclipse.jdt.core.compiler.source=1.6
|
@@ -0,0 +1,23 @@
|
|
1
|
+
package sh.calaba.instrumentationbackend;
|
2
|
+
|
3
|
+
import java.lang.reflect.Method;
|
4
|
+
|
5
|
+
import android.content.Context;
|
6
|
+
import android.os.Bundle;
|
7
|
+
import android.test.InstrumentationTestRunner;
|
8
|
+
|
9
|
+
public class CalabashInstrumentationTestRunner extends InstrumentationTestRunner {
|
10
|
+
@Override
|
11
|
+
public void onCreate(Bundle arguments) {
|
12
|
+
try {
|
13
|
+
Context context = getTargetContext ();
|
14
|
+
Class<?> c = Class.forName("mono.MonoPackageManager");
|
15
|
+
Method method = c.getDeclaredMethod ("LoadApplication", Context.class, String.class, String[].class);
|
16
|
+
method.invoke (null, context, null, new String[]{context.getApplicationInfo ().sourceDir});
|
17
|
+
System.out.println("Calabash loaded Mono");
|
18
|
+
} catch (Exception e) {
|
19
|
+
System.out.println("Calabash could not load Mono");
|
20
|
+
}
|
21
|
+
super.onCreate(arguments);
|
22
|
+
}
|
23
|
+
}
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: calabash-android
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
+
- 1
|
8
9
|
- 0
|
9
|
-
|
10
|
-
version: 0.0.19
|
10
|
+
version: 0.1.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jonas Maturana Larsen
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-06-
|
18
|
+
date: 2012-06-20 00:00:00 -03:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -123,6 +123,7 @@ files:
|
|
123
123
|
- test-server/build.xml
|
124
124
|
- test-server/instrumentation-backend/.classpath
|
125
125
|
- test-server/instrumentation-backend/.project
|
126
|
+
- test-server/instrumentation-backend/.settings/org.eclipse.jdt.core.prefs
|
126
127
|
- test-server/instrumentation-backend/AndroidManifest.xml
|
127
128
|
- test-server/instrumentation-backend/assets/foo.bar
|
128
129
|
- test-server/instrumentation-backend/gen/com/lesspainful/simpleui/test/R.java
|
@@ -133,6 +134,7 @@ files:
|
|
133
134
|
- test-server/instrumentation-backend/res/drawable-mdpi/ic_launcher.png
|
134
135
|
- test-server/instrumentation-backend/res/layout/main.xml
|
135
136
|
- test-server/instrumentation-backend/res/values/strings.xml
|
137
|
+
- test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/CalabashInstrumentationTestRunner.java
|
136
138
|
- test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/Command.java
|
137
139
|
- test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/InstrumentationBackend.java
|
138
140
|
- test-server/instrumentation-backend/src/sh/calaba/instrumentationbackend/Result.java
|