Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
5254 Discusiones

Intel Inspector: Not able to run tests run by Visual Studio's vstest.console.exe

UmeshT
Principiante
4.498 Vistas

I have test cases in my Visual Studio 2019 solution. It is run by Visual studio by calling the vstest.console.exe. Now I need to check memory leak by running these test cases. Not able to do that using Intel Inspector.

Inputs given by me in Project properties are:

Application: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\TestPlatform\vstest.console.exe

Application parameters: /testcontainer:TwoOPT_TestSuite_x64.dll

Working directory: C:\Projects\TwoOPT\Code\bin\x64\Debug (same which have TwoOPT_TestSuite_x64.dll)

 

I get error:

Error: Analysis terminated abnormally.

Application exit code: -1

 

Please let me know what mistake I am doing in providing inputs in project properties. Thanks.

 

0 kudos
9 Respuestas
yuzhang3_intel
Moderador
4.448 Vistas

Could you provide test app for local reproducing? 

Please provide Inspector version you used. Thanks.

UmeshT
Principiante
4.423 Vistas

Thank you for your response. The installer used was w_inspector_oneapi_p_2023.0.0.25545.exe

The attached images shows the error message and details.

Please provide guidance in troubleshooting the failure. Thanks.

yuzhang3_intel
Moderador
4.400 Vistas

Did you try with one simple sample, like matrix sample, you can see, the below matrix sample is run by VS in local, and the Inspector can work.

yuzhang3_intel_0-1707963703760.png

 

yuzhang3_intel_1-1707963732428.png

 

UmeshT
Principiante
4.370 Vistas

Yes, it works. I created another new console application and giving the path to this console application also works.

 

What I am struggling is to run the Intel Inspector for VSTest.Console.exe which is the command-line tool to run tests. The details on this exe is https://learn.microsoft.com/en-us/visualstudio/test/vstest-console-options?view=vs-2022 

 

I guess I am not properly giving the inputs in Application parameters in Intel Inspector project properties. Any help in this will be really helpful.

 

Application: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\TestPlatform\vstest.console.exe

Application parameters: /testcontainer:TwoOPT_TestSuite_x64.dll

Working directory: C:\Projects\TwoOPT\Code\bin\x64\Debug (same which have TwoOPT_TestSuite_x64.dll)

 

 

yuzhang3_intel
Moderador
4.368 Vistas

Just running application with parameters as below can work?

 

C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\TestPlatform\vstest.console.exe  /testcontainer:TwoOPT_TestSuite_x64.dll

 

From the guide you shared,  there is no need to add '/' , just needs file name, right?

vstest.console.exe myTestProject.dll

UmeshT
Principiante
4.354 Vistas

Tried the following but doesn't work.

1.

Application: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\TestPlatform\vstest.console.exe

Application parameters: /testcontainer:TwoOPT_TestSuite_x64.dll

Working directory: C:\Projects\TwoOPT\Code\bin\x64\Debug

2.

Application: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\TestPlatform\vstest.console.exe

Application parameters: TwoOPT_TestSuite_x64.dll

Working directory: C:\Projects\TwoOPT\Code\bin\x64\Debug

3.

Application: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\TestPlatform\vstest.console.exe /testcontainer:TwoOPT_TestSuite_x64.dll

Working directory: C:\Projects\TwoOPT\Code\bin\x64\Debug

4.

Application: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\TestPlatform\vstest.console.exe TwoOPT_TestSuite_x64.dll

Working directory: C:\Projects\TwoOPT\Code\bin\x64\Debug

yuzhang3_intel
Moderador
4.353 Vistas

So I think you need to confirm app + parameters can work first, and then using Inspector to run app + parameters.

UmeshT
Principiante
4.249 Vistas

Thanks for your reply. Sorry, didn't understand. app + parameters in the Application: field?

or something else.

 

The gist of the problem is that when I run console application and call the exe vstest.console.exe with parameters /testcontainer:TwoOPT_TestSuite_x64.dll, it works. 

 

But if I provide them as below to Intel Inspector, it doesn't work.

 

Application: C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\IDE\Extensions\TestPlatform\vstest.console.exe

Application parameters: /testcontainer:TwoOPT_TestSuite_x64.dll

Working directory: C:\Projects\TwoOPT\Code\bin\x64\Debug (same which have TwoOPT_TestSuite_x64.dll)

 

I will check some more documentation, meanwhile any more pointers from anyone will be helpful.

yuzhang3_intel
Moderador
4.212 Vistas

You can add "vstest.console.exe /testcontainer:TwoOPT_TestSuite_x64.dll" in one script and specify the script to execute in the application field.

Responder