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

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

UmeshT
Débutant
4 520 Visites

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 Compliments
9 Réponses
yuzhang3_intel
Modérateur
4 470 Visites

Could you provide test app for local reproducing? 

Please provide Inspector version you used. Thanks.

0 Compliments
UmeshT
Débutant
4 445 Visites

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.

0 Compliments
yuzhang3_intel
Modérateur
4 422 Visites

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

 

0 Compliments
UmeshT
Débutant
4 392 Visites

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)

 

 

0 Compliments
yuzhang3_intel
Modérateur
4 390 Visites

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

0 Compliments
UmeshT
Débutant
4 376 Visites

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

0 Compliments
yuzhang3_intel
Modérateur
4 375 Visites

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

0 Compliments
UmeshT
Débutant
4 271 Visites

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.

0 Compliments
yuzhang3_intel
Modérateur
4 234 Visites

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

0 Compliments
Répondre