cukunity 0.1.0 → 0.1.1
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/README.md +40 -17
- data/README_JA.md +266 -0
- data/VERSION +1 -1
- data/cukunity.gemspec +6 -4
- data/lib/cukunity/cli/argument_parser.rb +11 -4
- data/lib/cukunity/cli/doctor_command.rb +8 -4
- data/lib/cukunity/cli/features_command.rb +4 -1
- data/lib/cukunity/drivers/iOS/uiautomation.rb +6 -2
- metadata +30 -28
data/README.md
CHANGED
@@ -1,14 +1,16 @@
|
|
1
|
+
[日本語はこちら](https://github.com/imkira/cukunity/blob/master/README_JA.md)
|
2
|
+
|
1
3
|
cukunity
|
2
4
|
========
|
3
5
|
|
4
|
-
cukunity is an automation/testing framework that simplifies BDD
|
5
|
-
|
6
|
+
cukunity is an automation/testing framework that simplifies [BDD](http://en.wikipedia.org/wiki/Behavior_Driven_Development)
|
7
|
+
testing of [Unity 3D](http://unity3d.com) games.
|
6
8
|
|
7
9
|
## Description
|
8
10
|
|
9
|
-
cukunity is a tool inspired by the principles of Behaviour Driven Development.
|
11
|
+
cukunity is a tool inspired by the principles of [Behaviour Driven Development](http://en.wikipedia.org/wiki/Behavior_Driven_Development).
|
10
12
|
Cukunity is a portmanteau of "Cucumber" and "Unity", and as so it provides
|
11
|
-
helpers to play nicely with
|
13
|
+
helpers to play nicely with [Cucumber](http://cukes.info), although it can be used standalone for
|
12
14
|
automation purposes.
|
13
15
|
|
14
16
|
In short, cukunity provides:
|
@@ -17,7 +19,7 @@ In short, cukunity provides:
|
|
17
19
|
* A platform-agnostic API for simulating touch and keyboard input on your Unity3D games.
|
18
20
|
* The `cukunity` executable to help you bootstrap your Unity3D Projects, and so on.
|
19
21
|
* Default step definitions and helpers for Cucumber.
|
20
|
-
* Default rake tasks with which you can run
|
22
|
+
* Default rake tasks with which you can run cukunity easily from.
|
21
23
|
|
22
24
|
## Limitations
|
23
25
|
|
@@ -28,14 +30,15 @@ Currently, the following limitations apply:
|
|
28
30
|
* Currently, iOS testing will only work if you check the "Development Build" setting on the Build Settings window of your Unity project.
|
29
31
|
* Android testing is currently only possible on MacOSX, although this may change in the future with the inclusion of Windows/Linux (don't take this as a promise).
|
30
32
|
|
33
|
+
Please, check out the `Progress and Roadmap` section below for additional information.
|
34
|
+
|
31
35
|
## Requirements
|
32
36
|
|
33
37
|
* Ruby 1.9.x (you probably want to install it via [RVM](http://beginrescueend.com)).
|
34
|
-
* To use cukunity with cucumber, you need to install cucumber (
|
38
|
+
* To use cukunity with cucumber, you need to install cucumber and json gems (`gem install cucumber` and `gem install json`)
|
35
39
|
* Mac OS X 10.6 and above (tested on Snow Leopard but should work on Lion too).
|
36
|
-
*
|
37
|
-
*
|
38
|
-
* To test on Android devices, you need [Android SDK](http://developer.android.com/sdk/) including the platform-tools package.
|
40
|
+
* On iOS devices, you need [XCode 4.2](https://developer.apple.com/xcode/) or above (including the iOS SDK) and [mobiledevice](http://github.com/imkira/mobiledevice).
|
41
|
+
* On Android devices, you need [Android SDK](http://developer.android.com/sdk/) including the platform-tools package.
|
39
42
|
|
40
43
|
## Installation
|
41
44
|
|
@@ -75,7 +78,7 @@ Options:
|
|
75
78
|
After you install cukunity, please make sure you run `cukunity doctor`
|
76
79
|
to check your system for problems.
|
77
80
|
This command will check if you have the necessary tools in order to use
|
78
|
-
cukunity for iOS/Android testing. You can also pass
|
81
|
+
cukunity for iOS/Android testing. You can also pass `--no-ios` or `--no-android`
|
79
82
|
if you don't plan on testing on such platform.
|
80
83
|
|
81
84
|
### Bootstraping your cukunity project
|
@@ -106,14 +109,14 @@ cukunity features <path/to/your/cucumber/features/directory>
|
|
106
109
|
|
107
110
|
This command will `require 'cukunity/cucumber'` automatically for you,
|
108
111
|
and launch cucumber with the specified features directory as test input.
|
109
|
-
You will need to specify either
|
112
|
+
You will need to specify either `--no-ios` or `--no-android` to disable
|
110
113
|
testing on the specified platform.
|
111
114
|
|
112
115
|
## Default Step Definitions
|
113
116
|
|
114
117
|
The following list of step definitions is already available via `cukunity features`
|
115
118
|
command (alternatively `require 'cukunity/cucumber'`), so you don't need to
|
116
|
-
make a copy to yourself.
|
119
|
+
make a copy to yourself. You may find it useful though to use it as reference or
|
117
120
|
to modify it to suit your needs.
|
118
121
|
|
119
122
|
* [Installing your Game](http://github.com/imkira/cukunity/blob/master/lib/cukunity/cucumber/step_definitions/install_steps.rb)
|
@@ -122,7 +125,7 @@ to modify it to suit your needs.
|
|
122
125
|
* [Keyboard Input Simulation](http://github.com/imkira/cukunity/blob/master/lib/cukunity/cucumber/step_definitions/keyboard_input_steps.rb)
|
123
126
|
* [Touch Input Simulation](http://github.com/imkira/cukunity/blob/master/lib/cukunity/cucumber/step_definitions/touch_input_steps.rb)
|
124
127
|
* [Visible Object Selectors](http://github.com/imkira/cukunity/blob/master/lib/cukunity/cucumber/step_definitions/select_visible_steps.rb)
|
125
|
-
* [Force
|
128
|
+
* [Force Loading of Unity Level](http://github.com/imkira/cukunity/blob/master/lib/cukunity/cucumber/step_definitions/load_level_command_steps.rb)
|
126
129
|
|
127
130
|
### i18n Support
|
128
131
|
|
@@ -188,13 +191,33 @@ The original Unity project that includes the code of the game and cukunity suppo
|
|
188
191
|
is available [here](http://github.com/imkira/cukunity/blob/master/Unity).
|
189
192
|
The sample feature files can be found [here](http://github.com/imkira/cukunity/blob/master/features).
|
190
193
|
|
194
|
+
## Demonstration
|
195
|
+
|
196
|
+
I am sorry for the very low quality video, but I hope it helps you at least understand what
|
197
|
+
cukunity is all about. The video below demonstrates features such as [keyboard input simulation](http://github.com/imkira/cukunity/blob/master/features/keyboard_input.feature) and
|
198
|
+
[touch input simulation](http://github.com/imkira/cukunity/blob/master/features/touch_input.feature)
|
199
|
+
(the full samples can be found [here](http://github.com/imkira/cukunity/tree/master/features)).
|
200
|
+
|
201
|
+
[Demo Video](http://youtu.be/3etDThp4fMo)
|
202
|
+
|
191
203
|
## Documentation
|
192
204
|
|
193
|
-
|
205
|
+
cukunity's source code is lacking a lot of documentation.
|
206
|
+
I promise I will soon improve this situation, but in the meantime you can check the autogenerated
|
207
|
+
documentation [here](http://rubydoc.info/gems/cukunity/frames).
|
208
|
+
|
209
|
+
## Progress and Roadmap
|
194
210
|
|
195
|
-
|
211
|
+
Currently only GameObject parent-children relationship, and a few Unity 3D built-in
|
212
|
+
classes like GameObject, Component, Behavior, Camera, GUIElement, GUIText, GUITexture,
|
213
|
+
Transform, etc. are supported. Therefore, one of the primary objectives for the
|
214
|
+
following versions is to give support for all built-in classes, to facilitate the
|
215
|
+
use of project-specific classes (if possible avoiding reflection), and well-known plugins
|
216
|
+
like EZGUI.
|
196
217
|
|
197
|
-
|
218
|
+
It is also necessary to extend the list of default step definitions to support
|
219
|
+
the development of real-life projects, ideally, without having to write a single
|
220
|
+
step definition by oneself.
|
198
221
|
|
199
222
|
## Contribute
|
200
223
|
|
@@ -211,4 +234,4 @@ www.opensource.org/licenses/MIT
|
|
211
234
|
|
212
235
|
## Copyright
|
213
236
|
|
214
|
-
Copyright (c) 2012 Mario Freitas. See LICENSE.txt for further details.
|
237
|
+
Copyright (c) 2012 Mario Freitas. See [LICENSE.txt](http://github.com/imkira/cukunity/blob/master/LICENSE.txt) for further details.
|
data/README_JA.md
ADDED
@@ -0,0 +1,266 @@
|
|
1
|
+
cukunity
|
2
|
+
========
|
3
|
+
|
4
|
+
cukunity(キュキュニティー)とは、自動化及びテストのための一つフレームワークである。
|
5
|
+
目的としては、[BDD(振舞駆動開発)](http://ja.wikipedia.org/wiki/%E3%83%93%E3%83%98%E3%82%A4%E3%83%93%E3%82%A2%E9%A7%86%E5%8B%95%E9%96%8B%E7%99%BA)を
|
6
|
+
[Unity3D](http://unity3d.com)のゲームの開発プロセスにより簡単に引き取ること。
|
7
|
+
|
8
|
+
## 概念
|
9
|
+
|
10
|
+
cukunityは[BDD(振舞駆動開発)](http://ja.wikipedia.org/wiki/%E3%83%93%E3%83%98%E3%82%A4%E3%83%93%E3%82%A2%E9%A7%86%E5%8B%95%E9%96%8B%E7%99%BA)
|
11
|
+
という開発プロセスの意思に触発されて出来たものである。
|
12
|
+
「cukunity」といった言葉自体が「Cucumber」と「Unity」というかばん語である。
|
13
|
+
そういう意味では、[Cucumber](http://cukes.info)用のヘルパークラスも提供するが
|
14
|
+
cukunityを単体でも使える(操作のシミュレーションなどのため)。
|
15
|
+
|
16
|
+
下記にcukunityの基本機能の説明である:
|
17
|
+
|
18
|
+
* 実機でUnity3Dのゲームをインストール・アンインストール・実行することが出来るプラットフォームにとらわれないAPIの提供。
|
19
|
+
* Unity3Dのゲームにタッチ・キーボード入力といったイベントを発生(シミュレーション)させるプラットフォームにとらわれないAPIの提供。
|
20
|
+
* 既存のUnity3Dのプロジェクトにcukunityプラグインをインポートするための `cukunity` といった実行ファイルのツールの提供。
|
21
|
+
* Cucumberで使えるデフォルトのヘルパークラスとステップ定義の提供。
|
22
|
+
* cucunityを使ったデフォルトのrakeタスクの提供。
|
23
|
+
|
24
|
+
## 制限
|
25
|
+
|
26
|
+
現状、cukunityの使い方が下記制限によって限られている。
|
27
|
+
|
28
|
+
* Android 2.x以降とiOS 5.x以降にしか対応していない(将来的に Desktop/Flash/WebPlayer にも適用出来ると望ましい)。
|
29
|
+
* XcodeはMacOSXでしか使えないためcukunityによるiOSでのテストもMacOSXでしか出来ない。
|
30
|
+
* iOSの場合、Unity3DプロジェクトのBuild Settingsにて "Development Build" といった設定が必要。
|
31
|
+
* Androidの場合、現状MacOSXでしか出来ていないが将来的に(約束ではないが)WindowsもLinuxもサポート可能 。
|
32
|
+
|
33
|
+
追加詳細は、`プロジェクトの進捗とロードマップ` を参照下さい。
|
34
|
+
|
35
|
+
## 本ツールを使うための必要な環境など
|
36
|
+
|
37
|
+
* Ruby 1.9.x以降( [RVM](http://beginrescueend.com) などでインストール可能)。
|
38
|
+
* cukunityをcucumberで使うにはcucumberをインストールする (例 `gem install cucumber`)。
|
39
|
+
* Mac OS X 10.6以降(Snow Leopardで動作確認したが、Lionでも大丈夫だと思う)。
|
40
|
+
* iOSの場合、iOS SDKを含めて [XCode 4.2](https://developer.apple.com/xcode/) 以降と [mobiledevice](http://github.com/imkira/mobiledevice) をインストール。
|
41
|
+
* Androidの場合、[Android SDK](http://developer.android.com/sdk/) とplatform-toolsパケージをインストール。
|
42
|
+
|
43
|
+
## インストール方法
|
44
|
+
|
45
|
+
まずはRuby 1.9.x以降がインストールしてあることを確認した上で、cukunityを下記のようにインストールする:
|
46
|
+
|
47
|
+
```
|
48
|
+
gem install cukunity
|
49
|
+
```
|
50
|
+
|
51
|
+
最新バージョンを使うには、下記の方でインストールする:
|
52
|
+
|
53
|
+
```
|
54
|
+
git clone git://github.com/imkira/cukunity.git
|
55
|
+
cd cukunity
|
56
|
+
rake install
|
57
|
+
```
|
58
|
+
|
59
|
+
## 使い方
|
60
|
+
|
61
|
+
オプション無しで下記のようにcukunityを実行すると、
|
62
|
+
|
63
|
+
```
|
64
|
+
cukunity
|
65
|
+
```
|
66
|
+
|
67
|
+
下記の通り、基本使い方の説明画面の確認が出来る(下記は日本語に翻訳したもの)。
|
68
|
+
|
69
|
+
```
|
70
|
+
Usage: cukunity [オプション] <コマンド>
|
71
|
+
|
72
|
+
コマンド:
|
73
|
+
doctor テスト環境に問題があるかどうかをチェック。
|
74
|
+
bootstrap <ぱパス> 既存のUnity3Dのプロジェクトにcukunityプラグインをインポート。
|
75
|
+
features [<パス>] 「path」に存在するcucumber用のフィチャーファイルをインプットにしてcucumberを実行する。
|
76
|
+
|
77
|
+
オプション:
|
78
|
+
-v, --[no-]verbose 詳細出力をオン/オフにするといったスイッチ。
|
79
|
+
--[no-]android Androidプラットホームを使う/使わないといったスイッチ。
|
80
|
+
--[no-]ios iOSプロとホームを使う/使わないといったスイッチ。
|
81
|
+
-h, --help 同ヘルップ画面を表示する。
|
82
|
+
```
|
83
|
+
|
84
|
+
### テスト環境に問題があるかどうかをチェック
|
85
|
+
|
86
|
+
cukunityをインストールした直後に、 `cuckunity doctor` を実行して
|
87
|
+
テスト環境に問題があるかどうかをチェックしよう!
|
88
|
+
同コマンドは、iOS及びAndroidでcukunityを使用するための必要なツールが
|
89
|
+
全てインストールされているかどうかっといったチェックを行う。
|
90
|
+
`--no-ios` もしくは `--no-android` を指定すれば、そのプラットホームのチェックを外すことが出来る。
|
91
|
+
|
92
|
+
### 既存のUnity3Dのプロジェクトにcukunityプラグインをインポート
|
93
|
+
|
94
|
+
既存のUnity3Dのプロジェクトにcukunityプラグインをインポートするには、
|
95
|
+
下記コマンドを実行する:
|
96
|
+
|
97
|
+
```
|
98
|
+
cukunity bootstrap <unity/プロジェクトへの/ベースのパス>
|
99
|
+
```
|
100
|
+
|
101
|
+
同コマンドは、必要なファイルを `Assets/Plugins` にコピーする。
|
102
|
+
その後に、 `CukunityInstance.prefab` といったプレハブをゲームの起動時に最初に読み込まれるシーンに
|
103
|
+
ドラッグ&ドロップしてください。
|
104
|
+
「全てのシーンにも追加しないと行けないの?」、「他のシーンをロードしたらどうなるの?」など
|
105
|
+
は、もう手配済みなので大丈夫!
|
106
|
+
|
107
|
+
最後に、Unity3Dのプロジェクトを再ビルドする。
|
108
|
+
注意:iOSの場合は、 Unity3DプロジェクトのBuild Settingsにて"Development Build" といった設定を有効にしてください!
|
109
|
+
|
110
|
+
### フィチャー(機能)ファイルをインプットにしてcucumberを実行する
|
111
|
+
|
112
|
+
同コマンドでフィーチャーファイルをインプットにしてcucumberを実行することが出来る。
|
113
|
+
|
114
|
+
```
|
115
|
+
cukunity features <cucumber用の/features/フォルダーへの/パス>
|
116
|
+
```
|
117
|
+
同コマンドは、Rubyの `require 'cukunity/cucumber'` でcukunityをインクルードしてcucumberを実行する。
|
118
|
+
そして、`features` フォルダーにあるフィーチャーファイルをインプットとして `cucumber` を実行する。
|
119
|
+
また、`--no-ios` もしくは `--no-android` を指定すればそのプラットホームのテストが行われない。
|
120
|
+
|
121
|
+
## デフォルトのステップ定義
|
122
|
+
|
123
|
+
次は、`cukunity features` というコマンド(あるいは、Rubyで `require 'cukunity/cucumber'` )で
|
124
|
+
デフォルトで使える機能の一覧である。そのため、予めコピーを撮っておく必要がない。ただ、
|
125
|
+
デフォルトの動作をカスタマイズしたりするには、コピーを撮っておいて好きに編集することが出来る。
|
126
|
+
|
127
|
+
* [ゲームをインストールする](http://github.com/imkira/cukunity/blob/master/lib/cukunity/cucumber/step_definitions/install_steps.rb)
|
128
|
+
* [ゲームを起動する](http://github.com/imkira/cukunity/blob/master/lib/cukunity/cucumber/step_definitions/install_steps.rb)
|
129
|
+
* [現在のシーン情報を取得する](http://github.com/imkira/cukunity/blob/master/lib/cukunity/cucumber/step_definitions/get_scene_command_steps.rb)
|
130
|
+
* [キーボード入力のイベントを発生させる](http://github.com/imkira/cukunity/blob/master/lib/cukunity/cucumber/step_definitions/keyboard_input_steps.rb)
|
131
|
+
* [タッチ入力のイベントを発生させる](http://github.com/imkira/cukunity/blob/master/lib/cukunity/cucumber/step_definitions/touch_input_steps.rb)
|
132
|
+
* [画面に表示されているオブジェクトのセレクター](http://github.com/imkira/cukunity/blob/master/lib/cukunity/cucumber/step_definitions/select_visible_steps.rb)
|
133
|
+
* [Unityのレベルをロードさせる](http://github.com/imkira/cukunity/blob/master/lib/cukunity/cucumber/step_definitions/load_level_command_steps.rb)
|
134
|
+
|
135
|
+
### i18n(ローカライズ)対応
|
136
|
+
|
137
|
+
Cukunityが[i18n](http://github.com/imkira/cukunity/blob/master/lib/cukunity/cucumber/step_definitions/i18n)に対応している。
|
138
|
+
現状英語がデフォルトですが、[日本語](http://github.com/imkira/cukunity/blob/master/lib/cukunity/cucumber/step_definitions/i18n/ja)でのフィーチャーファイルの記述に対応している。
|
139
|
+
|
140
|
+
## フィーチャー定義のサンプル
|
141
|
+
|
142
|
+
下記は、倉庫番というゲームをテストするサンプルのフィーチャーの定義ファイルである。
|
143
|
+
|
144
|
+
```
|
145
|
+
# language: ja
|
146
|
+
フィーチャ: cukunityが提供するデフォルトのステップ定義のサンプル
|
147
|
+
Unityのゲームをcukunityでテストするためには
|
148
|
+
プログラマーとして
|
149
|
+
Unityのデフォルトのステップ定義を使いたい。
|
150
|
+
|
151
|
+
Background:
|
152
|
+
# Specify fixtures/sokoban.apk (Android) or fixtures/sokoban.app (iOS) as the target game.
|
153
|
+
Given I install the app "fixtures/sokoban"
|
154
|
+
# launch it on device
|
155
|
+
And I launch it
|
156
|
+
# You probably don't need this, but this will cause an Application.LoadLevel of "demo_title" level.
|
157
|
+
And I load the "demo_title" level
|
158
|
+
|
159
|
+
背景:
|
160
|
+
# fixtures/sokoban.apk (Android) もしくは fixtures/sokoban.app (iOS) のようにテスト対象となるゲームへのパス(拡張子は不要)を指定するにして端末にインストールさせる。
|
161
|
+
前提 "fixtures/sokoban"からゲームをインストールしている
|
162
|
+
# 端末でアプリを起動させる。
|
163
|
+
かつ ゲームを起動している
|
164
|
+
# おそらく下記要らないかもしれないが、Application.LoadLevelで"demo_title"というレベルを強制的にロードさせる。
|
165
|
+
かつ レベル"demo_title"をロードしている
|
166
|
+
|
167
|
+
シナリオ: ゲームが起動する
|
168
|
+
# ゲームが動作していることを確認する。
|
169
|
+
かつ アプリが動作していること
|
170
|
+
# "demo_title"というレベルがロードされていることを確認する。
|
171
|
+
かつ レベル"demo_title"がロードされていること
|
172
|
+
# "OptionsMenu"というGameObjectが存在しないことを確認する。
|
173
|
+
かつ "OptionsMenu"が存在していないこと
|
174
|
+
|
175
|
+
Scenario: Clear game
|
176
|
+
When I tap "Play"
|
177
|
+
And I tap "Up"
|
178
|
+
# <ommited for simplicity>
|
179
|
+
# A GameObject called "GameClear" should be visible.
|
180
|
+
Then I should see "GameClear"
|
181
|
+
# A label showing it took us "40" steps should be visible.
|
182
|
+
And I should read "40"
|
183
|
+
|
184
|
+
シナリオ: パーフェクトでレベル1をクリアする
|
185
|
+
# "Play"という画面に表示されているGameObjectをタップさせる。
|
186
|
+
もし "Play"をタップしたら
|
187
|
+
# "Up"という画面に表示されているGameObjectをタップさせる。
|
188
|
+
かつ "Up"をタップしたら
|
189
|
+
# 省略
|
190
|
+
# "GameObject"というGameObjectが画面に表示されているかを確認する。
|
191
|
+
ならば "GameClear"を表示していること
|
192
|
+
# "40"という内容を持ったラベルが画面に表示されているかを確認する。
|
193
|
+
かつ "40"と表示していること
|
194
|
+
|
195
|
+
シナリオ: Optionsメニューにてプレイヤー名を変更する
|
196
|
+
# "Options"という画面に表示されているGameObjectをタップさせる。
|
197
|
+
もし "Options"をタップしたら
|
198
|
+
# "PlayerName"という画面に表示されているGameObjectをタップさせる。
|
199
|
+
かつ "PlayerName"をタップしたら
|
200
|
+
# "Super Player"という文字列をキーボードで入力させる。
|
201
|
+
かつ "Super Player"と入力したら
|
202
|
+
# "Super Player"という内容を持ったラベルが画面に表示されているかを確認する。
|
203
|
+
ならば "Super Player"と表示していること
|
204
|
+
|
205
|
+
シナリオ: ゲームをQuitボタンから終了する
|
206
|
+
# "Quit"という画面に表示されているGameObjectをタップさせる。
|
207
|
+
もし "Quit"をタップして3秒待ったら
|
208
|
+
# ゲームが動作していない(いなくなる)ことを確認する。
|
209
|
+
ならば アプリが動作していないこと
|
210
|
+
```
|
211
|
+
|
212
|
+
元々のUnityプロジェクトのソースコードは [こちらへ](http://github.com/imkira/cukunity/blob/master/Unity)。
|
213
|
+
サンプルのフィーチャーファイルは [こちらへ](http://github.com/imkira/cukunity/blob/master/features)。
|
214
|
+
|
215
|
+
## デモ動画
|
216
|
+
|
217
|
+
同動画は、主に[キーボード入力のイベント](http://github.com/imkira/cukunity/blob/master/features/keyboard_input.feature)と
|
218
|
+
[タッチ入力のイベント](http://github.com/imkira/cukunity/blob/master/features/touch_input.feature)のシミュレーションのデモ動画となる。
|
219
|
+
フィーチャーの記述ファイルは [こちらへ](http://github.com/imkira/cukunity/tree/master/features) 。
|
220
|
+
|
221
|
+
低解像度のデモ動画は、申し訳ない。どうか、基本機能のデモになればと嬉しい。
|
222
|
+
|
223
|
+
[デモ動画](http://youtu.be/3etDThp4fMo)
|
224
|
+
|
225
|
+
## ドキュメンテーション
|
226
|
+
|
227
|
+
cukunityのソースコードはまだドキュメンテーションがとても足りない。
|
228
|
+
近いうちにどうにかしたいが、それが出来るまでに自動生成されたドキュメンテーションを
|
229
|
+
[こちら](http://rubydoc.info/gems/cukunity/frames) でご参照ください。
|
230
|
+
|
231
|
+
## プロジェクトの進捗とロードマップ
|
232
|
+
|
233
|
+
現状、cukunityがUnityのコアなクラスの一部(GameObject、Component、Behavior、Camera、
|
234
|
+
GUIElement、GUIText、GUITexture、Transformなど)とGameObjectとGameObjectの親・子の関係しか対応していない。
|
235
|
+
そのため、今後のバージョンのロードマップとしてはUnityのデフォルトのクラスに完全に対応する事と
|
236
|
+
EZGUIのようなプラグインのクラスととあるゲームのスペシフィックなクラスのテストも
|
237
|
+
より簡単に対応出来る仕組みを用意する事。
|
238
|
+
|
239
|
+
また、実際に開発されてマーケットにリリースされているゲームのテストに役に立つステップ定義を
|
240
|
+
デフォルトのステップ定義として新しいステップ定義を提供したり、現在あるステップ定義を調整したりする必要があると。
|
241
|
+
|
242
|
+
## 「貢献したい!」
|
243
|
+
|
244
|
+
* 「不具合を発見!」
|
245
|
+
* 「こんな凄い機能を作っちゃったのでcukunityに追加したいけど...」
|
246
|
+
|
247
|
+
といった時にcukunityプロジェクトをforkしpull requestをお願いします!
|
248
|
+
|
249
|
+
## Twitter
|
250
|
+
|
251
|
+
cukunityに関する最新情報は [@imkira85](http://twitter.com/#!/imkira85) をフォーローください。
|
252
|
+
|
253
|
+
## コミューニティーの創ってくれた参考資料
|
254
|
+
|
255
|
+
* [cukunityのデモ実行手順](http://bit.ly/HE8YZa)
|
256
|
+
* [cukunity install memo](http://goo.gl/Lx1SD)
|
257
|
+
|
258
|
+
## ライセンス
|
259
|
+
|
260
|
+
cukunityはMIT Licenseに準拠する:
|
261
|
+
|
262
|
+
www.opensource.org/licenses/MIT
|
263
|
+
|
264
|
+
## Copyright
|
265
|
+
|
266
|
+
Copyright (c) 2012 Mario Freitas. [LICENSE.txt](http://github.com/imkira/cukunity/blob/master/LICENSE.txt)をご確認ください。
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/cukunity.gemspec
CHANGED
@@ -5,17 +5,18 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "cukunity"
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Mario Freitas"]
|
12
|
-
s.date = "2012-
|
12
|
+
s.date = "2012-11-19"
|
13
13
|
s.description = "cukunity is a tool inspired by the principles of Behaviour Driven Development. Cukunity is a portmanteau of \"Cucumber\" and \"Unity\", and as so it provides helpers to play nicely with cucumber, although it can be used standalone for automation. "
|
14
14
|
s.email = "imkira@gmail.com"
|
15
15
|
s.executables = ["cukunity"]
|
16
16
|
s.extra_rdoc_files = [
|
17
17
|
"LICENSE.txt",
|
18
|
-
"README.md"
|
18
|
+
"README.md",
|
19
|
+
"README_JA.md"
|
19
20
|
]
|
20
21
|
s.files = [
|
21
22
|
".document",
|
@@ -25,6 +26,7 @@ Gem::Specification.new do |s|
|
|
25
26
|
"Gemfile.lock",
|
26
27
|
"LICENSE.txt",
|
27
28
|
"README.md",
|
29
|
+
"README_JA.md",
|
28
30
|
"Rakefile",
|
29
31
|
"Unity/Assets/Demo.meta",
|
30
32
|
"Unity/Assets/Demo/Art.meta",
|
@@ -247,7 +249,7 @@ Gem::Specification.new do |s|
|
|
247
249
|
s.homepage = "http://github.com/imkira/cukunity"
|
248
250
|
s.licenses = ["MIT"]
|
249
251
|
s.require_paths = ["lib"]
|
250
|
-
s.rubygems_version = "1.8.
|
252
|
+
s.rubygems_version = "1.8.15"
|
251
253
|
s.summary = "cukunity is an automation/testing framework that simplifies BDD testing of Unity 3D games."
|
252
254
|
|
253
255
|
if s.respond_to? :specification_version then
|
@@ -5,6 +5,7 @@ module Cukunity
|
|
5
5
|
class ArgumentParser
|
6
6
|
attr_reader :args
|
7
7
|
attr_reader :remaining_args
|
8
|
+
attr_reader :cucumber_args
|
8
9
|
attr_reader :options
|
9
10
|
attr_reader :command
|
10
11
|
|
@@ -38,15 +39,21 @@ module Cukunity
|
|
38
39
|
}
|
39
40
|
options = Cukunity::CLI::Options.new(defaults)
|
40
41
|
|
41
|
-
@remaining_args = @args.
|
42
|
+
@remaining_args = @args.take_while {|arg| arg != '--' }
|
43
|
+
@cucumber_args = @args.drop_while {|arg| arg != '--' }
|
44
|
+
@cucumber_args = @cucumber_args.drop(1) unless @cucumber_args.empty?
|
45
|
+
|
42
46
|
@parser = ::OptionParser.new do |opts|
|
43
47
|
opts.banner = 'Usage: cukunity [options] <command>'
|
44
48
|
|
45
49
|
opts.separator ''
|
46
50
|
opts.separator 'Commands:'
|
47
|
-
opts.separator 'doctor
|
48
|
-
opts.separator '
|
49
|
-
opts.separator '
|
51
|
+
opts.separator 'doctor'
|
52
|
+
opts.separator ' Check your system for the required platform tools.'
|
53
|
+
opts.separator 'bootstrap <path>'
|
54
|
+
opts.separator ' Bootstrap your Unity project.'
|
55
|
+
opts.separator 'features [<path>] [-- <cucumber-args>...]'
|
56
|
+
opts.separator ' Run cucumber against path containing feature files.'
|
50
57
|
|
51
58
|
opts.separator ''
|
52
59
|
opts.separator 'Options:'
|
@@ -4,7 +4,7 @@ module Cukunity
|
|
4
4
|
module CLI
|
5
5
|
class DoctorCommand
|
6
6
|
def initialize(parser)
|
7
|
-
@parser = parser
|
7
|
+
@parser = parser
|
8
8
|
end
|
9
9
|
|
10
10
|
def execute
|
@@ -26,7 +26,7 @@ module Cukunity
|
|
26
26
|
def check_error(item, path, solution)
|
27
27
|
$stdout.puts '===>'.red + " #{item} (#{path.red})"
|
28
28
|
solution.each_line do |line|
|
29
|
-
$stdout.puts '::::: '.red + " #{line}"
|
29
|
+
$stdout.puts '::::: '.red + " #{line}"
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
@@ -58,7 +58,7 @@ module Cukunity
|
|
58
58
|
# gem install cucumber
|
59
59
|
|
60
60
|
or, if you use bundler, just add the following to your Gemfile:
|
61
|
-
|
61
|
+
|
62
62
|
gem 'cucumber'
|
63
63
|
|
64
64
|
eos
|
@@ -84,7 +84,11 @@ module Cukunity
|
|
84
84
|
|
85
85
|
eos
|
86
86
|
|
87
|
-
|
87
|
+
check_file [
|
88
|
+
'/Developer/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate',
|
89
|
+
'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate',
|
90
|
+
'/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate'
|
91
|
+
], <<-eos
|
88
92
|
|
89
93
|
Please install XCode 4.2 or above from https://developer.apple.com/xcode/ .
|
90
94
|
Also, make sure you have iOS 5 SDK installed.
|
@@ -28,7 +28,10 @@ module Cukunity
|
|
28
28
|
'either --ios or --android'
|
29
29
|
end
|
30
30
|
cukunity = File.expand_path(File.join(File.dirname(__FILE__), '..', 'cucumber.rb'))
|
31
|
-
|
31
|
+
|
32
|
+
cucumber_cmd_args = ['--require', cukunity, '--require', path, '--format', 'pretty', '-t', platform_flags]
|
33
|
+
cucumber_cmd_args += @parser.cucumber_args
|
34
|
+
system 'cucumber', *cucumber_cmd_args
|
32
35
|
end
|
33
36
|
end
|
34
37
|
end
|
@@ -31,10 +31,14 @@ module Cukunity
|
|
31
31
|
:bundle_id => bundle_id
|
32
32
|
}
|
33
33
|
|
34
|
-
generate_slave_js(slave_js, slave_js_opts)
|
34
|
+
generate_slave_js(slave_js, slave_js_opts)
|
35
35
|
|
36
36
|
# as of Xcode 4.3.2, the Developer folder is now in a different place.
|
37
|
-
templates = [
|
37
|
+
templates = [
|
38
|
+
'/Developer/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate',
|
39
|
+
'/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate',
|
40
|
+
'/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate'
|
41
|
+
]
|
38
42
|
template = templates.find do |template|
|
39
43
|
File.file?(template)
|
40
44
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cukunity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-11-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
16
|
-
requirement: &
|
16
|
+
requirement: &2157062860 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 1.6.5
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2157062860
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: term-ansicolor
|
27
|
-
requirement: &
|
27
|
+
requirement: &2157062360 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.0.6
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2157062360
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &2157061820 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 2.8.0
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2157061820
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: yard
|
49
|
-
requirement: &
|
49
|
+
requirement: &2157061340 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0.7'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *2157061340
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: rdoc
|
60
|
-
requirement: &
|
60
|
+
requirement: &2157060740 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '3.12'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *2157060740
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: cucumber
|
71
|
-
requirement: &
|
71
|
+
requirement: &2157060120 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *2157060120
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: bundler
|
82
|
-
requirement: &
|
82
|
+
requirement: &2157059460 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ~>
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: 1.0.0
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *2157059460
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: jeweler
|
93
|
-
requirement: &
|
93
|
+
requirement: &2157054500 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ~>
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: 1.8.3
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *2157054500
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: reek
|
104
|
-
requirement: &
|
104
|
+
requirement: &2157053920 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ~>
|
@@ -109,10 +109,10 @@ dependencies:
|
|
109
109
|
version: 1.2.8
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *2157053920
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: roodi
|
115
|
-
requirement: &
|
115
|
+
requirement: &2157053260 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ~>
|
@@ -120,10 +120,10 @@ dependencies:
|
|
120
120
|
version: 2.1.0
|
121
121
|
type: :development
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *2157053260
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: json
|
126
|
-
requirement: &
|
126
|
+
requirement: &2157052760 !ruby/object:Gem::Requirement
|
127
127
|
none: false
|
128
128
|
requirements:
|
129
129
|
- - ! '>='
|
@@ -131,10 +131,10 @@ dependencies:
|
|
131
131
|
version: 1.6.5
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
|
-
version_requirements: *
|
134
|
+
version_requirements: *2157052760
|
135
135
|
- !ruby/object:Gem::Dependency
|
136
136
|
name: term-ansicolor
|
137
|
-
requirement: &
|
137
|
+
requirement: &2157052240 !ruby/object:Gem::Requirement
|
138
138
|
none: false
|
139
139
|
requirements:
|
140
140
|
- - ! '>='
|
@@ -142,7 +142,7 @@ dependencies:
|
|
142
142
|
version: 1.0.6
|
143
143
|
type: :runtime
|
144
144
|
prerelease: false
|
145
|
-
version_requirements: *
|
145
|
+
version_requirements: *2157052240
|
146
146
|
description: ! 'cukunity is a tool inspired by the principles of Behaviour Driven
|
147
147
|
Development. Cukunity is a portmanteau of "Cucumber" and "Unity", and as so it provides
|
148
148
|
helpers to play nicely with cucumber, although it can be used standalone for automation. '
|
@@ -153,6 +153,7 @@ extensions: []
|
|
153
153
|
extra_rdoc_files:
|
154
154
|
- LICENSE.txt
|
155
155
|
- README.md
|
156
|
+
- README_JA.md
|
156
157
|
files:
|
157
158
|
- .document
|
158
159
|
- .gitmodules
|
@@ -161,6 +162,7 @@ files:
|
|
161
162
|
- Gemfile.lock
|
162
163
|
- LICENSE.txt
|
163
164
|
- README.md
|
165
|
+
- README_JA.md
|
164
166
|
- Rakefile
|
165
167
|
- Unity/Assets/Demo.meta
|
166
168
|
- Unity/Assets/Demo/Art.meta
|
@@ -394,7 +396,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
394
396
|
version: '0'
|
395
397
|
segments:
|
396
398
|
- 0
|
397
|
-
hash: -
|
399
|
+
hash: -747788621594953464
|
398
400
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
399
401
|
none: false
|
400
402
|
requirements:
|
@@ -403,7 +405,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
403
405
|
version: '0'
|
404
406
|
requirements: []
|
405
407
|
rubyforge_project:
|
406
|
-
rubygems_version: 1.8.
|
408
|
+
rubygems_version: 1.8.15
|
407
409
|
signing_key:
|
408
410
|
specification_version: 3
|
409
411
|
summary: cukunity is an automation/testing framework that simplifies BDD testing of
|