tag:robotlegs.tenderapp.com,2009-10-18:/discussions/questions/896-clarify-tdd-in-robotlegs-is-my-understanding-of-unit-tests-correctRobotlegs: Discussion 2012-08-27T10:37:48Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/155994392012-04-27T11:28:59Z2012-04-27T11:28:59ZClarify TDD in Robotlegs. Is my understanding of unit tests correct?<div><p>Hi Kimcity - just a quick response as I am in an airport.</p>
<p>We use jenkins on the current build of the Robotlegs 2 framework
- so it would be worth checking out the repo on Github.</p>
<p><a href=
"http://github.com/robotlegs/robotlegs-framework">http://github.com/robotlegs/robotlegs-framework</a></p>
<p>DevBoy (dominic graefen) is the main person who handles Jenkins
for Robotlegs,</p>
<p><a href=
"https://twitter.com/#!/devboy_org">https://twitter.com/#!/devboy_org</a></p>
<p>but Simon Bailey (newtriks on github and twitter) also has some
experience I think.</p>
<p><a href=
"https://twitter.com/#!/newtriks">https://twitter.com/#!/newtriks</a></p>
<p>Both are very helpful.</p>
<p>As I understand it, FlexMonkey is an end-to-end GUI testing tool
- that's different from a unit testing framework. Mockolate is a
mocking library - we are using it alongside FlexUnit and ASUnit for
our tests in the examples in the book. So, you would need FlexUnit
4 or ASUnit 3 to compile the tests in the book. (FlexUnit for the
Kanban project, ASUnit for the Mosaic project), plus mockolate for
the mocking library.</p>
<p>hth,</p>
<p>Stray</p></div>Straytag:robotlegs.tenderapp.com,2009-10-18:Comment/155994392012-04-28T01:36:28Z2012-04-28T01:36:28ZClarify TDD in Robotlegs. Is my understanding of unit tests correct?<div><p>Thank you, Stray.</p>
<p>I have already sent out tweets to DevBoy (dominic graefen) and
Simon.</p>
<p>I looked around the git repo for RL. I cannot find anything that
can help me understand how to use Jenkins with FlexUnit for CI in a
Flex 4.6 project.</p>
<p>In any case, I realize that RL uses FlexUnit 4.1, so I will be
using that as well. Was looking at ASUnit at first.</p>
<p>My original question still remains:</p>
<p>I cannot find via google an example of anyone hooking up jenkins
with unit tests for Robotlegs. Does anyone know any examples that I
can learn from?</p></div>kimcitytag:robotlegs.tenderapp.com,2009-10-18:Comment/155994392012-04-28T17:52:34Z2012-04-28T17:52:34ZClarify TDD in Robotlegs. Is my understanding of unit tests correct?<div><p>Hi Kimcity,</p>
<p>I can't give a step-by-step guide (as Dominic was kind enough to
set everything up for us, so I'm not clear on all the details), but
here is my understanding:</p>
<ol>
<li>Write unit tests for your project</li>
<li>Write a build script (using Ant or Buildr) that runs your tests
and provides a report</li>
<li>Configure Jenkins to run that script and read the report</li>
<li>Configure Jenkins to checkout the code and run the tests
whenever you do a commit (you can do this with a GitHub hook).</li>
</ol>
<p>Jenkins seems to integrate really well with GitHub. Looking at
the Jenkins config for Robotlegs I can that it has a field for
"GitHub Project" which we have set to:</p>
<p><a href=
"https://github.com/robotlegs/robotlegs-framework/">https://github.com/robotlegs/robotlegs-framework/</a></p>
<p>Further down it has repository settings which have set to:</p>
<p><a href=
"https://a:a@github.com/robotlegs/robotlegs-framework.git">https://a:a@github.com/robotlegs/robotlegs-framework.git</a></p>
<p>We've also set it to run against the "version2" branch of that
repository.</p>
<p>The "Build Trigger" is set to "Build when a change is pushed to
GitHub".</p>
<p>The "Build Environment" has "Run Xvnc during build" selected. I
assume this is to get the Flash player to launch on Linux.</p>
<p>The Execute Shell Command is set to:</p>
<p><code>bundle exec buildr clean test -e test</code></p>
<p>This is because Dominic set it up to do the build using Ruby
Buildr instead of Ant.</p>
<p>Finally, under "Post-build Actions" we have "Publish JUnit test
result report" set to "reports/flexunit4/TEST-*.xml"</p>
<p>I hope that helps a bit. Hopefully someone can provide more
details.</p></div>Shaun Smith