Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 VA blocks Unit Testing
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Ryder96
New Member

Italy
3 Posts

Posted - Oct 16 2023 :  11:48:52 AM  Show Profile  Reply with Quote
Hi, while i'm running/debuggin tests the first time they run smoothly but after that the tests stop working until i disable VA from the the options and the tests resume.

Visual Studio is responsive but the Test Explorer is stuck.

Test are in C#.

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Oct 17 2023 :  06:44:33 AM  Show Profile  Reply with Quote
Which IDE and version of VA are you using?

Since I don't really know anything about C# unit tests, I found and followed this page:

https://learn.microsoft.com/en-us/visualstudio/test/walkthrough-creating-and-running-unit-tests-for-managed-code?view=vs-2022

using VS2022 version 17.7.5 and VA 2502.0

I have 2 tests in the test explorer, both are passing, and I can run them as many times as I want without any problems.

zen is the art of being at one with the two'ness
Go to Top of Page

Ryder96
New Member

Italy
3 Posts

Posted - Oct 18 2023 :  08:43:06 AM  Show Profile  Reply with Quote
I'm using VS2022 version 17.7.5 and VA 2502.0.

I tried to reproduce the problem and it appears when i'm debugging the tests and i change a file while it starts the debugging process.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Oct 18 2023 :  09:43:53 AM  Show Profile  Reply with Quote
Are you placing a break point into your code files? If so which ones, the unit test files or the code under test?

I have tried placing a break point into both the unit test code, and the code being tested, and neither break point triggers when I run the tests from the Test Explorer window. So I assume you are doing something else, but what?

I don't know anything about unit tests, so you may be doing something very simple I just don't know about

zen is the art of being at one with the two'ness
Go to Top of Page

Ryder96
New Member

Italy
3 Posts

Posted - Oct 31 2023 :  06:53:07 AM  Show Profile  Reply with Quote
Sorry for late reply.
I encouter the delay when i debug the test after i made some changes on some file.
Is like VA is parsing or indexing the files and blocks the execution of the tests.

When i run the debugger on the tests it takes a lot of time and I don't know how to log what VA is doing, if a disable VA the execution runs almost instantly.


Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19014 Posts

Posted - Oct 31 2023 :  11:20:50 AM  Show Profile  Reply with Quote
That is strange, VA should not care about this, and should not be having an effect like this.

OK, lets try making a test profile, in case there is something else going on in your profile that is a factor. A strange setting, another extension, or just something getting messed up. It can happen, and the test is relatively simple, once you have it set up.

Can you first download the VS2022 specific installer for Visual Assist from:

https://downloadfiles.idera.com/WholeTomato/VA_X_Setup2502_0_x64.vsix

Next you will need extra details about the IDE install to create a test profile. To get these details, please open a Windows command prompt window, and inside the window run the command:

"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"

There will be a set of lines for each different version of Visual Studio that you have installed. For the version you want to install into, you want the "productPath", "dispalyName" and "installationVersion" lines, e.g.

productPath: C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.exe
displayName: Visual Studio Professional 2022
installationVersion: 17.4.33213.308

You can then use the information from these three lines to make sure that the following command has the correct command line parameters. The values are:

/appidname: = displayName:
/appidinstallpath: = productPath:
/skuVersion: = installationVersion:

The "/skuName:" value is one of "Community / Pro / Enterprise", note for the Professional version it is "Pro", not the expected "Professional".

The working command, for VS2022, using the values above, is - split into lines to make it easier to read and edit:


"C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\VSIXInstaller.exe"
/appidinstallpath:"C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.exe"
/skuName:Pro
/appidname:"Visual Studio Professional 2022"
/skuVersion:17.4.33213.308
/rootSuffix:"VATest" "C:\Users\%USERNAME%\Downloads\VA_X_Setup2502_0_x64.vsix"


The "rootSuffix" is the name of the test profile you want to install to, and this will be created if it does not already exist. The final parameter is the path of the VSIX installer for Visual Assist that you want to install. Once you have the command set up, the only parts you should need to edit are the skuVersion and the path to the VSIX file, can you please close all instances of Visual Studio and run this command.

Running this command installs VA into the test profile, but it does not load the test profile. If you created the test profile by installing VA, when you run the test profile it will be using the default IDE settings, without asking you which settings you want to use.

To now load the test profile you use the command:

"C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.exe" /RootSuffix VATest

To load your normal, default profile just load the IDE normally. To return to this test profile again, pass the /RootSuffix command line switch when loading the IDE. You can run both profiles at the same time, next to each other. In VS2019 and VS2022 the profile name will be shown just under the close button, in the top right hand corner of the main IDE window. If you export your IDE settings from your main profile you can them import them into the test profile.

Do you see this problem when loading and working in the test profile?

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000