Detailed Remote Setup

In order to realize the usefulness of the Remote Test Runner it needs to be used in remote mode. In remote mode the Click-Once client and WCF service are accessible through an IIS server.
  1. Start by downloading the remote version of RTR.
  2. Unzip its contents into your IIS wwwroot folder. Of course you can have your IIS virtual directories in a custom location, but that part is up to you.
  3. Create two IIS applications for the Client and Service directories.

Within the service's web.config file there are paths for the local resources the service will use. Update them to point to paths that are appropriate for your IIS server.

Clients can access the Click-Once application through the http://.../RemoteTestRunner/client/rtr.htm path. Feel free to add your own branding to this htm file. You can also update the defaults for the Click-Once client.

Updating Click-Once Client Defaults

Note: For an easier setup skip down to the Non-Mage Setup section.

The defaults for the Click-Once client are stored in the file located at:
Client\Application Files\RemoteTestRunner\RemoteTestRunner.exe.config.deploy

Within the configuration/userSettings section there are several settings that you'll want to update.
  • DataPath - This setting points to an XML file for the project and test settings. In our environment we point this to a UNC path on the web server itself.
  • UseRunnerService - Setting this to True will make RTR use the WCF service by default. This is probably what we want since we are configuring this on the server.
  • RunnerServiceUrl - This setting points to the location of the WCF service. It might look like this: http://server/remotetestrunner/service/Service.svc

Click-Once applications use file hashes to make sure the files are downloaded correctly and that their integrity is not comprimised. Because of this security feature we need to update a couple files to update the file hashes. For these updates we use the .NET Mage tool. You can run Mage from a .NET DOS prompt. This will bring up the GUI version of Mage. There are two files you need to update in Mage.
  1. The first file is the Manifest file stored at RemoteTestRunner\Client\Application Files\RemoteTestRunner\RemoteTestRunner.exe.manifest. To update this file you only need to save it. Mage automatically detects that you updated the exe.config.deploy file. After you choose save you will be prompted to sign the manifest. This is a require step, I suggest that you create your own certificates for signing.
  2. The second file is the Application file stored at RemoteTestRunner\Client\RemoteTestRunner.application. Open this in Mage and do the same thing as above, save the file and re-sign.

After the Mage updates the rtr.htm page will download the updated app for you. If at any time there is a conflict in the download cache and a new version of the Click-Once app will now download then you can run Mage -CC to clear the Click-Once download cache. As an alternative to clearing the cache you can increment the version of the Click-Once app to force a fresh download. Version numbers can also be changed within Mage. Updating Click-Once application versioning is beyond on the scope of this Wiki.

Non-Mage Setup

As of version 1.0.2 you can use URL Query String parameters instead of the default parameters in the .config.deploy. This makes it so much easier to deploy a new version. And here is an example of the full URL for using the parameters:
http://server/remotetestrunner/client/RemoteTestRunner.application?DataPath=\\server\rtr\RTR.xml&UseRunnerService=True&RunnerServiceUrl=http://server/remotetestrunner/service/service.svc

Last edited Mar 27, 2009 at 6:52 PM by jeremy805, version 3

Comments

No comments yet.