views:

200

answers:

2

I want to examine exactly how my code operates when using other libraries to which I do not have the code for. Whilst I can do this online (i.e. with FileMon, RegMon and TCPView from SysInternals), I was wondering if there was a good offline method that would allow me to run up my code in a virtual machine, shutdown the virtual machine and diff the entire VM image?

+3  A: 

All integration testing surely will use code for which you don't have the source, your framework libraries, database drivers, databases, comms libraries. Some of which may not even be on the same machine your code is. I'm not clear exactly what you would hope to achieve. You make some calls to a queueing system, it does all manner of secret squirrel stuff. You diff before and after, now what can you say? Do you know what data formats there ought to be represent your request?

I see tests as being defined in terms of the published behaviours of the libraries and systems I'm working with. Example for a database: I execute some business actions which are supposed to create Orders. I know the orders I defined, do they appear in the database? In defining my tests I can specify explict expected outcomes in terms of records in a database. I can then even automate the tests - compare an extract from the database with expected results.

djna
+3  A: 

Since persistent modifications to the system is either in the filesystem on in the registry, you could have a little program that list all the files on the hard drive and also dump the registry.
Then you can also do it after program operation and do a simple file diff. If you are using virtualbox, I think that you can do the mounting of the disk image offline (i.e. virtual machine not running). However dumping the registry from offline files may be harder. See "Mount vdi" on google.

slurdge
I don't understand how you can make sense of what you find. For example, a database takes your data, splits it across pages, updates indices, updates internal statistics. You diff the disk contents ... it's different ... is that difference good? You are not even guaranteed that two runs would produce the same results.
djna
This is very true. But this is as far as you can go with no inside knowledge of the programs installed.Of course, if a third party use a encrypted datastore for example, you're out of luck. I'm not sure what the OP wanted to achieve.
slurdge