While we hope Visual Assist is your favorite dev tool, we know we can’t (and won’t) do everything for you. As we continue developing solutions, we’ll also showcase tools or tips for other problems you may face in other parts of development. This week, you’ll hear from our friends at Ranorex:
How to continue to test in Visual Studio in a post Coded UI world.
Producing powerful on-time releases demands high-quality code and thorough testing. This is why developers have been encouraged to continuously inspect their code for errors and to shift their testing left. Visual studio is far and away the most popular IDE on the planet with an estimated market share of 39%, and there are some great code inspection tools that extend Visual Studio functionality out there, but what about left-shifted test automation?
For users of Visual Studio, Coded UI facilitated a shift-left approach to development by enabling automated UI-driven functional testing from within the IDE. However, earlier this year Microsoft announced that Coded UI was deprecated. Visual Studio 2019 would be the last version to support Coded UI.
Does this mean that left-shifted developers and technical testers are bereft of a testing framework that operates from within Visual Studio? The answer my friends is “not on your nelly”. The Ranorex testing framework provides an API for C# and VB.Net that completely replaces Coded UI.
Migration from Coded UI to the Ranorex testing framework is as easy as one, two, three. Once you have downloaded and installed Ranorex Studio simply follow the instructions below:
1. Create a new Visual Studio project
Open Visual Studio, go to File > New Project. Next, you will need to select .Net Framework 4.5.2 or higher, you will be prompted to choose your programing language, you can select either C# or VB.Net. All that is now left to do in this first step is to select Console Application and hit OK.
2. Add Ranorex core assemblies as references
To ensure a seamless migration away from Coded UI you will next need to add the Ranorex core assemblies. To do so navigate to the project’s Solution Explorer, right mouse click on the References Folder and select Add Reference…
Click browse and then navigate to the Bin folder of your Ranorex installation, (the default location is C:\Program Files (x86)Ranorex Bin).
Add the following:
All Ranorex.Plugin assemblies
Set the Copy Local option to False for all Ranorex assemblies except for Ranorex.Core.Resolver
3. Over to you
Start writing code and continue with left-shifted testing in Visual Studio.
Before you go
Not only are you able to continue to test in your preferred IDE you can also benefit from the best object recognition on the market. Ranorex Spy is the tool developers and technical testers love. Use it to analyze your AUT, its element structure, available object properties and attributes, and build the most robust and reliable XPaths for use in Visual Studio.
Be in full control of your XPaths. Increase or decrease dynamism in line with the complexity your tests require. Add variables to your XPaths and customize how you uniquely identify UI elements even when testing mixed technology applications.
You can also benefit from all the functionality associated with Ranorex. Have a better understanding of failed tests with fully customizable reports. Get built-in object repository access and organize your tests in logical hierarchical structures.
Left-shifted developers and technical testers who have used Coded UI need not mourn its passing, rather they should see the deprecation as an opportunity to increase the speed and quality of their releases. The Ranorex testing framework offers an API that completely replaces Coded UI, has far superior object recognition, and increased functionality. But don’t take my word for it download you full featured 30-day free trial and find out for yourself.
New Year, New Build! Welcome to 2020 and 2358. This release was driven largely to fix an issue with our licensing server and some corruption that may have been experienced by Unity users, but why stop there?
NEW Added C++ modernization refactoring: Convert Unscoped Enum to Scoped Enum (execute on the enum definition). See the documentation.
NEW Goto Related now allows hopping between *_Implementation and *_Validate implementations in UE4.
FIX Goto from a method declaration will now list *_Validate as a target in UE4.
NEW Added option (on the Goto page of Visual Assist Options dialog) to prefer implementations when executing Goto (Alt+G) (execution on the implementation will continue to go to the declaration as before).
Take a look at the full list of features and bug fixes here. And of course be sure to update!
Whether you’re new to Visual Assist and UE4 or a seasoned vet, we thought you might appreciate a little more insight into what you can expect and how to get started. Thanks to our resident UE4 wizards for putting this together.
Visual Assist will come alive after it finishes parsing.
3. Look around
Open the Extensions > VAssistX menu. You will use the menu primarily to open tool windows, review keyboard shortcuts, and access the options dialog.
Appreciate the understated UI to Visual Assist. There are just a few visible changes.
4. Change a few settings
If you like meaningful syntax coloring, open the options dialog for Visual Assist and apply coloring to more of the UI.
If you highlight the current line, choose a thin frame that doesn’t obscure your code.
Visual Assist can add important information to tooltips when hovering over a symbol, such as comments from base classes. This is very helpful in UE4, as base class comments are the documentation.
Visual Assist can analyze your code and suggest improvements. Enable Code Inspections to see blue underlines where code might be improved. Visual Assist can even modernize your code for you! We will show how later.
Then, open the options dialog to Visual Studio and eliminate the redundant navigation bar. The version in Visual Assist includes the functionality of the built-in one.
After making the changes, Visual Studio is ready to use.
5. Navigation in UE4
Search for and open files using Alt + Shift + O. Precede a search filter with a hyphen to exclude symbols (negative filtering).
Understand and navigate the inheritance hierarchies of UE4 by using Alt + Shift + G on a class name. The Alt + Shift + G shortcut works on many types of symbols, try using it on a virtual method.
Source files in UE4 can be thousands of lines long. Use Alt + M to search for and navigate to methods inside the current file.
Find references to a symbol using Alt + Shift + F. Visual Assist’s find references is fast and accurate inside huge solutions like UE4. Try cloning your results to save them by clicking the Clone Results button or using the right-click menu.
Hover over a virtual method to see comments from base classes. Base class comments often contain useful documentation.
6. Refactoring in UE4
Access refactoring tools using the keyboard shortcut Alt + Shift + Q, or by hovering over a symbol and clicking the tomato icon that appears. The contents of the Alt + Shift + Q menu depend on the symbol.
It is common in UE4 to override virtual methods, such as Tick or SetupPlayerInputComponent. Visual Assist can implement these methods for you. Click on your class name and then use Alt + Shift + Q.
The Implement Methods dialog is searchable, and you can implement more than one method at once.
Visual Assist will intelligently add a call to the Super class version of the method for you when appropriate.
You will see blue underlines below code which could be modernized. This is Code Inspection.
Visual Assist can refactor the code for you! Use Alt + Shift + Q on the underlined symbol.
If you need to change the return type, parameters, or the name of a method you can use Change Signature. Edit the method definition in the window. References and call-sites to the method will be updated, so you won’t miss anything.
There is a lot of special functionality built into Visual Assist for UE4, such as suggestions for U* macros. The more you can use Visual Assist, the more opportunities to make your life a little easier in UE4.
You may find the built in IntelliSense to be unusably slow, or that it often adds red underlines to correct code in UE4. IntelliSense can be disabled. Visual Assist provides all the intelligent tooling expected in a modern C++ development environment.
You can throttle the initial parse in the Performance tab of the Visual Assist options dialog. By default, the one-time parse uses all available resources to finish as fast as possible.
If you follow our blog, you’ve seen the features that our team is putting in place and likely felt their impact in your development. Instead of hearing more of the same, we thought we would share thoughts from one of our users. Meet Distalsoft, two brothers, one who can’t stop gaming and one with ideas. We’re not sure which one wrote this post, but either way check them out when you want to hunt for treasure or lose it all attempting Brexit.
C++ with Visual Assist, Visual Studio and Unreal Engine
It’s inspiring that software like Microsoft’s Visual Studio IDE and Epic’s Unreal Engine have been “free” for so long now. It pains me to think about where indie developers would be without the forward thinking force of these larger companies and their seemingly never-ending generosity. Helping start-ups and the like to get their feet on the ground is something I will forever be grateful for.
Although the tools come close to it, it would be naive to think that they can fulfil the job of every requirement. I want to point out a few problems we were facing at Distalsoft when it came to developing in Visual Studio using Unreal Engine and the solution we ended up going with.
Unreal Engine at its core uses the C++ language. Visual Studio – being a Microsoft product – makes development in C# very enjoyable. On the other hand, development in C++ has been a point of frustration for many years. From VS 2010 to VS 2017, improvements have been made to the overall speed of compilation, Intellisense, file searching and the like, but it has taken until 2019 for them to really make a dent in the problem. I must say that VS 2019 has done an excellent job of addressing the aforementioned issues but the question still stands – could it be better?.
A few years ago when I was using VS 2015, I’d had enough. I’d sometimes be waiting several minutes for Intellisense to bring back a list of methods or properties that belonged to an object. I’m pretty sure we’ve all done it – smashing the heck out of the ctrl+shift+space keys and cursing at the screen while waiting for the Intellisense to pop up. Or simple searches in the solution explorer that end up taking longer to resolve than simply finding the file yourself. Perhaps even trying to navigate to the definition of a method only to be waiting minutes for the document to load up. Something had to change. I went searching on the internet for a solution. It didn’t take long to stumble across a piece of software called Visual Assist by Whole Tomato. It had been recommended many times on various parts of the AnswerHub forum for Unreal Engine and StackOverflow. Due to it having a trial version, I downloaded a copy to give it a try.
The expression “night and day”, really doesn’t do the software justice but it’ll have to do for now. I was extremely relieved. Searching for files, definitions, even just including header files were now as you would expect from an IDE. The additional dialog menu that is available when right clicking on bits of code you want to perform actions against, has a variety of options that make you realise what was/is missing from the ootb VS. To be honest, I don’t use half of them, but it’s the baseline mechanics that just work so much better. And, to address my biggest issue – the speed of Intellisense – type-ahead now loaded within seconds and sometimes even instantly. What a relief!
Unreal Engine have improved their documentation, but unfortunately it’s still not quite there. I would always see people answer questions in AnswerHub with “Look through the Unreal Engine code, it’s open source”. I always assumed they were joking. Pressing F12 to go to method definitions without Visual Assist would take forever. Thanks to my new found friend Visual Assist, I finally had the ability to go find the answers to some of the most annoying questions. It’s hard to really communicate just how irritating it used to be. Seriously, Visual Assist has made me a happy C++ coder again.
I suppose the last thing to make note of is that Visual Assist is not currently free, but the trial is sufficient to make you realise just how much happier you can be when using it. I would be interested to see Visual Assist introduce a subscription based payment plan, but you can’t complain. They have done a stellar job at creating a brilliant tool.
This release represents a turning point for our development team. We’ve made great strides in fixing bugs associated with Visual Studio 2019 and have focused our attention on the future. A major lift in this release was our move to Clang 9. Future releases will leverage Clang in new ways so stay tuned! But Build 2353 wasn’t all about groundwork, Code Inspection has some nifty new features:
+ Code Inspection checkers are now more configurable. Further customize when Visual Assist alerts you of potential improvements.
+ Code Inspection UI is now searchable, and exposes more advanced information.
+ Code Inspections can now be selectively disabled in sections of your code using comments. If you don’t want to change a section of code, you can choose to not be alerted of potential improvements without disabling checkers globally.
+ New UI allows fine grained control of the resources Visual Assist will use when parsing. Reduce the impact of the initial parse of a new solution, especially in extremely large solutions where parsing may take several minutes. (Unreal Engine developers take note.)
The last build of Visual Assist, i.e. build 2341, introduced a bug for users of Microsoft Visual Studio 2019. If you use Microsoft’s newest IDE and installed build 2341, download and install build 2341.2.
Build 2341.2 requires software maintenance through 2019.08.05.
The steady stream of functional and quality improvements to Visual Assist continues despite the recent hiccups with new purchasing and licensing systems. (Those systems are being ironed out.)
Visual Assist build 2341 improves one of its earliest features—enhanced syntax coloring—with the ability to set separate coloring for namespace identifiers and qualifiers, and enum members. Separate coloring of namespace identifiers and qualifiers was implemented primarily so the qualifiers can be dimmed, making it easier to read “remaining” code.
Another early feature of Visual Assist, Quick Info, became an enhancement to Visual Studio when Microsoft introduced its equivalent eons ago. Visual Assist build 2341 enhances the feature yet again by including in tooltips comments from parent classes. The additional comments are especialy valuable when referencing methods that override well-documented ones. Comments for the current symbol now include those from the immediate parent class, and the root parent.
Finally, build 2341 improves Encapsulate Field, a refactoring that lets you restrict or filter access to a member field. Encapsulate Field now allows an accessor to be omitted.
Build 2341 requires software maintenance through 2019.07.11.
You’ve spoken, and we’ve listened! Our recent website and license migration failed to deliver the high quality experience you deserve.
Recently, Whole Tomato migrated our website to a new backend technology and a much needed new license technology for Visual Assist. There have been some hiccups, and some of the changes to licensing resulted in delays sending licenses to customers, and concerns expressed to us. We’ve heard you. In this post we’d like to cover what changed and why for both the website and licenses, as well as what steps we are taking to address concerns.
Whole Tomato Website
We migrated the main Whole Tomato website, wholetomato.com, to the same backend used by other Idera websites. This retained all existing content and ensured our web team only needs to maintain one server stack.
However, there is no reason to ask for licensed customers’ information again when downloading a new build of Visual Assist for which you are already validly licensed. This has been pointed out to us, sometimes quite vocally, both through support and online. We hear you. The website no longer requires customers to enter personal information to download new builds.
The new website should also be more stable and faster.
At the same time, we also changed the technology used to generate and validate license serial numbers for Visual Assist. Once again, this is to ensure a single technology is used across multiple products. It’s also a benefit for you because this licensing technology reduces uncertainty about licensed usage and decreases over deployment compliance issues, which is something that many large customers request. No one wants to be in a situation where audits are necessary – you don’t, and we don’t.
It’s a great goal, but customers have reported two issues: delays in generating new serial numbers after purchase and concerns about individual registration data, even for large volume serial numbers.
Let’s look at the current license options available, and changes we plan to introduce in the future.
Current License Options
When you purchase a Visual Assist license, you have the following options:
As an individual:
You purchase and get a serial number. You need a user account (see below) on our website, and your serial number is registered against that account. You can use this serial number on multiple VMs, so long as the serial number is used only by the same person.
As a company:
You purchase and get a serial number, one per developer. Just as for individuals above, each serial number must be registered against a developer’s EDN account. Each developer can use it on multiple VMs.
You purchase a multi-user serial number. This is a single number that is valid for multiple people. Just as for normal serials, when any individual developer installs and registers Visual Assist, they will need their own user account. Each developer can use it on multiple VMs.
There are also some temporary options that you may have seen if you encountered issues: a manually generated legacy serial number using the old license system, and an eSlip file, which is a single license file shared for a team but requiring an internet connection. We’ve used these for limited cases when none of the above licenses work for a team due to technical reasons.
The licensing changes are new to us too, and we may not have clearly explained them when you purchased or contacted Support.
What is a user account? User accounts provide a single licensing account across all Idera-owned products. Create yours here, and then use those login credentials when registering your license.
Right now, the webpage is not ideal, and we’ve had some feedback about that too. More on what will change there below.
Licenses In The Future
The majority of issues we’ve seen have been to do with a missing use case: a team with multiple developers who either wish to not register individually or need to use the license in a disconnected environment. We believe it’s reasonable for personal or individual users to register via an account, but we understand it’s a barrier for some larger teams.
Within the next week, we are adding a new license option to address this scenario. If you are a large company with many developers, or you operate disconnected from the net, you will be able to purchase a network named user license. This is a single license shared by the whole team. Individuals can use it on multiple VMs. No internet connection is required: instead, you run a license server on your internal network, which manages all verification without contacting us.
You’ll be given this license option if you purchase Visual Assist for a team of five or more, or by request to our sales / licensing team.
Running a license server may not be ideal for some teams with strict IT requirements. If your team is unable to use this option, you can always contact our sales or license teams to discuss some other options we can make available.
This retires eSlip licenses (except through licensing support requests) and legacy serial numbers, leaving three license options:
Personal use, or multiple individual developers: individual serial numbers, registered for each developer through your user account.
Multiple individual developers in a small team: a multi-user serial number, registered for each developer through your user account.
Multiple individual developers in a large team, or by request for small teams: a network named user license, with no registration or internet access required.
We also expect the speed of license generation to be faster at the same time we introduce this new option. Note our staff don’t work weekends, so if you order on a Friday, you may not get your serial number until Monday. Orders during the week should be next-day or sooner, and we aim to process each one within a few hours.
License support requests are also now handled by a dedicated team with experience with this license technology. That means they are familiar with the issues you may encounter and should be able to speedily resolve them. They have a dedicated email address: email@example.com. (You can email this directly. If you contact normal support, your email will also be forwarded to and handled by the dedicated license team.)
In addition, we are replacing the user account website, with a planned launch date in early July. This is a brand new version of the user account website, built in Ext JS, where you will be able to create an account and view all your registered products and serial numbers. It will be quite minimal, clean, fast, and should be a lot clearer to use than the current website.
We rolled out a new website and new license system, and neither was quite perfect
You will not need to enter personal information to download your licensed software
The license system and where and how to use your account may not have been well explained, and we hope the above makes it clearer
We’re introducing a new license option, Network Named User License, that works better for large teams and teams who work offline
In prior versions of Visual Studio, the VAssistX menu is opened via a single Alt+X. That shortcut, fortuitously, now opens the Extensions menu. In Visual Studio 2019, a subsequent X opens the VAssistX menu within the Extensions menu.
If you are a keyboard user of Visual Studio 2019, use Alt+X, X to reach any VAssistX command previously reached with Alt+X. And when you in the documentation for Visual Assist, know that you must use Alt+X, X every time you read Alt+X.
Those looking to restore old behavior in Visual Studio 2019 might find Extensions in Main menu useful. If you try the extension and want a single Alt+X to open VAssistX, use ‘Tools | Customize |Commands’ to change the accelerator key for Extensions, e.g. from &x to &i.
Extensibility has long been a strength of Microsoft Visual Studio, but extending the IDE too greatly can impede its startup. Thus, many developers are familiar with Visual Studio’s yellow status message that suggests an extension is likely causing slow startup. To alleviate slow startups, Microsoft has encouraged partners to load their extensions asynchronously. That encouragement is now a requirement in Microsoft’s latest IDE. In Visual Studio 16.1 Preview 1, extensions must load asynchronously.
Visual Assist build 2331 supports Visual Studio 16.1 Preview 1, and therefore loads asynchronously. In the new IDE, Visual Assist loads as soon as possible, often without noticeable delay. But, there are a few startup scenarios, e.g. when starting Visual Studio without a solution, that do expose subtle changes in loading.
You will know that Visual Assist is completely loaded in Visual Studio 2019 if the extension responds as you expect, or when notice appears in the status bar.
Visual Assist is not completely loaded if it looks or feels broken in the moments after startup, before a solution is loaded, or within seconds of loading a solution. Signs of incomplete loading include a toolbar that begins with disabled icons,
empty tool windows,
and failure to respond to commands in an editor window.
If Visual Assist is not completely loaded, coax it along by opening a solution, then wait a few seconds. If you try a command in an editor window and the command doesn’t work, simply retry it. Loading should have completed in the interim.
Build 2231 also adds a new command to insert a file path into the active document. The command is useful when working in strings and comments. Access Insert-Path via the VAssistX menu (Alt+X, T, P).
Build 2331 requires software maintenance through 2019.04.19