MSTest and app.config issue

后端 未结 3 1914
粉色の甜心
粉色の甜心 2020-12-14 14:59

I am stuck trying to automate unit tests runs with MSTest and deployment of app.config. I read multiple posts and blogs, tried multiple things and yet still app.config doesn

3条回答
  •  再見小時候
    2020-12-14 15:48

    Kateroh,

    My setup looks like this (I'm using msbuild from a TFSbuild.proj):

    1. Build sln

    2. Copy all from output to %TEMP% (black magic :D) Don't know why but mstest is looking for references in %TEMP%.

    3. Run mstest with parms:

    "C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\MSTest.exe" /nologo /testcontainer:$(TestDir)\mylib.dll /resultsfile:$(TestResultFile) /runconfig:$(SlnDir)\AutomaticBuildTest.testrunconfig /searchpathroot:$(TestDir) /publish:mytfsserver /publishbuild:$(BuildDefinition) /flavor:Debug /platform:AnyCPU /teamproject:mytfsproject

    where AutomaticBuildTest.testrunconfig is bellow

    
    
    
        
        
            
        
        
        
        
            
            
            
            
                
                    
                        
                    
                
            
            
            
        
    
    
    
    

提交回复
热议问题