[Settings] => [Service Hooks] => [Jenkins (Git plugin)]
Jenkins Url
http://hostname.com/git/[email protected]:tuki0918/jenkins_test.git
http://username:[email protected]/jenkins/git/[email protected]:tuki0918/jenkins_test.git
[ + ] Active
<project name="jenkins project" default="build"> | |
<target name="phpunit"> | |
<exec dir="." executable="phpunit" failonerror="true"> | |
<arg line="--colors tests" /> | |
</exec> | |
</target> | |
<target name="build" depends="phpunit"/> | |
</project> |
[Settings] => [Service Hooks] => [Jenkins (Git plugin)]
Jenkins Url
http://hostname.com/git/[email protected]:tuki0918/jenkins_test.git
http://username:[email protected]/jenkins/git/[email protected]:tuki0918/jenkins_test.git
[ + ] Active
グローバル プロパティ
[ + ] 環境変数
キー:PATH
値:${PATH}:/usr/local/bin
jenkins側でPATHが通っていない場合がある
Jenkinsの位置
Jenkins URL
project name: jenkins_test
[email protected]:tuki0918/jenkins_test.git
[ + ] SCMをポーリング
[ + ] Color ANSI Console Output ANSI color map [css]
使用するAnt [ant]
// tests/sample1Test.php | |
<?php | |
class Sample1Test extends PHPUnit_Framework_TestCase | |
{ | |
public function testPushAndPop() | |
{ | |
$user = array(); | |
$this->assertEquals(0, count($user)); | |
array_push($user, 'hoge'); | |
$this->assertEquals('hoge', $user[0]); | |
$this->assertEquals(1, count($user)); | |
$this->assertEquals('hoge', array_pop($user)); | |
$this->assertEquals(0, count($user)); | |
} | |
public function testArray1() | |
{ | |
$array = array(); | |
$this->assertEquals(0, count($array)); | |
} | |
public function testArray2() | |
{ | |
$array = array(); | |
$this->assertEquals(0, count($array)); | |
} | |
public function testArray3() | |
{ | |
$array = array(1, 2, 3); | |
$this->assertEquals(3, count($array)); | |
} | |
} |
jenkins から github にアクセス必須
jenkins文字化け?
libAlexandrina.so.tDiary(2013-05-07) : http://blog.phalanxware.com/20130507.html
tests/*Test.php
フォルダ「tests」以下のファイル「*Test.php」が実行される。