<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tin&#039;s Blog &#187; Continues Integretation</title>
	<atom:link href="http://www.diamondtin.com/tag/continues-integretation/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.diamondtin.com</link>
	<description>you are coming a long way...</description>
	<lastBuildDate>Wed, 11 Aug 2010 09:43:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>准备可扩展的网站-架构与部属</title>
		<link>http://www.diamondtin.com/2008/planning-for-performance/</link>
		<comments>http://www.diamondtin.com/2008/planning-for-performance/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 14:57:33 +0000</pubDate>
		<dc:creator>tin</dc:creator>
				<category><![CDATA[Tech.技术]]></category>
		<category><![CDATA[Beijing Open Party]]></category>
		<category><![CDATA[Continues Integretation]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[TDD]]></category>
		<category><![CDATA[thinking]]></category>
		<category><![CDATA[计算机与 Internet]]></category>

		<guid isPermaLink="false">http://tin.zztin.com/?p=213</guid>
		<description><![CDATA[这个幻灯片是我为Beijing Open Party所准备的，好看簿也有图片版本。欢迎所有对网站可扩展架构感兴趣的朋友一同交流，也欢迎参加Beijing Open Party的活动。 &#124; View &#124; Upload your ow... ]]></description>
			<content:encoded><![CDATA[<p>这个幻灯片是我为<a href="http://www.beijing-open-party.org" target="_blank">Beijing Open Party</a>所准备的，<a href="http://www.haokanbu.com/story/64934" target="_blank">好看簿也有图片版本</a>。欢迎所有对网站可扩展架构感兴趣的朋友一同交流，也欢迎参加Beijing Open Party的活动。</p>
<div style="width:425px;text-align:left" id="__ss_475026"><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slideshare.net/swf/ssplayer2.swf?doc=planning-for-high-performance-web-application-1213868838994903-8"/><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slideshare.net/swf/ssplayer2.swf?doc=planning-for-high-performance-web-application-1213868838994903-8" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;"><a href="http://www.slideshare.net/?src=embed"><img src="http://static.slideshare.net/swf/logo_embd.png" style="border:0px none;margin-bottom:-5px" alt="SlideShare"/></a> | <a href="http://www.slideshare.net/iamtin/planning-for-high-performance-web-application?src=embed" title="View Planning For High Performance Web Application on SlideShare">View</a> | <a href="http://www.slideshare.net/upload?src=embed">Upload your own</a></div>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.diamondtin.com/2008/planning-for-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>在Mac下启动多个Firefox实例方便JsUnit运行</title>
		<link>http://www.diamondtin.com/2008/%e5%9c%a8mac%e4%b8%8b%e5%90%af%e5%8a%a8%e5%a4%9a%e4%b8%aafirefox%e5%ae%9e%e4%be%8b%e6%96%b9%e4%be%bfjsunit%e8%bf%90%e8%a1%8c/</link>
		<comments>http://www.diamondtin.com/2008/%e5%9c%a8mac%e4%b8%8b%e5%90%af%e5%8a%a8%e5%a4%9a%e4%b8%aafirefox%e5%ae%9e%e4%be%8b%e6%96%b9%e4%be%bfjsunit%e8%bf%90%e8%a1%8c/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 00:11:16 +0000</pubDate>
		<dc:creator>tin</dc:creator>
				<category><![CDATA[Tech.技术]]></category>
		<category><![CDATA[CI]]></category>
		<category><![CDATA[Continues Integretation]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[JsUnit]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[TDD]]></category>
		<category><![CDATA[持续集成]]></category>

		<guid isPermaLink="false">http://blog.agileito.com/tin/?p=42</guid>
		<description><![CDATA[项目中的JsUnit是使用ant脚本运行的，里面需要设置BROWSER_PATH的环境变量来启动浏览器。在本地check in代码的时候，我们会运行一下测试来减少愚蠢错误被提交到代码控制系统。但是在我的mac下Fir... ]]></description>
			<content:encoded><![CDATA[<p>项目中的JsUnit是使用ant脚本运行的，里面需要设置BROWSER_PATH的环境变量来启动浏览器。在本地check in代码的时候，我们会运行一下测试来减少愚蠢错误被提交到代码控制系统。但是在我的mac下Firefox只能启动一个实例，在运行JsUnit test的时候会提醒我已经打开了Firefox，不能打开另外一个实例，这样我必须关闭正在运行的Firefox。而且由于我比较喜欢打开非常多的Tabs来保持浏览状态，所以关闭Firefox让我很不爽，再说，因为重新启动的Firefox里面带了很多的Tabs，所以经常造成实际运行的JsUnit test发生随机性的超时错误，这个就不能容忍了，因为这无法保证我们的信心。</p>
<p>那么，为什么FF不能启动多个实例呢？原因是它们共享同一个Firefox的profile，所以没法多个实例并发访问。但是通过<a href="http://kb.mozillazine.org/Command_line_arguments">命令行参数</a>是可以创建多个profile给firefox的，简单了。不过遇到的问题是JsUnit的ant任务会检测BROWSER_PATH是否存在，所以如果我把带参数的命令行写到环境变量里面Ant无法检测到这个文件就会报错。那么如果关闭检测可以么？还是不行。因为JsUnit的StandaloneTest里面实际最后会调用DefaultProcessStarter的execute方法，这个方法调用Runtime.getRuntime().exec(command)，这个实现非常直接，不过因为parameters如果直接写到命令行里会发生文件无法找到的问题（应该用数组将命令和参数传入）所以没有办法传入，还是无法运行。</p>
<p>放弃hack吧，我可以修改Ant task和JsUnit的方法，但是绝对不好，因为这个hack没有提交回去的意义。<br />
所以换个思路，这样做：我们去写个shell来解决它。</p>
<p>先在终端运行/Applications/Firefox.app/Contents/MacOS/firefox-bin -CreateProfile jsunit，这时候会弹出窗口让你确认创建这个profile，选择一下不使用extensions和各种工具条，这样减少这些设置对测试的不良影响。<br />
然后在你的home目录创建一个firefox.sh，里面写上：</p>
<p><code>/Applications/Firefox.app/Contents/MacOS/firefox-bin -P jsunit $1</code></p>
<p>前提是你的Mac使用的是默认的bash，否则修改$1为对应的引用字符。然后chmod firefox.sh 555，让它可以运行。</p>
<p>下面就是修改你的~/.profile：</p>
<p><code>export BROWSER_PATH=/Users/[User path]/firefox.sh</code></p>
<p>source ~/.profile让修改生效再运行JsUnit就OK啦。如法炮制想开几个Firefox实例都可以啦。同样方法也适用于让Firefox2和Firefox3共同运行！非常简单。还可以做到开发和浏览分开……以此类推。</p>
<p>回顾一下JsUnit的代码写的不好，如果像Selenium一样能够自动创建一个profile就好了，因为那样可以减少测试之间的影响，还可以让Selenium并行执行。我想，如果有空我可以做一下这个工作:D</p>]]></content:encoded>
			<wfw:commentRss>http://www.diamondtin.com/2008/%e5%9c%a8mac%e4%b8%8b%e5%90%af%e5%8a%a8%e5%a4%9a%e4%b8%aafirefox%e5%ae%9e%e4%be%8b%e6%96%b9%e4%be%bfjsunit%e8%bf%90%e8%a1%8c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
