What is the minimal source access needed to write test code for a Windows DLL file?

| | August 6, 2015

So where I work, there is this sort of division that exists between the testing team and the development team. The main issue is that the testing team is not given access to the source code of the application so all testing of components must be done through the user interface either manually or through UI Automation software, most of which I write here. The reason given for the lack of access is the Perforce license costs that would have to occur to give the testing team access as well as to enforce independent testing, and I am not here to argue the reasoning.

However, much of the functionality of the applications is separated into DLL files instead of being contained in a single executable. I also happen to know that whenever a build is made, the script that is run to do it also generates docs with Doxygen which includes detailed information on all of the class interfaces.

So I was wondering, given access to these DLL files and the Doxygen documentation, would that be enough to write unit tests against the DLL external interfaces, or would access to their header files be needed to do this, or possibly even additional resources required? And how would one go about doing the minimal approach?

One Response to “What is the minimal source access needed to write test code for a Windows DLL file?”

  1. The compiler needs to be able to bind to the external interfaces, so unless they all forefill some form of special interface that is the exact same for every DLL, you’d at minimum need the headers that define functions that will be used from each dll (any any custom classes or structs), and a lib file for the compiler to link against.

    it can be done without either (just using the docs) but the work becomes exponentially greater, as then used need to use LoadLibrary with heaps of GetProcAddress calls, and you’d need to ensure every function/class/interface that is to be tested is exported.

Leave a Reply