xamarin-test-cloud 1.1.2 → 2.0.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d11eb39a746ce84d8cb000b9c65304a65fd24501
4
- data.tar.gz: 619c93a8ecd27ec6b3dcd98215f8568690e2cfe6
3
+ metadata.gz: b8ce3574021504d1c37d218b7816a8be26b0e958
4
+ data.tar.gz: 5eee5e4df2534d4b7e1211ff4b05863b2ce6b24c
5
5
  SHA512:
6
- metadata.gz: d03e7dd12775e26b3c5ae568b75880da1dfb0a0d1fe7ef81650e0f49a881c196f6c8970be0cf718e85166146b36b978c9345e6713ed26fce86f55774b0032164
7
- data.tar.gz: 7e0185532379f1296bfc38e38bbf305db426fd454464e54529ad56bbb685371ea71940834d9ae4b86c4d626898ce899c830e63af8935f7e948d70db6ddb27f6c
6
+ metadata.gz: 879ebe1c1ce04963405374a2b5510eac9bb1e0ae8a8e902d7956242da95e47346df7874d18b5173d14876f774859ecd5eb9f870ec7d6fcd216fe1f1bb390c7cc
7
+ data.tar.gz: 3c936024d954fe9702e9617b733fc238ece5c777d5ee5f813b6b2d58523acd660f67b6c1485d5ee7a2876af51f6f1a036d63a2bc0535384a16f35c0c32ebc2a6
data/CHANGELOG.md ADDED
@@ -0,0 +1,12 @@
1
+ ### 2.0.0
2
+
3
+ * Set minimum ruby verision to 2.0
4
+ * Gem does not work in Windows environment: ffi cannot be found. #34
5
+
6
+ ### 1.1.2
7
+
8
+ * Remove restriction on mime-type gem version < 2.0
9
+
10
+ ### 0.9.0 Initial beta
11
+
12
+ * Supports upload of Calabash test suites to https://testcloud.xamarin.com.
data/README.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## Test Cloud Command Line
2
2
 
3
+ [![Build Status](https://magnum.travis-ci.com/xamarin/test-cloud-command-line.svg?token=y4VsoGUG24WhMo7qoBu3&branch=master)](https://magnum.travis-ci.com/xamarin/test-cloud-command-line)
4
+
5
+ ### Requirements
6
+
7
+ * ruby >= 2.0
8
+
3
9
  ### Testing
4
10
 
5
11
  ```
@@ -1,3 +1,3 @@
1
1
  module XamarinTestCloud
2
- VERSION = '1.1.2'
2
+ VERSION = "2.0.0.pre1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xamarin-test-cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 2.0.0.pre1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karl Krukow
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-09-03 00:00:00.000000000 Z
12
+ date: 2015-11-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
@@ -255,21 +255,12 @@ executables:
255
255
  extensions: []
256
256
  extra_rdoc_files: []
257
257
  files:
258
- - CHANGES.txt
258
+ - CHANGELOG.md
259
259
  - README.md
260
260
  - bin/test-cloud
261
261
  - lib/xamarin-test-cloud/cli.rb
262
262
  - lib/xamarin-test-cloud/retriable_options.rb
263
263
  - lib/xamarin-test-cloud/version.rb
264
- - test/ipa/features/step_definitions/calabash_steps.rb
265
- - test/ipa/features/step_definitions/my_first_steps.rb
266
- - test/ipa/features/support/env.rb
267
- - test/ipa/features/support/hooks.rb
268
- - test/ipa/features/support/launch.rb
269
- - test/retriable/features/step_definitions/retriable_steps.rb
270
- - test/retriable/features/support/env.rb
271
- - test/retriable/run-tests.rb
272
- - test/test_parser.rb
273
264
  homepage: http://xamarin.com/test-cloud
274
265
  licenses: []
275
266
  metadata: {}
@@ -281,25 +272,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
281
272
  requirements:
282
273
  - - ">="
283
274
  - !ruby/object:Gem::Version
284
- version: '0'
275
+ version: '2.0'
285
276
  required_rubygems_version: !ruby/object:Gem::Requirement
286
277
  requirements:
287
- - - ">="
278
+ - - ">"
288
279
  - !ruby/object:Gem::Version
289
- version: '0'
280
+ version: 1.3.1
290
281
  requirements: []
291
282
  rubyforge_project:
292
283
  rubygems_version: 2.4.8
293
284
  signing_key:
294
285
  specification_version: 4
295
286
  summary: Command-line interface to Xamarin Test Cloud
296
- test_files:
297
- - test/ipa/features/step_definitions/calabash_steps.rb
298
- - test/ipa/features/step_definitions/my_first_steps.rb
299
- - test/ipa/features/support/env.rb
300
- - test/ipa/features/support/hooks.rb
301
- - test/ipa/features/support/launch.rb
302
- - test/retriable/features/step_definitions/retriable_steps.rb
303
- - test/retriable/features/support/env.rb
304
- - test/retriable/run-tests.rb
305
- - test/test_parser.rb
287
+ test_files: []
288
+ has_rdoc:
data/CHANGES.txt DELETED
@@ -1,2 +0,0 @@
1
- 0.9.0 Initial beta
2
- Supports upload of Calabash test suites to https://testcloud.xamarin.com.
@@ -1 +0,0 @@
1
- require 'calabash-cucumber/calabash_steps'
@@ -1,4 +0,0 @@
1
- Given /^I am on the Welcome Screen$/ do
2
- element_exists("view")
3
- sleep(STEP_PAUSE)
4
- end
@@ -1 +0,0 @@
1
- require 'calabash-cucumber/cucumber'
File without changes
@@ -1,77 +0,0 @@
1
- ########################################
2
- # #
3
- # Important Note #
4
- # #
5
- # When running calabash-ios tests at #
6
- # www.xamarin-test-cloud.com #
7
- # this file will be overwritten by #
8
- # a file which automates #
9
- # app launch on devices. #
10
- # #
11
- # Don't rely on this file being #
12
- # present when running at #
13
- # www.xamarin-test-cloud.com. #
14
- # #
15
- # Only put stuff here to automate #
16
- # iOS Simulator. #
17
- # #
18
- # You can put your app bundle path #
19
- # for automating simulator app start: #
20
- # Uncomment APP_BUNDLE_PATH =.. #
21
- # #
22
- ########################################
23
-
24
- require 'calabash-cucumber/launch/simulator_helper'
25
- require 'sim_launcher'
26
-
27
- # Uncomment and replace ?? appropriately
28
- # This should point to your Simulator build
29
- # which includes calabash framework
30
- # this is usually the Calabash build configuration
31
- # of your production target.
32
- #APP_BUNDLE_PATH = "~/Library/Developer/Xcode/DerivedData/??/Build/Products/Calabash-iphonesimulator/??.app"
33
- #
34
-
35
- def reset_app_jail(sdk, app_path)
36
- app = File.basename(app_path)
37
- bundle = `find "#{ENV['HOME']}/Library/Application Support/iPhone Simulator/#{sdk}/Applications/" -type d -depth 2 -name #{app} | head -n 1`
38
- return if bundle.empty? # Assuming we're already clean
39
-
40
- sandbox = File.dirname(bundle)
41
- ['Library', 'Documents', 'tmp'].each do |dir|
42
- FileUtils.rm_rf(File.join(sandbox, dir))
43
- end
44
- end
45
-
46
- def relaunch
47
- if ENV['NO_LAUNCH']!="1"
48
- sdk = ENV['SDK_VERSION'] || SimLauncher::SdkDetector.new().latest_sdk_version
49
- path = Calabash::Cucumber::SimulatorHelper.app_bundle_or_raise(app_path)
50
- if ENV['RESET_BETWEEN_SCENARIOS']=="1"
51
- reset_app_jail(sdk, path)
52
- end
53
-
54
- Calabash::Cucumber::SimulatorHelper.relaunch(path,sdk,ENV['DEVICE'] || 'iphone')
55
- end
56
- end
57
-
58
- def app_path
59
- ENV['APP_BUNDLE_PATH'] || (defined?(APP_BUNDLE_PATH) && APP_BUNDLE_PATH)
60
- end
61
-
62
- def calabash_notify
63
- if self.respond_to?(:on_launch)
64
- self.on_launch
65
- end
66
- end
67
-
68
- Before do |scenario|
69
- relaunch
70
- calabash_notify
71
- end
72
-
73
- at_exit do
74
- if ENV['NO_LAUNCH']!="1" and ENV['NO_STOP']!="1"
75
- Calabash::Cucumber::SimulatorHelper.stop
76
- end
77
- end
@@ -1,51 +0,0 @@
1
- module XamarinTestCloud
2
- module Cukes
3
- module Retriable
4
-
5
- class Error < StandardError
6
- end
7
-
8
- def method_that_raises(n)
9
- unless n >= 3
10
- raise XamarinTestCloud::Cukes::Retriable::Error, "n: '#{n}' argument is < 3"
11
- end
12
- true
13
- end
14
- end
15
- end
16
- end
17
-
18
- World(XamarinTestCloud::Cukes::Retriable)
19
-
20
- Then(/^I call retriable$/) do
21
-
22
- tries = 5
23
- interval = 0.05
24
-
25
- on_retry = Proc.new do |_, try, elapsed_time, next_interval|
26
- if elapsed_time && next_interval
27
- puts "Updating device state attempt #{try} failed in '#{elapsed_time}'; will retry in '#{next_interval}'"
28
- else
29
- puts "Updating device state attempt #{try} failed; will retry in #{interval}"
30
- end
31
- end
32
-
33
- on_opts =
34
- {
35
- :on_retry => on_retry,
36
- :on => [XamarinTestCloud::Cukes::Retriable::Error]
37
- }
38
-
39
- retry_opts = XamarinTestCloud::RetriableOptions.tries_and_interval(tries, interval)
40
-
41
- opts = on_opts.merge(retry_opts)
42
-
43
- counter = 0
44
- Retriable.retriable(opts) do
45
- begin
46
- method_that_raises(counter)
47
- ensure
48
- counter = counter + 1
49
- end
50
- end
51
- end
@@ -1,2 +0,0 @@
1
- require 'xamarin-test-cloud/version'
2
- require 'xamarin-test-cloud/retriable_options'
@@ -1,56 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'open3'
4
- require 'fileutils'
5
-
6
- if RUBY_VERSION.to_i == 1
7
- retriable_versions = ['1.3.3.1', '1.4.0', '1.4.1', '~> 1.3.3.1', ">= 1.3.3.1', '< 2.1"]
8
- else
9
- retriable_versions = ['1.3.3.1', '1.4.0', '1.4.1', '2.0.0', '2.0.1', '2.0.2', ">= 1.3.3.1', '< 2.1"]
10
- end
11
-
12
- system('rake', *['install'])
13
-
14
- working_dir = File.dirname(__FILE__)
15
-
16
- def log_header(message)
17
- if RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/
18
- puts "\n### #{message} ###"
19
- else
20
- puts "\n\e[#{35}m### #{message} ###\e[0m"
21
- end
22
- end
23
-
24
- Dir.chdir working_dir do
25
-
26
- retriable_versions.each do |version|
27
-
28
- log_header("Testing retriable version '#{version}'")
29
-
30
- FileUtils.rm_f('Gemfile.lock')
31
-
32
- File.open('Gemfile', 'w') do |file|
33
- file.puts "source 'https://rubygems.org'"
34
- file.puts "gem 'retriable', '#{version}'"
35
- file.puts "gem 'cucumber', '~> 1.3'"
36
- file.puts "gem 'xamarin-test-cloud'"
37
- end
38
-
39
- env = { 'BUNDLE_GEMFILE' => 'Gemfile' }
40
-
41
- system(env, 'bundle', *['install'], {:out => '/dev/null'})
42
-
43
- exit_status = $?.exitstatus
44
- unless exit_status == 0
45
- puts "Could not bundle: exiting '#{exit_status}'"
46
- exit exit_status
47
- end
48
-
49
- system(env, 'bundle', *['exec','cucumber'])
50
- exit_status = $?.exitstatus
51
- unless exit_status == 0
52
- puts "Cucumbers failed for retriable '#{version}': exiting '#{exit_status}'"
53
- exit exit_status
54
- end
55
- end
56
- end
data/test/test_parser.rb DELETED
@@ -1,70 +0,0 @@
1
- require 'test/unit'
2
- require 'thor'
3
- require 'fileutils'
4
- require 'xamarin-test-cloud/cli'
5
-
6
- class TestParser < Test::Unit::TestCase
7
- def test_should_raise_if_no_app_or_api_key_is_given
8
- config_options = {
9
- 'devices' => "aa59649c",
10
- }
11
- script = XamarinTestCloud::CLI.new([], config_options)
12
- assert_raise Thor::InvocationError do
13
- script.invoke(:submit)
14
- end
15
-
16
- script = XamarinTestCloud::CLI.new(["test/ipa/2012 Olympics_cal.ipa"], config_options)
17
- assert_raise Thor::InvocationError do
18
- script.invoke(:submit)
19
- end
20
-
21
- end
22
-
23
- def test_should_raise_if_app_is_not_file_ipa_or_apk
24
- config_options = {
25
- 'devices' => "aa59649c",
26
- }
27
-
28
- script = XamarinTestCloud::CLI.new(["test/ipa/NONE_EXIST_2012 Olympics_cal.ipa","JIFZCTPZJJXJLEKMMYRY"], config_options)
29
-
30
- assert_raise XamarinTestCloud::ValidationError do
31
- script.invoke(:submit)
32
- end
33
-
34
- script = XamarinTestCloud::CLI.new(["test/ipa/features.zip","JIFZCTPZJJXJLEKMMYRY"], config_options)
35
-
36
- assert_raise XamarinTestCloud::ValidationError do
37
- script.invoke(:submit)
38
- end
39
- end
40
-
41
- def test_should_parse_all_configuration_options
42
- FileUtils.rm_f(File.join("test","vendor"))
43
- FileUtils.rm_f(File.join("test","Gemfile"))
44
- FileUtils.rm_f(File.join("test","Gemfile.lock"))
45
-
46
- config_options = {
47
- :host => "http://localhost:8080",
48
- :workspace => "test/ipa",
49
- :features => "test/ipa/features.zip",
50
- :config => "test/config/cucumber.yml",
51
- :profile => "a",
52
- 'devices' => "aa59649c",
53
- "skip-check" => false,
54
- "reset-between-scenarios" => false,
55
- "dry-run" => true
56
- }
57
- script = XamarinTestCloud::CLI.new(["test/ipa/2012 Olympics_cal.ipa","JIFZCTPZJJXJLEKMMYRY"],config_options)
58
-
59
-
60
- script.invoke(:submit)
61
-
62
- FileUtils.rm_f(File.join("test","vendor","cache"))
63
- FileUtils.rm_f(File.join("test","Gemfile"))
64
- FileUtils.rm_f(File.join("test","Gemfile.lock"))
65
-
66
-
67
-
68
- end
69
-
70
- end