Web Application Testing: WatiN

27 03 2008

Testing is part of our lifes (or should be) as it is one important task during developmant phase. Unit tests have automated the validation of the business and data access layers, but the interface layer has always been a pain in the neck do implement with automated processes.

The Watin tool/framework appears as an interesting way of building tests in .net language.
Here is a feature list from the site:

  • Automates all major HTML elements
  • Find elements by multiple attributes
  • Supports AJAX website testing
  • Supports frames (cross domain) and iframes
  • Supports popup dialogs like alert, confirm, login etc..
  • Supports HTML dialogs (modal and modeless)
  • Supports creating screenshots of webpages
  • Has a basic (extensible) logging mechanism
  • Works with Internet Explorer 6, 7, 8 beta 1 and FireFox 2
  • Developed in C#
  • Licensed under the Apache License 2.0
  • And.. If you miss some feature, you can add it yourself because it is open source!

A snapshot of a simple test in c#:

[Test]
public void SearchForWatiNOnGoogle()
{
 using (IE ie = new IE(“http://www.google.com”))
 {
  ie.TextField(Find.ByName(“q”)).TypeText(“WatiN”);
  ie.Button(Find.ByName(“btnG”)).Click();
  
  Assert.IsTrue(ie.ContainsText(“WatiN”));
 }
}

I haven´t tested this yet, but sure sounds interesting for everybody working with web interfaces.

Oh, BTW, this is opensource and c#!

Advertisements




Design and build sites for Office SharePoint Server 2007

13 03 2008

A new guide is available from Microsoft SharePoint Products and Technologies Team Blog,

“… the Office SharePoint Server 2007 content teams for the IT pro, developer, and site designer audiences have combined efforts to write and publish a new online guide: Design and build sites for Office SharePoint Server 2007. This guide is aimed at developers, solution designers, architects, and business unit IT pros who plan to develop one or more custom enterprise sites by using Microsoft Office SharePoint Server 2007 – such as company-wide portal sites or Internet presence sites.”

in Announcing: Design and build sites for Office SharePoint Server 2007.





Sharepoint Capacity Planner Tool

11 03 2008

Part of the System Center Capacity Planner 2007, there is a module available specific for Sharepoint infrastructure: Sharepoint Capacity Planner Tool. This tool will help you plan the hardware and Microsoft supported physical architecture for a Sharepoin installation. Get it from here. You will also need the System Center Capacity Planner 2007.





Silverlight Blueprint for SharePoint

4 03 2008

The Silverlight Blueprint for SharePoint is source code and guidance for developers describing how to use Microsoft Silverlight and Microsoft SharePoint Products and Technologies together in business applications and Internet Web sites. SharePoint applications that use Web Parts can now be built using Silverlight user interface elements. This capability enables a fresh look at data exposed through SharePoint Products and Technologies using the modern graphics capability in Silverlight.

See it at: http://www.ssblueprints.net/sharepoint/ It is now available. 

Download it from: http://www.codeplex.com/ssblueprints (still not available)

First seen on: http://msdn2.microsoft.com/en-us/sharepoint/cc303301.aspx

Take a look at other Software-plus-Services Blueprints: http://channel9.msdn.com/wiki/default.aspx/Channel9.SoftwarePlusServicesBlueprints





Creating a site map for WSS/MOSS

4 03 2008

Creating a site map can can take you some time and effort, depending on how fancy you need it. In Sharepoint you have the object PortalSiteMapDataSource that will feed the site structure, so all you nedd is something to consume it and render a visible presentation of the structure. This can be achieved in several ways. As an example I’m using a TreeView. Here is the code for a simple SiteMap.aspx page, using the minimal.master masterpage:

 <%@ Page language="C#" MasterPageFile="_catalogs/masterpage/minimal.master" Inherits="Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> 
<%@ Register Tagprefix="SharePointWebControls" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="PublishingWebControls" Namespace="Microsoft.SharePoint.Publishing.WebControls" Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="PublishingNavigation" Namespace="Microsoft.SharePoint.Publishing.Navigation" Assembly="Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <asp:Content ContentPlaceholderID="PlaceHolderMain" runat="server"> 
<PublishingNavigation:PortalSiteMapDataSource 
        ID="SiteMapDS" Runat="server" 
        SiteMapProvider="CurrentNavSiteMapProvider" 
        EnableViewState="true" 
        StartFromCurrentNode="true" 
        StartingNodeOffset="1" 
        ShowStartingNode="true" 
        TrimNonCurrentTypes="Heading"/> 
         
        <asp:TreeView runat="server" 
        id="TreeView1" 
        DataSourceiD="SiteMapDS" 
        EnableTheming="true"  
        ShowLines="true" 
         ShowExpandCollapse="false"></asp:TreeView> </asp:Content>

This is a simple way of achieving a site map presentation.

Enjoy. 





Sharepoint Sitemap Generator

3 03 2008

This is something I find useful! A SiteMap generator feature with source code.

Great work!





WorldWide Telescope

3 03 2008

Being astronomy one of my hobbies, I was very excited to read that Microsoft was launching the Worldwide Telescope project. This will allow to travel the sky based on the images of the best/largest telescopes. I don’t know if you ever peeked through a telescope before, but anything beyond our solar system are simple black and white photos of small dots. If you want to see the pictures like the one bellow, normally you have to combine several photos of several minutes of exposure time to achieve this.


(in hublesite.org)

This means that when you peek, you won’t actually see what you can get with post production. Well, I’m drifting here…. sorry. Being outside in the cold nights (typically, the colder the better for observation) with my 7, 4 and 3 years old kids is also not viable. The WWT will be an interesting enough alternative.

There are also other softwares available that can give you night sky imagery, but from what I’ve read, this will use higher resolution images and definition.

Take a look at this presentation from TED: http://www.ted.com/talks/view/id/224

WWT will be available this Spring (so they say…).

UPDATE:

A better description on what to be expected: http://cosmiclog.msnbc.msn.com/archive/2008/02/27/711588.aspx