In an earlier article I discussed how to use and Ordered Test to control the execution order of Coded UI Tests (the same can be applied to other test types as well). I received a few follow-up questions about how to do this in TFS Build so tests run in a particular order as part of a build.
Here’s one way that’s remarkably easy.
In my example, I have a project called JustTesting, which contains just a test project with 3 unit tests (which will always pass, BTW).
I put those tests into an ordered test:
In Solution Items, I open up my JustTesting.vsmdi file, create a new test list (called Ordered Tests), and add my ordered test to it.
Once that’s done, I check everything into TFS (my Team Project’s name is “Sample CMMI”.
Next, I set up a build definition (in Team Explorer, right-click Builds, and select “New Build Definition”). Set whatever options you want (name, trigger, workspace, build defaults) but stop at “Process”.
In the section named “2. Basic”, you’ll see that by default the Automated Tests field is set to (something like): “Run tests in assemblies matching **\*test*.dll using settings from $/Sample CMMI/JustTesting/Local.testsettings”.
Click on the ellipsis on the right of that to open the Automated Tests dialog:
Remove the entry you see (or leave it if you wish to include that test definition), and then click “Add”.
In the Add/Edit Test dialog, select the optoin for “Test metadata file (.vsmdi)”. Use the browse button to find and select your desired .vsmdi file. In my example, JustTesting.vsmdi.
Uncheck “Run all tests in this VSMDI file”, then check the box next to your test list containing the ordered test. In my example, the test list is called “Ordered Tests”. Your dialog should look something like this:
Click OK and you’re Automated Tests dialog should look like:
Click OK again, then save your build definition.
Queue a new build using this definition. Once complete, look at the build report to see your test results.
It’s a few steps, but nothing ridiculous. And I didn’t have to hack any XML files or do any custom coding.
Hope this helps!
With the Windows Phone 7 RTM announcement this week, it’s time to start building your apps to run on it! What better way to get excited about this new platform and enjoy a jumpstart in your development than developer launch events!
There will be national and regional launch events, along with an opportunity to view online as well (if we don’t make it to your neck of the woods).
Windows Phone 7 gives you the power to build complex, robust applications using consistent hardware specs, a comprehensive development toolkit, and the all-new, full-service Marketplace for selling your apps. We want you to be ready to capitalize on this new frontier, so we’re launching two days of fast-paced learning to get you up and running with Windows Phone 7 development. Check out the agenda and pick the day that best fits your needs – or join us for both. The choice is yours. Whatever you can imagine, you’ll get the information you need to build high-demand apps with Windows Phone 7.
Day 1: Jump-Start Your Mobile Development | 8:30am - 5:15pm In the first of this two-day launch event, we'll take you under the hood of Windows Phone 7 and the Windows Phone 7 platform with a progressive set of learning sessions. We'll start with the basic tools and fundamentals of Windows Phone 7 application development and as the day unfolds, we'll go deeper into development scenarios using Silverlight, XNA and the Windows Phone 7 SDK. You'll also see how to earn cash for your apps in the fully loaded Marketplace.
Day 2: Unleash Your Best App Workshop | 9:00am - 4:00pm This hands-on workshop is designed to help you turn those napkin sketches and subway scribbles into real, sellable apps. You'll apply fundamental Windows Phone 7 design principles to build an app and upload it to the fully revamped Marketplace. Go at your own pace or follow along with a proctored group lab. Either way, you'll get step-by-step advice from Microsoft and community experts. It's an unprecedented opportunity to stake your claim in the marketplace – using familiar tools and consistent specs.
DAY 1: Jump-Start Your Mobile Development
Hilton Orange County
DAY 2: Unleash Your Best App Workshop
Microsoft Silicon Valley Campus
San Francisco Design Center
10/12 - DAY 1: Jump-Start Your Mobile Development – Streamed Live – REGISTER HERE
Don’t live in California? You can also attend a Windows Phone 7 Unleashed event, put on by MSDN Events:
The first half of this deep dive event is lecture and hands on lab. At the half point mark of the day, you’ll have a solid foundation for building WP7 applications. The second half of the day is going straight to code. Build the best app and have a chance to win!
In order to deliver the best possible experience for attendees, seating at these events is VERY limited. Register now!
Please note, there are pre-requisites for these events!
Events rolling your way:
New Horizons Learning Center
Microsoft Denver Office
Salt Lake City
Microsoft Salt Lake City Office
Events are being confirmed daily, so please subscribe to an RSS feed on www.msdnevents.com for updates on events in your area! Check each registration page for full agenda and details.
I hope to see you all at one of these awesome events!
I receive a lot of email each week from you asking very specific, and valuable questions. It’s my hope that a newsletter like this will help me communicate important announcements, tips/tricks, and other items to help you and your team ultimately be more successful! Whenever I post a new newsletter, I will send email notifications to those of you who would like to be contacted. If you don’t want to receive email notifications, just let me know!
I plan to create a newsletter at the beginning of each month, highlighting notable items from the previous month and what to look for in the coming month.
Visual Studio LightSwitch - I mentioned this announcement last month. Now LightSwitch Beta 1 is now available for download!
Visual Studio Database Guide – The latest product of the ALM Rangers team, the VS Database Guidance provides practical guidance for Visual Studio 2010 Database projects, focusing on 5 areas: Solution and Project Management, Source Code Control and Configuration Management, Integrating External Changes with the Project System, Build and Deployment Automation with Visual Studio Database Projects, and Database Testing and Deployment Verification. This release includes common guidance, usage scenarios, hands on labs, and lessons learned from real world engagements and the community discussions.
Window Phone 7 Developers – That’s right, it’s getting closer! Windows Phone 7 just RTM’d. What does that mean for you? It means that more content, training, and toolkits are on the way for developers. In fact, I just blogged about upcoming developer launch events around the West. If you’re not local to an event, you can still watch the event streamed live on October 12th (just register first).
Agile Lean Users Group - Hey Phoenix, check it out!
TFS Re-Release: Team Foundation Server 2010 has been re-released to include QFE KB2135068, which addresses an upgrade issue I mentioned in last month’s newsletter. If you’re already using TFS and never encountered any issues upgrading, then you don’t need to do anything about it.
Hands On Lab: Improving Software Quality with Visual Studio Team System 2010 – This lab is coming to Denver and Phoenix later this month. This two-day instructor-led course provides students with the knowledge and skills to use the latest testing tools provided by Visual Studio Team System 2010 to improve their ability to manage and execute test plans. Test case creation and management will be covered, as well as test execution and automation practices. Creating and managing virtual lab environments using Lab Management will be discussed within the context of test plan and execution. By the end of the course, students are equipped to begin planning the implementation of Visual Studio 2010 for improving testing practices within their organizations. This course is currently taught using Visual Studio Ultimate 2010. Details: Denver | Phoenix
Lots of Webcasts! – There are quite a few webcasts coming soon that will cover all sorts of topics. Stay updated here.
I’m busy planning a couple other events which I hope to have delivered by the end of this year. My goal is to create a couple of unique event series this year – hint: maybe we’ll host an event at a brewery?
As always, we maintain a pretty up-to-date listing of events in your area (including MSDN and TechNet) at GotTeamSystem.com.
Keep sending topics you’d like to hear more about, either via an event or blog posts. I’ll see what I can do!
For those of you in Colorado, it looks like I’ll be presenting at a couple upcoming user groups:
Reminder: If you’d like me to email you when I post a newsletter, just send me a note at email@example.com. I won’t email you directly otherwise!