22
23

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

UnityのEditor Test RunnerをJenkinsで走らせて、Slackで通知

Last updated at Posted at 2016-08-02

Unity

Unityのスクリプトの実行はEditor Test Runnerがコマンドラインから呼べるのでCIしやすい
たとえばMissingScriptを見つけるこんなテストを用意しておく

Window → Editor Test Runner
で動作確認できる
etr.png

#Jenkins

Unity3dBuilder Plugin

インストール

Jenkins2ではプラグインの設定メニューの位置が変わっているようなので注意

ジョブの設定

Invoke Unity3d Editor

上記記事に倣って設定し、コマンドライン引数でEditorTestRunnder
「Editor command line arguments」にUnityをバッチモードで起動するコマンドを指定

-quit -batchmode -runEditorTests

ちなみにUnityのプロジェクトフォルダがWORKSPACEのトップにない場合は -projectPath で指定してあげる

-projectPath $WORKSPACE/UnityProjectFolder -quit -batchmode -runEditorTests

If you do not specify -projectPath (case-sensitive), the plugin will use the current workspace.

NUnit Plugin

ジョブの設定

  1. [ビルド後の処理を追加] -> [Publish NUnit test result report]
  2. EditorTestResults.xml を指定

post_build.png

#Slack通知
http://qiita.com/ryuthky_github/items/c7e68fba13ddf230159a

完成

slack通知
slack.png

Jenkinsではこんな感じでレポートが見れる
nunit.png

22
23
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
22
23

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?