(copy and paste from my LiveJournal...)

My job usually involves setting up little private domains, servers, clients, routers, and access points to test a particular bugfix.

It also usually involves running lots of automated tests to exercise and stress the components involved in that bugfix.

Often, the tests must be performed simultaneously on a 32-bit computing platform and a 64-bit computing platform.

Once in a while, my job involves a large amount of hand-testing rather than automated testing. An example of a place where hand-testing comes into play is when you need to test whether a piece of software correctly handles the computer going into sleep mode or hibernate mode. No software can wake up the computer in that case, you need a human finger to push the button.

Very rarely, my job involves a large matrix of different things to test on multiple types of different wireless hardware.

Last week, I needed to start a test suite which involved all of the above. It was very large, involved multiple test machines, and resulted in a test matrix about 80 items deep. Each part of the test matrix involved a lot of swapping of wireless cards, doing various little tasks, and lots of sleeping/hibernating/waking of test computers.

In the middle of all of this last week, my building and my test lab went down due to a power outage, right in the middle of it. Due to the nature of what I was testing and the way the automated portions worked, much of it had to be started over from scratch. Then I had to start all over again the following day, when the circuit panels for my lab, damaged from the prior day's power failure, needed to be replaced.

Meanwhile, another point of confusion was locating various pieces of hardware which met the test requirements, a surprisingly tricky task. I was attempting to locate and verify the hardware right in the middle of the whole power fiasco.

In the confusion, I managed to forget one important point when creating my test matrix: I was supposed to have enabled debug tracing and kept debug logs of each item in the test matrix.

When I completed the test matrix last Friday and reported the results, my manager asked for the log files. I went white as a sheet. I felt awful, I'd let him down. Worse, I had to start the whole procedure over again from scratch. Already behind a couple of days, I was going to have to do it all over again.

So on Monday, when I started over again, I made certain I could keep careful track of the log files. I created and tested a small batch file which would back up and organize the log files, indexing them against each point in the test matrix.

For instance, the batch file contained these lines:

mkdir %1
copy *.etl %1\test%1.etl

This means: make a subfolder named "variable". In this case, "variable" is a sequential number, such as 10, so make a subfolder named 10. Then copy whatever ETL file is sitting in this folder to a file named "test10.etl" in the "10" subfolder. There is only one ETL file in the folder at this point, so saying *.ETL grabs only one file.

It's really a simple batch file. There's more to it than that, but that's the essential heart of it. Each time I would run a test item in the matrix, I would back up the log files into sequentially-numbered folders, with sequentially-numbered names for good measure. Each number corresponding to a point in the test matrix. Then I would note which file corresponded to which test, for later reporting.

I worked for two days getting all of the test items completed and all of the logs backed up. Tuesday, just before leaving for the day, I zip up the logs and send them to the dev to be analyzed.

Today, the dev tells me that the log files are not the correct size. What's up?

He looks at the machine and notices my batch file.

He says the COPY statement is the problem.

It seems that because I said "copy *.etl" instead of "copy wlan.etl", i.e., using a wildcard instead of the exact file name, the files got interpreted as ASCII (they're not) and got truncated whenever they hit an ASCII 26 byte (EOF, or Ctrl-Z).

If I'd simply spec'd the exact filename instead of using *, this wouldn't have happened. (I also could have used the /b parameter to force binary, but I shouldn't have needed that either.)

I now have to do all of that work over again, A THIRD TIME, because of a long-standing bug in the DOS COPY command.

Do they have cyanide pills in the firstaid cabinets here at Microsoft?
_________________________
Tony Fabris