我有DLL插件,我想在TeamCity上测试和启动它:它包含.h和.cpp文件 测试这个dll的正确策略是什么:
1. Create a new Test Project in the same solution, configure 'include directory' to see sources and copy DLL project files to Test console project. In this case i have the same solution but in console mode, which i can test in normal way. But if my DLL project will change i need to synchronize source files.
2. Create export function in my DLL, like 'runTests()' which will produce XML file with results. TeamCity will process this? And how should it run this? And some stuff function appears in release DLL...
答案 0 :(得分:1)
为了对我们的库进行单元测试,我们创建了独立的单元测试控制台可执行文件。这样: