Wednesday 29 May 2013

whY SLOW

Recently a friend of mine spoke to me about an amazing web development tool from Yahoo called "YSLOW"



YSlow analyzes web pages and suggests ways to improve their performance based on a set of rules for high performance web pages.

The tool runs tests & gives an overall performance score for websites. It categorises different problems on a scale of A to F with F being by-far the most urgent problems that need fixing.

For example, a test run on the NineMSN.com.au website gave an overall score of 68 & the most critical recommendations included making fewer HTTP requests, a CDN Network, Minify Javascripts, configure E-Tags etc.
 Some general rules to follow recommended by YSlow are listed below:
1.     Minimize HTTP Requests

2.     Use a Content Delivery Network
3.     Avoid empty src or href
4.     Add an Expires or a Cache-Control Header
5.     Gzip Components
6.     Put StyleSheets at the Top
7.     Put Scripts at the Bottom
8.     Avoid CSS Expressions
9.     Make JavaScript and CSS External
10.  Reduce DNS Lookups
11.  Minify JavaScript and CSS
12.  Avoid Redirects 
13.  Remove Duplicate Scripts
14.  Configure ETags
15.  Make AJAX Cacheable
16.  Use GET for AJAX Requests
17.  Reduce the Number of DOM Elements
18.  No 404s
19.  Reduce Cookie Size
20.  Use Cookie-Free Domains for Components
21.  Avoid Filters
22.  Do Not Scale Images in HTML
23.  Make favicon.ico Small and Cacheable



Terminal Server Commands: QUERY


Terminal Server Commands: QUERY

The query utilities are used to display current information about the system such as the current allocation of resources and system status. The query command can invoke any one of the query utilities. The command line format is:

query [appservers | object | process | session | user] [/?]
/? (help)

Query Appservers - Examples

To display information about all application servers found on the network, type:
query appservers

To display information about the fasteddie application server, type:
query appservers fasteddie

To display information about all application servers in domain SYSTEM, type:
query appservers /domain:system

To display the network and node address for the NABBY application server, type:
query appservers NABBY /address

These commands are extremely helpful "when good servers go bad". An example is shown below. This is an easy way of checking the state of your rdp sessions on a server & resetting any connections that you need to.



Wednesday 15 May 2013

Installing and Configuring a Build Service, Build Controller and Build Agent for VS2010 and TFS2010

Install Team Foundation Build Service

This procedure describes how to install Team Foundation Build Service.

If you're installing this build service as a part of Lab Management, choose the "tfsadmin" account that you used while configuring TFS2010 for Lab Management. (Have a look at the "Prerequisites" http://msdn.microsoft.com/en-us/library/dd380687.aspx).

From the installation DVD/ISO for Visual Studio Team Foundation Server, start either the 32-bit or the 64-bit setup.exe to match the operating system that you are running.


On the Welcome page, click Next.


On the License Terms page, read the terms of the license. Click I have read and accept the license terms, and then click Next.

Click Build Service, and click Install.





If the installation wizard prompts you to restart your server, click Restart Now. After the server is restarted, installation resumes. Click Finish. ( I got an error with my installation, you shouldn't. )

Configuring the Build Service


Now that you have installed the build service components, you should be able to see Team Foundation Server Admin Console in your start menu. To open the Team Foundation Server Configuration tool from the Start menu
  • Click Start, point to All Programs, point to Microsoft Team Foundation Server 2010, and then click Team Foundation Administration Console.
  • The Team Foundation Administration Console appears.
  • Click Build Configuration, and then click Configure Installed Features.
  • The Team Foundation Server Configuration tool appears.


Note: If you can't see "Build Configuration" it may be because TFS Power Tools at some point was installed on the system. There was a problem with the backup power tool that caused some nodes not to show up. If that’s the case, under HKLM\Software\Microsoft\TeamFoundationServer\10.0\Plugins there will probably be two nodes – one for backup and one for TeamBuild – removing the backup plug-in node would probably resolve the problem. You could also check the admin log to see if there are exceptions in there, and perhaps export the TFS registry key above. 

Under the build configuration navigation tab, you should see a link to "Configure Installed Features". Clicking the link should start the wizard.



Choose your team project collection.








Ensure that you configure the build service later.



Choose the "tfsadmin" account that you used while configuring TFS2010 for Lab Management.






Now that you've finished the configuration, you should see the build service in the build configuration tab.

You can now use the links to create a build controller & a build agent.













Sunday 12 May 2013

Installing and Configuring a Test Controller and a Test Agent for VS2010 and TFS 2010


To run tests remotely on one or more computers using Microsoft Visual Studio 2010, you have to install a test controller, and test agents. You install a test controller on any suitable computer, and a test agent on each of the computers that are running components of the system under test. The test controller communicates with the test agents to initiate the tests and to collect test result data.

Before you install test controller and test agents, you should verify that you have the required hardware and software to meet your specific needs. For detailed information on test controller and test agent hardware and software requirements, see Test Controller and Test Agent Requirements.

There are two principal scenarios in which you install test controllers and agents:

Remote tests: You want to run tests by using Visual Studio 2010, and you want to run the system on one or more computers that are separate from your Visual Studio computer.
In this case you have to:


  • Install a test controller on a suitable machine.
  • Install a test agent on each machine on which the system under test will run.
  • Register each test agent with the test controller.




Lab tests: You want to run tests either manually or automatically on a lab environment by using Microsoft Test Manager and Visual Studio Lab Management. In this case you have to:



  • Install a test controller on a suitable machine.
  • Register the test controller with a Team Foundation project.
  • Install a test agent on each computer or virtual machine template on which tests will be run.

You can start by grabbing the ISO from http://www.microsoft.com/en-us/download/details.aspx?id=1334

Installing and Configuring a Test Controller

A single test controller manages one or more test agents by sending information to test agents about the task that the agent has to perform.

To install it, mount the ISO you downloaded and you should be able to run the setup.exe like so:

Select the "Install Microsoft Visual Studio Test Controller 2010".


Accept the terms & conditions.


Select the drive & click Install.




Once the installation has finished, click configure.


If you're installing this controller as a part of Lab Management, choose the "tfsadmin" account that you used while configuring TFS2010 for Lab Management. (Have a look at the "Prerequisites" http://msdn.microsoft.com/en-us/library/dd380687.aspx).

Register with the Team Project Collection you require.


You now need to "Apply Settings".



Installing and Configuring a Test Agent


A test agent can be installed in the following ways:
  • As a service
  • As an interactive process

If you want to run tests that interact with your desktop, such as coded UI tests, you must install the test agent that runs these tests as an interactive process. When you configure the test agent as part of the installation process, you can select how you want to run the agent. For more information about how to run a test agent as a process, see How to: Set Up Your Test Agent to Run Tests that Interact with the Desktop.

To install it, mount the ISO you downloaded and you should be able to run the setup.exe like so:

Click "Install Microsoft Visual Studio Test Agent 2010" and then you'll need to accept terms and conditions.



Choose the drive you'd like to install it to.




You must now also configure your agent. If you intend to run Automated UI Tests you should run it as an interactive process.


If you're installing this controller as a part of Lab Management, choose the "tfsadmin" account that you used while configuring TFS2010 for Lab Management. (Have a look at the "Prerequisites" http://msdn.microsoft.com/en-us/library/dd380687.aspx).

This account also needs to be a local admin on the machine.


If you'd like the test controller to be responsible for agents running on virtual environments using Lab Management, leave the "Register with Test Controller" unchecked.

Else, you should point to test controller we just created. If its on the same machine, it will be localhost:6901.

All you need to do now is Apply Settings.