I've been interviewed by some folks of DPE, here in Spain. You can watch it here: http://comandotomate.net/archive/2008/02/13/entrevista-a-rido.aspx
I have released a new version (still in beta) that support Visual Studio 2008 Test Results File Format.
It has been really easy, the underlying schema was pretty similar, so I could reuse the whole UI without modification, just 2 hours of XSLT refactorings ;-)
http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=trx2html&ReleaseId=10672
Note that this release only supports the 2008 format.
Next versions will support 2005/2008 in one binary file.
Since gotdotnet is phased out, I'm moving all my samples to codeplex (
http://www.codeplex.com/ridocode), including the famous
FileRollerTraceListener
I have moved the trx2html project to CodePlex
http://www.codeplex.com/trx2html
I'm looking for members and collaborators !!
Today I've been talking about CI with TFS in Madrid, Spain. The event has been organized by the local DPE division at Microsoft Spain.
The Spanish Title was: "Integración Continua con Team Foundation Server"
Hope everybody enjoyed the show !!
here are the slides: http://www.slideshare.net/rido/integracin-continua-con-team-foundation-server/
The demo, was based on my last workshop about TestingWithVS, anyway I have refactored the code to focus on CI. You can download it here
If you use TFSBuilds with VS UnitTests, you know how to inspect the TestResults: you must download the whole directory to your local machine, and sometimes this folder could be pretty huge.
So, if you want to check the error details of your tests, you can use my tool trx2html to convert the *.trx files to html, so you can see the reports with any browser.
Here are the instructions in 3 simple steps:
1) copy the RidoTasks.dll file to your source tree
$(SolutionRoot)\RidoCode\tools\RidoTasks.dll
2) Reference the msbuild task in TFSBuild.proj
<
UsingTask TaskName="RidoTasks.trx2html" AssemblyFile="$(SolutionRoot)\GEN4\tools\RidoTasks.dll" />
3) Convert the test reports after drop the build results
<
Target Name="AfterDropBuild">
<CallTarget Targets="CreateTRXReports" />
</Target>
<Target Name="CreateTRXReports">
<CreateItem Include="$(DropLocation)\$(BuildNumber)\TestResults\*.trx">
<Output TaskParameter="Include" ItemName="trxfiles"/>
</CreateItem>
<RidoTasks.trx2html FileName="%(trxfiles.Identity)" />
</Target>
Today's workshop was based on a demo to show all the vs features about testing, it covers:
- Unit Tests (With MockObjects)
- Integration Tests (Using ASP.Net Host)
- Functional Tests (With Web Tests)
- Load Tests (With testcontrollers and test agents)
I've packed all the code in a zip that you can download here:
http://blogs.msdn.com/rido/attachment/1159890.ashx
Tomorrow I will be talking about Testing with VS2005, here is my presentation:
http://blogs.msdn.com/rido/attachment/1156243.ashx
If you are interested in the code samples, please let me know and I will send you the latest version
I'm working on a presentation about Testing, and one of the technics I would like to show is MockObjects.
One of the mock objects I want to create is a DataAccess Layer, and this one should throw SqlExceptions, however the SqlException class is sealed and has no public constructor.
I found a comment about it here: http://www.taylor.se/blog/2006/06/09/mocking-sqlexception/
But the implementation does not work with .Net2, so I have to refactor the code to create a SqlExceptionCreator, and here it is:
using System;
using System.Data.SqlClient;
using System.Reflection;
using System.Runtime.Serialization;
public class SqlExceptionCreator
{
public static SqlException CreateSqlException(string errorMessage, int errorNumber)
{
SqlErrorCollection collection = GetErrorCollection();
SqlError error = GetError(errorNumber, errorMessage);
MethodInfo addMethod = collection.GetType().
GetMethod("Add", BindingFlags.NonPublic | BindingFlags.Instance);
addMethod.Invoke(collection, new object[] { error });
Type[] types = new Type[] { typeof(string), typeof(SqlErrorCollection) };
object[] parameters = new object[] { errorMessage, collection };
ConstructorInfo constructor = typeof(SqlException).
GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, types, null);
SqlException exception = (SqlException)constructor.Invoke(parameters);
return exception;
}
private static SqlError GetError(int errorCode, string message)
{
object[] parameters = new object[] {
errorCode, (byte)0, (byte)10, "server", message, "procedure", 0 };
Type[] types = new Type[] {
typeof(int), typeof(byte), typeof(byte), typeof(string), typeof(string),
typeof(string), typeof(int) };
ConstructorInfo constructor = typeof(SqlError).
GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, types, null);
SqlError error = (SqlError)constructor.Invoke(parameters);
return error;
}
private static SqlErrorCollection GetErrorCollection()
{
ConstructorInfo constructor = typeof(SqlErrorCollection).
GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[] { }, null);
SqlErrorCollection collection = (SqlErrorCollection)constructor.Invoke(new object[] { });
return collection;
}
}
Once my box is ready, I need to WinSDK. The download format from MSDN is an ISO file, so I need a tool like VirtualCD (but this one works only for XP).
So I found
Mounting ISO Images in Vista 5536 http://richmercer.com/archive/2006/08/29/Mounting-ISO-Images-in-Vista-5536.aspx
referencing magic iso: http://www.magiciso.com/tutorials/miso-magicdisc-overview.htm
Today I have switched to Vista RC2. After reinstalling the OS I have to install all the tools I use everyday. Here is the list
- Office Beta2
- OneNote 2007
- Project 2007
- SQL2005
- Visual Studio 2005 Team Suite
- Enterprise Library
- Composite UI Application Block
- Smart Client Software Factory
- Windows Live Writer
When you setup TFS for the first time, usually you use the TFSSetup account. And with this account you are going to login for the first time.
However, once your environment is complete, you will want to login as a different user, but the credentials you used for the first time is already cached...
The first idea I have in mind was: remove the server from the registered server list and add it again, but... the button "remove" is disabled.
After digging (more than 30 minutes) I found the solution here: http://forums.microsoft.com/MSDN/ShowPost.aspx?Pos...
So here is the tip, go to control panel, UserAccounts->Advanced->Manage Passwords and remove the server from the list.
Last week I had to stress a web portal running on x64 machine. Everything works as spected but when I tried to analyze ASP.Net counters I found there was little problem, every ASP.Net related counter was empty, I mean with no values.
And this is because my loadagent was running in 32-bit machine.
I've found http://blogs.msdn.com/edglas/archive/2006/09/06/74... but it's too late to try it :-(
This experience makes me think ... ¿Do we really need 64bit for application servers (IIS)?
One of the most wanted features I miss from the VS2K5 platform SDLC tools is the ability to manage databases as plain text files, and not only the schema but also the minimal data you need to recreate your db from a command line.
Now this tool is started at codeplex, you can try it here SQL Server Hosting Toolkit
The first time I saw the Load Tests in action I got impressed: you can watch the performance counters in the same graph as the stats of your tests !!
However when I tried to use it in a real production environment I discover you can not stablish a direct connection to the DMZ so there is no way to collect perf mon stats from the LoadTestRun.
I have also found problems when you try to collect counters from products that are not installed in your test box, also there are some difficulties to read counters from a 64b OS, so I have to deal with local logs.
To get this job done I have had to create a simple script to get the perf counters I need, here is the trick.
- Define a counter set in perfmon (set it as manual)
- logman -s <server> start <CounterSetName>
- mstest /testcontainer:<YourLoadTest>.loadtest
- logman -s <server> stop <CounterSetName>