Ifd_Mobile 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +7 -0
  2. data/bin/Ifd_Mobile +25 -0
  3. data/bin/generate.rb +20 -0
  4. data/bin/helper.rb +51 -0
  5. data/lib/Ifd_Mobile.rb +1 -0
  6. data/lib/Ifd_Mobile/methods/IFD_Assertion.rb +44 -0
  7. data/lib/Ifd_Mobile/methods/core.rb +128 -0
  8. data/lib/Ifd_Mobile/methods/lib_var.rb +54 -0
  9. data/lib/Ifd_Mobile/methods/required_files.rb +18 -0
  10. data/lib/Ifd_Mobile/version.rb +5 -0
  11. data/project/Gemfile +7 -0
  12. data/project/Gemfile.lock +182 -0
  13. data/project/apps/TestApp/Default-568h@2x.png +0 -0
  14. data/project/apps/TestApp/Test App 2/GestureTestViewController.h +18 -0
  15. data/project/apps/TestApp/Test App 2/GestureTestViewController.m +48 -0
  16. data/project/apps/TestApp/Test App 2/GestureTestViewController.xib +47 -0
  17. data/project/apps/TestApp/Test App 2/MyViewControllerViewController.h +42 -0
  18. data/project/apps/TestApp/Test App 2/MyViewControllerViewController.m +193 -0
  19. data/project/apps/TestApp/Test App 2/TA2AppDelegate.h +28 -0
  20. data/project/apps/TestApp/Test App 2/TA2AppDelegate.m +85 -0
  21. data/project/apps/TestApp/Test App 2/TestApp-Info.plist +40 -0
  22. data/project/apps/TestApp/Test App 2/TestApp-Prefix.pch +29 -0
  23. data/project/apps/TestApp/Test App 2/en.lproj/InfoPlist.strings +21 -0
  24. data/project/apps/TestApp/Test App 2/en.lproj/Localizable.strings +0 -0
  25. data/project/apps/TestApp/Test App 2/en.lproj/MyViewControllerViewController.xib +175 -0
  26. data/project/apps/TestApp/Test App 2/main.m +31 -0
  27. data/project/apps/TestApp/TestApp.xcodeproj/project.pbxproj +336 -0
  28. data/project/apps/TestApp/TestApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  29. data/project/apps/TestApp/TestApp.xcodeproj/project.xcworkspace/xcuserdata/anhpham.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  30. data/project/apps/TestApp/TestApp.xcodeproj/xcuserdata/anhpham.xcuserdatad/xcschemes/TestApp.xcscheme +88 -0
  31. data/project/apps/TestApp/TestApp.xcodeproj/xcuserdata/anhpham.xcuserdatad/xcschemes/xcschememanagement.plist +22 -0
  32. data/project/apps/TestApp/build/release-iphonesimulator/TestApp.app/Default-568h@2x.png +0 -0
  33. data/project/apps/TestApp/build/release-iphonesimulator/TestApp.app/GestureTestViewController.nib/objects-8.0+.nib +0 -0
  34. data/project/apps/TestApp/build/release-iphonesimulator/TestApp.app/GestureTestViewController.nib/objects.nib +0 -0
  35. data/project/apps/TestApp/build/release-iphonesimulator/TestApp.app/GestureTestViewController.nib/runtime.nib +0 -0
  36. data/project/apps/TestApp/build/release-iphonesimulator/TestApp.app/Info.plist +0 -0
  37. data/project/apps/TestApp/build/release-iphonesimulator/TestApp.app/PkgInfo +1 -0
  38. data/project/apps/TestApp/build/release-iphonesimulator/TestApp.app/TestApp +0 -0
  39. data/project/apps/TestApp/build/release-iphonesimulator/TestApp.app/en.lproj/InfoPlist.strings +0 -0
  40. data/project/apps/TestApp/build/release-iphonesimulator/TestApp.app/en.lproj/Localizable.strings +0 -0
  41. data/project/apps/TestApp/build/release-iphonesimulator/TestApp.app/en.lproj/MyViewControllerViewController.nib/objects-8.0+.nib +0 -0
  42. data/project/apps/TestApp/build/release-iphonesimulator/TestApp.app/en.lproj/MyViewControllerViewController.nib/objects.nib +0 -0
  43. data/project/apps/TestApp/build/release-iphonesimulator/TestApp.app/en.lproj/MyViewControllerViewController.nib/runtime.nib +0 -0
  44. data/project/apps/selendroid-test-app.apk +0 -0
  45. data/project/features/android/Android_test.feature +10 -0
  46. data/project/features/iOS/iOS_test.feature +11 -0
  47. data/project/features/step_definitions/repositories/android_ob_test.rb +2 -0
  48. data/project/features/step_definitions/repositories/ios_ob_test.rb +3 -0
  49. data/project/features/support/env.rb +7 -0
  50. data/project/features/support/hooks.rb +24 -0
  51. data/project/features/support/project_env.rb +38 -0
  52. metadata +155 -0
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Workspace
3
+ version = "1.0">
4
+ <FileRef
5
+ location = "self:TestApp.xcodeproj">
6
+ </FileRef>
7
+ </Workspace>
@@ -0,0 +1,88 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Scheme
3
+ LastUpgradeVersion = "0630"
4
+ version = "1.3">
5
+ <BuildAction
6
+ parallelizeBuildables = "YES"
7
+ buildImplicitDependencies = "YES">
8
+ <BuildActionEntries>
9
+ <BuildActionEntry
10
+ buildForTesting = "YES"
11
+ buildForRunning = "YES"
12
+ buildForProfiling = "YES"
13
+ buildForArchiving = "YES"
14
+ buildForAnalyzing = "YES">
15
+ <BuildableReference
16
+ BuildableIdentifier = "primary"
17
+ BlueprintIdentifier = "3647AE0D15CA0082006F70D6"
18
+ BuildableName = "TestApp.app"
19
+ BlueprintName = "TestApp"
20
+ ReferencedContainer = "container:TestApp.xcodeproj">
21
+ </BuildableReference>
22
+ </BuildActionEntry>
23
+ </BuildActionEntries>
24
+ </BuildAction>
25
+ <TestAction
26
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
27
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
28
+ shouldUseLaunchSchemeArgsEnv = "YES"
29
+ buildConfiguration = "Debug">
30
+ <Testables>
31
+ </Testables>
32
+ <MacroExpansion>
33
+ <BuildableReference
34
+ BuildableIdentifier = "primary"
35
+ BlueprintIdentifier = "3647AE0D15CA0082006F70D6"
36
+ BuildableName = "TestApp.app"
37
+ BlueprintName = "TestApp"
38
+ ReferencedContainer = "container:TestApp.xcodeproj">
39
+ </BuildableReference>
40
+ </MacroExpansion>
41
+ </TestAction>
42
+ <LaunchAction
43
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
44
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
45
+ launchStyle = "0"
46
+ useCustomWorkingDirectory = "NO"
47
+ buildConfiguration = "Debug"
48
+ ignoresPersistentStateOnLaunch = "NO"
49
+ debugDocumentVersioning = "YES"
50
+ allowLocationSimulation = "YES">
51
+ <BuildableProductRunnable
52
+ runnableDebuggingMode = "0">
53
+ <BuildableReference
54
+ BuildableIdentifier = "primary"
55
+ BlueprintIdentifier = "3647AE0D15CA0082006F70D6"
56
+ BuildableName = "TestApp.app"
57
+ BlueprintName = "TestApp"
58
+ ReferencedContainer = "container:TestApp.xcodeproj">
59
+ </BuildableReference>
60
+ </BuildableProductRunnable>
61
+ <AdditionalOptions>
62
+ </AdditionalOptions>
63
+ </LaunchAction>
64
+ <ProfileAction
65
+ shouldUseLaunchSchemeArgsEnv = "YES"
66
+ savedToolIdentifier = ""
67
+ useCustomWorkingDirectory = "NO"
68
+ buildConfiguration = "Release"
69
+ debugDocumentVersioning = "YES">
70
+ <BuildableProductRunnable
71
+ runnableDebuggingMode = "0">
72
+ <BuildableReference
73
+ BuildableIdentifier = "primary"
74
+ BlueprintIdentifier = "3647AE0D15CA0082006F70D6"
75
+ BuildableName = "TestApp.app"
76
+ BlueprintName = "TestApp"
77
+ ReferencedContainer = "container:TestApp.xcodeproj">
78
+ </BuildableReference>
79
+ </BuildableProductRunnable>
80
+ </ProfileAction>
81
+ <AnalyzeAction
82
+ buildConfiguration = "Debug">
83
+ </AnalyzeAction>
84
+ <ArchiveAction
85
+ buildConfiguration = "Release"
86
+ revealArchiveInOrganizer = "YES">
87
+ </ArchiveAction>
88
+ </Scheme>
@@ -0,0 +1,22 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>SchemeUserState</key>
6
+ <dict>
7
+ <key>TestApp.xcscheme</key>
8
+ <dict>
9
+ <key>orderHint</key>
10
+ <integer>0</integer>
11
+ </dict>
12
+ </dict>
13
+ <key>SuppressBuildableAutocreation</key>
14
+ <dict>
15
+ <key>3647AE0D15CA0082006F70D6</key>
16
+ <dict>
17
+ <key>primary</key>
18
+ <true/>
19
+ </dict>
20
+ </dict>
21
+ </dict>
22
+ </plist>
@@ -0,0 +1,10 @@
1
+ Feature: Notes
2
+
3
+ As a Android user
4
+ I want to Demo app
5
+ So that I can make the test for Demo section
6
+
7
+ Scenario: Navigate
8
+ Given I have App running with appium
9
+ * I click on "display_text_view"
10
+ * I verify property "text_view" with "text" has value "Text is sometimes displayed"
@@ -0,0 +1,11 @@
1
+ Feature: Notes
2
+
3
+ As a iPhone user
4
+ I want to Demo app
5
+ So that I can make the test for Demo section
6
+
7
+ Scenario: Navigate
8
+ Given I have App running with appium
9
+ * I input text "4" on "textbox1"
10
+ * I click on "button_sum"
11
+ * I verify property "result" with "name" has value "Answer"
@@ -0,0 +1,2 @@
1
+ $_RP_OBJECT['display_text_view'] = {xpath: '//android.widget.LinearLayout[1]/android.widget.FrameLayout[2]/android.widget.LinearLayout[1]/android.widget.LinearLayout[4]/android.widget.Button[1]'}
2
+ $_RP_OBJECT['text_view'] = {xpath: '//android.widget.LinearLayout[1]/android.widget.FrameLayout[2]/android.widget.LinearLayout[1]/android.widget.LinearLayout[4]/android.widget.TextView[1]'}
@@ -0,0 +1,3 @@
1
+ $_RP_OBJECT['textbox1'] = {name: 'TextField1'}
2
+ $_RP_OBJECT['button_sum'] = {name: 'ComputeSumButton'}
3
+ $_RP_OBJECT['result'] = {name: 'Answer'}
@@ -0,0 +1,7 @@
1
+ # Define global variables
2
+ $current_dir = File.expand_path(File.dirname(__FILE__))
3
+ $base_dir = File.expand_path(File.dirname(__FILE__) + '/../..')
4
+
5
+ require 'rspec/expectations'
6
+ require 'selenium-webdriver'
7
+ require "#{$current_dir}/project_env.rb"
@@ -0,0 +1,24 @@
1
+ Before do
2
+ begin
3
+ def selenium
4
+ case $_CONFIG['DeviceName'].upcase.to_sym
5
+ when :IOS
6
+ @driver ||= Selenium::WebDriver.for(:remote, :desired_capabilities => capabilities_ios, :url => server_url)
7
+ when :ANDROID
8
+ @driver ||= Selenium::WebDriver.for(:remote, :desired_capabilities => capabilities_android, :url => server_url)
9
+ else
10
+ puts "\nERROR: *** Invalid Device Nane!. Please check the config from $_CONFIG['DeviceName'] = #{$_CONFIG['DeviceName']}"
11
+ end
12
+ end
13
+ rescue StandardError => myStandardError
14
+ put_log "\nERROR: *** #{myStandardError}"
15
+ end
16
+ end
17
+
18
+ After do
19
+ begin
20
+ selenium.quit
21
+ rescue StandardError => myStandardError
22
+ puts "\nERROR: *** #{myStandardError}"
23
+ end
24
+ end
@@ -0,0 +1,38 @@
1
+ $_CONFIG = Hash.new
2
+ ###################################################################
3
+ # SYSTEM CONFIGURATION #
4
+ ###################################################################
5
+ $_CONFIG['Print Log'] = true
6
+ $_CONFIG['Wait Time'] = 30
7
+ $_CONFIG['DeviceName'] = 'IOS'
8
+ ###################################################################
9
+ # DEVICE CONFIGURATION #
10
+ ###################################################################
11
+ IOS_APP_PATH = File.join(File.dirname(__FILE__), '../../apps/TestApp/build/release-iphonesimulator/TestApp.app')
12
+ ANDROID_APP_PATH = File.join(File.dirname(__FILE__), '../../apps/selendroid-test-app.apk')
13
+ def capabilities_ios
14
+ {
15
+ 'platformName' => 'ios',
16
+ 'deviceName' => 'iPad Air',
17
+ 'platformVersion' => '8.3',
18
+ 'app' => IOS_APP_PATH
19
+ }
20
+ end
21
+
22
+ def capabilities_android
23
+ {
24
+ 'platformName' => 'android',
25
+ 'deviceName' => 'emulator-5554',
26
+ 'app' => ANDROID_APP_PATH
27
+ }
28
+ end
29
+ ###################################################################
30
+ # SERVER CONFIGURATION #
31
+ ###################################################################
32
+ def server_url
33
+ "http://127.0.0.1:4723/wd/hub"
34
+ end
35
+
36
+
37
+
38
+
metadata ADDED
@@ -0,0 +1,155 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: Ifd_Mobile
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Anh Pham
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-10-20 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: cucumber
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: 2.0.0
20
+ - - '>='
21
+ - !ruby/object:Gem::Version
22
+ version: 1.3.18
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 2.0.0
30
+ - - '>='
31
+ - !ruby/object:Gem::Version
32
+ version: 1.3.18
33
+ - !ruby/object:Gem::Dependency
34
+ name: selenium-webdriver
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ~>
38
+ - !ruby/object:Gem::Version
39
+ version: 2.46.2
40
+ - - '>='
41
+ - !ruby/object:Gem::Version
42
+ version: 2.46.2
43
+ type: :runtime
44
+ prerelease: false
45
+ version_requirements: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ~>
48
+ - !ruby/object:Gem::Version
49
+ version: 2.46.2
50
+ - - '>='
51
+ - !ruby/object:Gem::Version
52
+ version: 2.46.2
53
+ - !ruby/object:Gem::Dependency
54
+ name: appium_lib
55
+ requirement: !ruby/object:Gem::Requirement
56
+ requirements:
57
+ - - ~>
58
+ - !ruby/object:Gem::Version
59
+ version: 4.1.0
60
+ - - '>='
61
+ - !ruby/object:Gem::Version
62
+ version: 4.0.0
63
+ type: :runtime
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ~>
68
+ - !ruby/object:Gem::Version
69
+ version: 4.1.0
70
+ - - '>='
71
+ - !ruby/object:Gem::Version
72
+ version: 4.0.0
73
+ description: Behavior driven development (BDD) approach to write automation test script
74
+ to test Mobile.
75
+ email: anhpq.info@gmail.com
76
+ executables:
77
+ - Ifd_Mobile
78
+ extensions: []
79
+ extra_rdoc_files: []
80
+ files:
81
+ - lib/Ifd_Mobile/methods/core.rb
82
+ - lib/Ifd_Mobile/methods/IFD_Assertion.rb
83
+ - lib/Ifd_Mobile/methods/lib_var.rb
84
+ - lib/Ifd_Mobile/methods/required_files.rb
85
+ - lib/Ifd_Mobile/version.rb
86
+ - lib/Ifd_Mobile.rb
87
+ - bin/generate.rb
88
+ - bin/helper.rb
89
+ - bin/Ifd_Mobile
90
+ - project/apps/selendroid-test-app.apk
91
+ - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/Default-568h@2x.png
92
+ - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/en.lproj/InfoPlist.strings
93
+ - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/en.lproj/Localizable.strings
94
+ - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/en.lproj/MyViewControllerViewController.nib/objects-8.0+.nib
95
+ - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/en.lproj/MyViewControllerViewController.nib/objects.nib
96
+ - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/en.lproj/MyViewControllerViewController.nib/runtime.nib
97
+ - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/GestureTestViewController.nib/objects-8.0+.nib
98
+ - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/GestureTestViewController.nib/objects.nib
99
+ - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/GestureTestViewController.nib/runtime.nib
100
+ - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/Info.plist
101
+ - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/PkgInfo
102
+ - project/apps/TestApp/build/release-iphonesimulator/TestApp.app/TestApp
103
+ - project/apps/TestApp/Default-568h@2x.png
104
+ - project/apps/TestApp/Test App 2/en.lproj/InfoPlist.strings
105
+ - project/apps/TestApp/Test App 2/en.lproj/Localizable.strings
106
+ - project/apps/TestApp/Test App 2/en.lproj/MyViewControllerViewController.xib
107
+ - project/apps/TestApp/Test App 2/GestureTestViewController.h
108
+ - project/apps/TestApp/Test App 2/GestureTestViewController.m
109
+ - project/apps/TestApp/Test App 2/GestureTestViewController.xib
110
+ - project/apps/TestApp/Test App 2/main.m
111
+ - project/apps/TestApp/Test App 2/MyViewControllerViewController.h
112
+ - project/apps/TestApp/Test App 2/MyViewControllerViewController.m
113
+ - project/apps/TestApp/Test App 2/TA2AppDelegate.h
114
+ - project/apps/TestApp/Test App 2/TA2AppDelegate.m
115
+ - project/apps/TestApp/Test App 2/TestApp-Info.plist
116
+ - project/apps/TestApp/Test App 2/TestApp-Prefix.pch
117
+ - project/apps/TestApp/TestApp.xcodeproj/project.pbxproj
118
+ - project/apps/TestApp/TestApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata
119
+ - project/apps/TestApp/TestApp.xcodeproj/project.xcworkspace/xcuserdata/anhpham.xcuserdatad/UserInterfaceState.xcuserstate
120
+ - project/apps/TestApp/TestApp.xcodeproj/xcuserdata/anhpham.xcuserdatad/xcschemes/TestApp.xcscheme
121
+ - project/apps/TestApp/TestApp.xcodeproj/xcuserdata/anhpham.xcuserdatad/xcschemes/xcschememanagement.plist
122
+ - project/features/android/Android_test.feature
123
+ - project/features/iOS/iOS_test.feature
124
+ - project/features/step_definitions/repositories/android_ob_test.rb
125
+ - project/features/step_definitions/repositories/ios_ob_test.rb
126
+ - project/features/support/env.rb
127
+ - project/features/support/hooks.rb
128
+ - project/features/support/project_env.rb
129
+ - project/Gemfile
130
+ - project/Gemfile.lock
131
+ homepage: https://rubygems.org/gems/ifd_mobile
132
+ licenses:
133
+ - MIT
134
+ metadata: {}
135
+ post_install_message: Thank you for installing Infodation Mobile gem.
136
+ rdoc_options: []
137
+ require_paths:
138
+ - lib
139
+ required_ruby_version: !ruby/object:Gem::Requirement
140
+ requirements:
141
+ - - '>='
142
+ - !ruby/object:Gem::Version
143
+ version: 1.9.3
144
+ required_rubygems_version: !ruby/object:Gem::Requirement
145
+ requirements:
146
+ - - '>='
147
+ - !ruby/object:Gem::Version
148
+ version: '0'
149
+ requirements: []
150
+ rubyforge_project:
151
+ rubygems_version: 2.0.14.1
152
+ signing_key:
153
+ specification_version: 4
154
+ summary: SELENIUM WEBDRIVER WITH RUBY & CUCUMBER
155
+ test_files: []