This project is read-only.

storyq with tfs build 2010

Oct 16, 2011 at 2:48 PM

I am novice and managed to use storyq with xunit.net. so far looks good. i run resharper as runner. however there s now a new team foundation build server. so we had to integrate storyq with tfsbuild 2010.

Please could you have a hand? I have been looking all around and have not found anything solid. thanks.

Oct 16, 2011 at 8:53 PM

Obviously this functionality does exist in xunit.net out of the box (see feature request http://xunit.codeplex.com/workitem/5648)

However, your solution is documented here: http://salvoz.com/blog/2010/02/22/running-xunit-from-team-build-2010-and-publishing-results/

Do you understand the integration process?

  1. Execute tests from build xaml file
  2. Output to trx format (see http://salvoz.com/blog/2010/02/22/transform-xunit-to-mstest/)
  3. Ensure output is collected by buildserver

Integrating into TFS is both simple and hard.

The simple part is running the tests - you will need to update the your build.xaml file. Because aren't using the MSTest build runner, the easiest thing to do is put in a new Activity which is a command line runner. So work out how to execute xunit.net from commandline. Personally, I just use Gallio for most projects because it does all this heavy lifting for me (just as ReSharper does through the GUI).

Next you'll next to transform the xml output to trx format.You need to get all this done before the build scripts pickup the trx output to integrate the test results *nicely* into build results. Sometimes, this just gets hard! I've had one project that it just wouldn't work and we thought that I was because of some data in TFS rather than the build scripts per se.

In short, to do this on TFS is straighforward once you have it going. All the answers are google-able but the starting point for customising TFS is this blog series (http://www.ewaldhofman.nl/post/2010/04/20/Customize-Team-Build-2010-e28093-Part-1-Introduction.aspx) and if you are learning about Worflow Activities for the build scripts Andrew Zhu's book has been the best (http://www.amazon.com/Microsoft-Windows-Workflow-Foundation-Cookbook/dp/1849680787).

Prepare yourself to soak many, many hours. Alternatively, use TeamCity and prepare to be wowed. I hope that helps and sorry I can't give a very simple download and deploy answer - that solution would be to write a nice workflow activity that could be included in the build tasks for the xaml file.

--tb

Oct 17, 2011 at 8:44 AM
Edited Oct 17, 2011 at 9:08 AM

thank you Todd,

appreciated your broad answer.  i kind a feel that it will more like hacking than configuring. Adam has responded as that vNext will solve all this issues.

however I could not find anything mentioned on storyq, where it should fit the whole picture?

http://blog.strobaek.org/2011/10/03/howto-team-foundation-server-and-xunit/    here found another link similar to what you gave think in general the approach is identical however i m not really feeling qualified to point the differences.

finally, i started already freaked out that  i have been spending more time on preparation of my dev environment rather than to actual project.

Oct 18, 2011 at 12:21 AM

Just looked at the blog. Ah, someone has written a nunit --> MSTest transformation. Excellent - thanks for that. Yes, using the console/command activity is good. Personally, I delegate it to a psake or msbuild task that is part of the source code and then you can do it as dev as well - plus you don't have to test it repeatedly via checkins required with updating xaml files.

Two points, TFS + XAML does feel like hacking. It isn't. While I loath it the best I can say is that it is a framework which you have a default implementation. The problem is that we think it is a solution. (And not that good a one IMHO - powerfull, yes). As such, re-purposing a framework implementation is much harder (ie steep learning curve). It took me a couple of weeks to get the hang out and I don't reckon I should have to work that hard. TeamCity on the other hand is a solution and pretends to be nothing else - and it is a damn fine one at that. Focussed and flexible, great hooks.

 

Second, dev environment setup is the actual project. I am paid to delivery reliable and repeatable code. You will get better at this and make the time. Until your lead time for release is close to zero (ie one click) you have systemic issues. CI + TDD is painful at times.

Good luck

 

Oct 18, 2011 at 8:23 AM

thanks Todd, for valuable input.  good news i was able to make it work. for the moment i am getting results from build server and all seems pretty and clean.

however i still kind a have blur imagination how bdd framework like storyq will relate/integrate with new built build stack(xunit.net +tfsbuild).  as i have been telling i used to run resharper from vs editor to run storyq+xunit.net.  now how it gonna look like should i still implement same pattern as for F5 i should keep running resharper and while it comes to checkin the build will fire?

i am afraid i should make storyq produce report and make it visible in tfs build side right?

 

many thanks.

Oct 18, 2011 at 9:10 PM

> i am afraid i should make storyq produce report and make it visible in tfs build side right?

I take it that you are meaning, how do I get the full output from test onto the build server (ie In Order to ...) and that currently you can't. Ideally, yes having it would be great and that there should be no cost to getting it (ie TeamCity!). If in this case, you don't then I would looking at the question, who is going to read it?

StoryQ sweet spot is to have lightweight way to be able to input and output results that the business or analysts can read. If none of them are actually working across the build server then I wouldn't worry. There is no enough return on the effort invested. Whereas I my argument above is that getting the tests running/failing on the build server always returns on investment.

So, in short my pragmatic response, nah, don't worry! Does that address your question or I have I missed the main (again) ;-)

--tb