testing, windows, net comments edit

Generally speaking, it’s good practice to develop as a non-administrative user so you can make sure your applications will run for non-admin users and so you won’t do any damage to your environment as you develop. Unfortunately, some things end up forcing you to develop as an admin because they require rights that most non-administrative users don’t have.

Typemock Isolatorno longer has to be one of those things that forces you to run as an administrator.

The Isolator install guide has a “Security” section that outlines the various registry keys and files that Isolator needs read/write access to. If you give your non-admin user the rights to these keys and files, that non-admin user can start, stop, and link Typemock Isolator with other profilers.

In a recent round of troubleshooting, I ended up writing a program to modify the ACL on the requisite keys and files as found on the target machine. The result is EnableTypemockForNonAdmin - a command-line program that automates this permissions setup process.

This program will make permissions changes to files and your registry. Read the enclosed readme file and make sure you fully understand what’s going to happen before you run it.

Usage is simple. Open a command prompt as an administrator and run the program, passing in the name of the non-admin user you want to have access to Typemock Isolator.

EnableTypemockForNonAdmin.exe YOURDOMAIN\yourusername

Standard disclaimers apply - I’m not responsible for any damage done by the program; YMMV; use at your own risk; etc.

UPDATE 5/4/2010: Typemock Isolator 6.0.3 (not yet released at the time of this writing) may fix these issues if you are using Typemock Isolator with TestDriven.NET to make this program unnecessary. Jamie Cansdale from TestDriven.NET has commented below and left a link to a registry file you can install to make things work without changing permissions. I will leave this program available as it is still helpful for earlier versions of Typemock Isolator and/or TD.NET, and may still be required for command-line builds. (We’ll have to see once Isolator 6.0.3 comes out.)

UPDATE 5/5/2010: I verified that with Typemock Isolator 6.0.3 and NCover 3.4.3 the registry additions provided by Jamie Cansdale will allow you to run as a non-admin user (both using the Typemock Config Tool and TestDriven.NET), though I can’t speak to earlier versions of Isolator or linking with profilers other than NCover. These keys are also custom additions to your registry, so it’s a little “non-standard.” YMMV. I think the permissions change is probably the route I’ll continue to go until the profiler companies and/or Typemock start shipping these tweaks as supported items out of the box.

UPDATE 1/20/2011: Typemock Isolator 6.0.6 now requests read/write permissions on the registry key where the license info is kept right when the config tool starts up, regardless of whether you’re going to modify the value. I updated the EnableTypemockForNonAdmin tool to version 1.0.1.0 and added that registry key to the list of keys to give your non-admin user permissions to. Download now - free!

[EnableTypemockForNonAdmin - 1.0.1.0 (zip)]

[EnableTypemockForNonAdmin Source - 1.0.1.0 (zip)]

home, network comments edit

I had a problem this morning where my D-Link DAP-1522 access point had to be reset to factory defaults. After clicking the reset button on the back and having it reboot, I was unable to go to the configuration page following the instructions (visit 192.168.0.50 and log in). Totally inaccessible.

I ended up calling D-Link support and they explained how to do a more manual connection to the access point. Basically the DHCP server wasn’t enabled so I wasn’t able to get an IP address when connecting directly to the access point so I had to mangle my network settings a bit long enough to connect and set things up.

Connect your computer to the access point with an Ethernet cable.

Go into the adapter settings for the network adapter you’ve connected to the access point.

Update the TCP/IPv4 settings on the adapter so it’s not DHCP anymore. Use these settings:

  • IP = 192.168.0.99
  • Subnet Mask = 255.255.255.0
  • Gateway = 192.168.0.50

Now open up a browser and go to 192.168.0.50 as you normally would to get to the configuration page. It should come up.

I kinda wish that had been in the instruction manual, but since it’s not, there you go.

net comments edit

If you are running Typemock Isolator along with another profiler like NCover and a crash occurs (e.g., the parent build process gets killed), it has the potential to corrupt the registry. What that means is that subsequent operations when you link/unlink with your coverage profiler may not work properly.

For NCover, you may see the build fail with exit code #20000 and the message “NCover.Console is returning exit code #20000. NCover couldn’t create a coverage report.” The reason it couldn’t create a coverage report is that Isolator and NCover weren’t linked correctly so NCover wasn’t actually running.

To fix it, repair your NCover installation. This will fix the corrupt registry keys and subsequent Typemock Isolator/NCover linkages will work correctly.

Thanks to Ohad at Typemock, Alan at NCover, and Jamie Cansdale from TestDriven.NET for helping me track this one down.

net comments edit

Here’s the setup:

You have a project that uses NUnit 2.5.5. You don’t actually have NUnit installed - you have it checked in along with your project’s source as a third-party dependency. (You did it that way so you can have different projects using different NUnit versions without having to install/uninstall things.) You’re using TestDriven.NET to run tests inside Visual Studio but you noticed that it ships with NUnit 2.5.3 - an earlier version of NUnit - and you want to use the version your project references.

How do you tell TestDriven.NET to use your project’s version of NUnit?

First, make sure your checked-in version of NUnit keeps the same directory structure it’s distributed with. That means you have a folder that contains the appropriate version of NUnit-Console.exe, etc., and a subfolder called “framework” that has the nunit.framework.dll in it, like this:

YourProject
|
+-lib
  |
  +-NUnit // Has NUnit-Console.exe in it
    |
    +- framework // Has nunit.framework.dll in it
    |
    +- lib
    |
    +- tests

Ensure you’re referencing nunit-framework.dll from the NUnit “framework” folder. There’s an nunit.framework.dll in the NUnit folder, probably, too, but don’t reference that one - reference the one in the “framework” folder.

Open the TestDriven.NET install folder. This will be something like C:\Program Files\TestDriven.NET 3. On a 64-bit system it might be in C:\Program Files (x86)\TestDriven.NET 3 or the like.

Go into the TestDriven NUnit folder for the version you’re referencing. You should see a folder called “NUnit” in the TestDriven.NET install folder. Open that. Inside there you’ll see different folders for each version of NUnit. Right now there’s “2.2,” “2.4,” and “2.5.” In this example, we’re looking at using NUnit 2.5.5 instead of 2.5.3, so we’ll open up the “2.5” folder. You should now be in a folder like C:\Program Files\TestDriven.NET 3\NUnit\2.5.

Copy the nunit.tdnet.dll file into your lib\NUnit folder. Look in the TestDriven.NET NUnit version folder you should be in right now. You’ll see a file called “nunit.tdnet.dll.” Copy that into your checked-in lib\NUnit folder - the same folder that has NUnit-Console.exe in it. You will need to check this in along with your NUnit dependency.

Go into the TestDriven.NET “framework” folder. Still in that C:\Program Files\TestDriven.NET 3\NUnit\2.5 folder - open the “framework” folder under that. You should be in C:\Program Files\TestDriven.NET 3\NUnit\2.5\framework.

Copy the nunit.framework.dll.tdnet file into your lib\NUnit\framework folder. In that C:\Program Files\TestDriven.NET 3\NUnit\2.5\framework folder you should see a file called “nunit.framework.dll.tdnet”. Copy that into your lib\NUnit\framework folder - the same folder that has nunit.framework.dll in it. You will need to check this in along with your NUnit dependency.

Run TestDriven.NET. Now when you run your tests with TestDriven.NET you should see it report that it’s using the version of NUnit you have checked in along with your project. That wasn’t too hard, now, was it?

What if I need to customize the locations? What if you don’t have the whole NUnit/framework folder structure and such? The basic principle here is that nunit.tdnet.dll needs to be in the same folder as NUnit-Console.exe and nunit.framework.dll.tdnet needs to be in the same folder as nunit.framework.dll. You may need to open the nunit.framework.dll.tdnet file in a text editor (it’s an XML file) and modify the “AssemblyPath” node in there. I haven’t actually tried this myself, so YMMV, but it should work.

media comments edit

A couple of weeks back I blogged about setting up my Onkyo TX-NR3007 receiver. Now that I’ve had it for a couple of weeks (even if I was out one of those weeks), what have I learned?

A lot, actually, but not all of it is directly related to the Onkyo TX-NR3007. Some is just “modern home theater” stuff, but since I learned it while messing with this receiver I figured it’s as good a place as any to put it.

Onkyo
TX-NR3007

Electrical relays are annoying. I stepped up from a low-to-mid-range Yamaha receiver bought a little over 10 years ago to a new, modern, upper-mid-range receiver. My old receiver had one set of circuitry to process everything so there was no switching going on. In this new receiver (and, I gather, most newer receivers), different sets of circuits process different audio input types. When different circuits switch on, they make a clicking noise because there’s an electrical relay switching them on and off. This clicking is not quiet (though it’s not loud, either - it’s just audible) and gets annoying.

TV broadcasters need to get their acts together with respect to sound signals. Say you’re watching an HD broadcast on a national network. That broadcast will probably have full Dolby Digital sound coming with it. Now the commercial break hits and switches to the local network affiliate… who shows a standard-def commercial with stereo sound. The relays on the receiver switch over to process the stereo sound (click!) and then the national network plays a full HD commercial so the sound switches back to Dolby Digital (click!) and then back to local affiliate (click!) and then back to the TV program (click!). This gets really, really annoying. I actually watched one local commercial that switched audio signal types from stereo to mono and back every three seconds for the full 30 second spot (click click click).

I also noticed that the Showtime HD broadcast for The United States of Tara inevitably has two or three hiccups where the sound broadcast flickers for just a fraction of a second… but it’s enough for the receiver to realize the sound dropped (click) and came back (click). That’s happened for a couple of weeks in a row.

A little forum searching and talking to folks and it turns out this isn’t news, just news to me. Having the lower end receiver that didn’t know the difference between the signals meant I was a bit on the ignorant side.

(Note that this signal switching doesn’t happen if, say, you’re watching a movie on Blu-ray or something. Once the signal’s set and running, it’s set. On the other hand, the Blu-ray disc menus may be in stereo sound while the movie’s in DTS or something, so the signal will switch if you toggle back and forth.)

UPDATE 4/28/2010: A commenter reminded me of something I left out - the clicking is primarily around switching between audio processing circuitry, so if you force all of the input typesto use the same audio processing modethen you won’t get the clicking. The problem you’ll run into here is that there are very few processing modes common to all of the input types, so you end up with a “lowest common denominator” scenario. I have my receiver set to process everything surround with the “THX Cinema” mode and everything not surround with “Neural THX Cinema.” This has drastically reduced, but has not eliminated, the click. I want the THX processing, but you can’t process stereo input as full THX surround, hence the need for the “Neural THX Cinema” setting - it approximates surround with the limited input. If I switched to something else I could possibly find a setting that all the inputs support, like Dolby Pro Logic IIz, or I could turn the audio processing off and just let the raw signal play through, but then I’d also be missing out on some of the features that I originally chose the receiver for to begin with.

Calibrated sound is awesome. I thought my old receiver sounded good, but after running through the auto-setup with this new receiver, I found that I had my rear speakers set far lower (volume) than I should have and the balance was a little off. Now that it’s set up right, it’s an amazing, noticeable difference.

A calibrated video image may not “look right” to you. As part of the install, I borrowed a copy of the Spears & Munsil HD Benchmark disc from my friend Alex. As long as I was getting my sound set up right, might as well set the picture up right… right? I got the whole thing calibrated correctly and, as expected, the picture was not quite as bright and “poppy” as it once was, but you were able to see the subtle differences in darker tones and so forth a lot clearer. That said, I found that some video sources (like Xbox 360) sort of assume you’re running with the high brightness/high contrast thing going so the menus are a little dark. I also found myself in a couple of discussions with Jenn about how things didn’t “look right.” So, as it turns out, “correct” may not be “right” for you. For now I’ve gone back to the original video settings on the TV and will probably look more at this for the future, probably coming up with a happy medium that isn’t quite “perfectly calibrated” but isn’t as high contrast, either.

Pandora through your receiver is awesome. I like Pandora and I ended up subscribing to it because now I can really take advantage of that higher-quality feed and the other additional benefits - listening directly through the receiver! I’ve actually used the service more since I got the receiver just because it’s so convenient and cool. (There is a huge cool factor to getting Pandora through the receiver.)

Internet radio is awesome. Along with the Pandora support, the receiver comes with vTuner built in (and free) so I’ve been enjoying that.

The receiver runs hot… sometimes. I can’t really predict this one. I can watch a movie for two hours and it’ll be nice and cool… or I can watch a half-hour TV show and the thing will be so hot on the top you can’t hold your hand on it. I can’t figure out the pattern. I will probably look into some sort of fan setup to vent the hot air. The whole back of the entertainment center where the receiver is has a hole cut the size of the receiver (because it was too long to fit entirely) so it’s not like there’s no circulation. I’ll have to watch this.

The PS3 (older models) can’t bitstream Dolby TrueHD or DTS Master Audio. Apparently the newer PS3s have the ability to do this, but older PS3s (like the one I have with the backwards compatibility) decode Dolby TrueHD and DTS Master Audio and stream it to the receiver as 5.1 or 7.1 PCM. Old hat for some, but sort of surprising to me. This isn’t a huge problem, but it does mean I can’t take advantage of the decoder in my receiver for this and instead have to rely on the PS3. I’d honestly rather have the receiver doing that decoding… but it’s not enough for me to warrant getting a new PS3 or a different Blu-ray player. Not yet at least.

 

Anyway, I’m still learning stuff, and as I figure it out I’ll post it. This is what I’ve learned so far, and so far I like the receiver a lot. The clicking thing had me a little worried and still sometimes makes me jumpy, like I wonder if the receiver is misbehaving or if there’s something wrong every time it switches… but it’s not, it’s just the TV broadcast being flaky.

Hope this helps!