Search This Blog

14 May 2010

How many time shave you mounted a network drive, supplied the "correct" identifications and then detected that you made an error and then needs to reboot the computer just to "get ride" of the connection to the network drive that isn't working?

I grew tired of this and looked for another way to handled this since it takes far to much time to reboot just because you made a slight error.

Open a command prompt and type the command NET USE you will see a list of connected network drivers. This command is quite good a adressing problems with net work drives. You can change the logged in user by typing NET USE / USER: or remove the connection by typing NET USE /delete.

Hopefully this helps some out there so you lose less time dealing with this problem.

In any larger project a complex test suite should be built, a test suite that when run through should cover most of the code that handles buisness logic, aggregations and such. Presentations aren't always that important even if it is good to include those parts in the tests too,When the tests starts to increase they will take longer and longer to complete which will impact on the performance of the developers since these have to wait for tests to complete during verficiations of changes.

There are several methods for dealing with this one is the use of a common initializations class that setup the basic structure and adds basic data needed for the tests. The problem with this approach is that if you need to add some new data or change data in the setup you will have a huge impact on the tests and maybe changing a few that should have given indications on a problem that has been introduced. Its often better to separate the tests and let each test setup the data required for just that test and clean up afterwards. If using a database the setup and teardown of the database could be a common setup that is run first in the testclass and teardown occured at the end after all tests. In such an instance you need a way to clean out the database without tearing it down compleatly.

Of course these are just my thoughts and there a several methods in dealing with this. One that we often use is the use of mocking of objects since you then don't need a real database just the apperance of one. from the systems point of view. This makes that test much much more efficient and faster but has the drawback that you aren't really testing the database which also needs to be done.

I any circumstance test ARE important and you should never feel that a test is useless and remove them if you aren't compleatly and absolutly sure since there is often a very good reason for that the test was created in the first place.