Wednesday, 15 October 2008

Pex Automated Testing

Pex is a tool being developed by Microsoft Research which has the potential to dramatically improve the quality of software testing while requiring minimal, if any, effort on the part of the developer. Pex can automatically generate a set of inputs for a paramaterized unit test which can effectively exercise most, if not all, possible code paths.“

http://channel9.msdn.com/posts/briankel/Pex-Automated-Exploratory-Testing-for-NET/

There is a talk at the DDD7 at Reading on the 22nd November that include Pex, presentation by Ben Hall, along with ‘TDD and Hard to Test code’, IoC, MVC and lots more.

Friday, 26 September 2008

TDD and Style Cop

In this ever changing world the powers that be, that is to say me and my line manager have decided that it is time to introduce some stability/readability into the code that we and rest of the team produce.

To that end over the next few weeks we’ll be pushing for the use of tools, like StyleCop, to get consistency. Before the end of the year the introduction of TDD. TDD will be the more difficult as we’ll have to factor in the initial hit in code production.

Monday, 28 July 2008

Still around

One final requirement that our end users had was that there should be a vertical menu system that would hide previously selected items and expend the current selection. The OOTB ASP.Net menu system did some of this but when displaying a deep hierarchy it didn't quite do what we wanted it to do. Dipping back into an OOTB publishing site and creating the predicted hierarchy to see how MOSS dealt with showed that after 3 levels the vertical menu gets truncated and a horizontal breadcrumb is created. The breadcrumb was the problem as none of our templates had a breadcrumb in. To resolve the issue we ended up buying the Telerik RAD Controls suite and using the Treeview for the navigation. The styling of the Treeview was done by adding the relevant CSS information into our site CSS.

With the deployment to our production environment, which so far has gone well, focus has moved to Phase 2. In the first part of this phase all the building blocks have been, or will be created, which include all the lists that will be used within the site.

Part of this phase will be using filtered lists - which seem like fun - where the user will select a value in one list and this will be used to populate another.

Monday, 30 June 2008

Code Metrics don't run with a reference to Microsoft.SharePoint.dll

I thought it might be worthwhile to run some code metrics on an event receiver that I'm writing to send emails when someone submits a request.

When running the metrics an error is returned:

Message: An error occurred while calculating code metrics for target file <YourFileName> in project <YourProjectName>. The following error was encountered while reading module 'Microsoft.SharePoint': Security attribute type does not have a default constructor: Microsoft.SharePoint.Security.SharePointPermissionAttribute, Microsoft.SharePoint.Security, Version=12.0.0.0, Culture=neutral, Publickeytoken=71e9bce111e9429c.

Solution: https://connect.microsoft.com/VisualStudio/feedback/Workaround.aspx?FeedbackID=324796

Friday, 27 June 2008

UDC Creator

Whilst we are in the final stages of our phase 1 development we're already scoping phase 2 (just for fun ;) ). Part of that exercise is to assess the best way forward for some use of forms within MOSS, more specifically, whether InfoPath would be a help or hinderance.

Whilst browsing around I found the following which is link to a UDC Creator http://msdn.microsoft.com/en-us/library/bb431899.aspx guess most people will have already found it but I thought it might be useful for someone.

Thursday, 19 June 2008

Cannot compare two elements within an array

I had this error message appear whilst moving between our development and staging environments. I had created a backup of the site I wanted to move and copied it over to the staging environment. Created the sites, there were four host headed sites to be created on staging to replicate our production environment. On three of the sites the stsadm -o restore command worked fine and on the fourth it would not. So after much scratching around comparing features, using utilities such as WssAnalyzeFeatures and FaultyFeatures, there was nothing obvious or indeed showing up as an error.

So to resolve the issue I used the stsadm -o export, to get a cab file and used the stsadm -o import -versions 2 and everything was fine.