Technology Update 2021

More random acts of fixing stuff today:

  • Fixed exception when using variables in show notes
  • Fixed left/right keyboard navigation in main table view
  • Fixed popups larger than screen not shrinking and adding scrollbar
  • Fixed missing reset icon on rack slot preset selector button
  • Fixed fixed pitch text areas
  • Fixed theming of delay load and learn transpose/key range popups
  • Fixed Ctrl+Up/Down both re-ordering items and moving selection
  • Fixed saved window placements incompatible with old versions of Cantabile
  • Fixed first item in menu bar incorrectly highlighting when popup shown
  • Fixed list incorrectly stealing keys that it didn’t want.
  • Fixed text views not remeasuring when text changed
  • Fixed popup’s no placing oversized content correctly
  • Fixed some items not redrawing when theme changes
  • Fixed left/right arrow keys incorrectly wrapping at end of row
  • Fixed popups incorrectly flipping to other side of invoking button
  • Fixed menu items not drawing some short cut keys correctly

Also, first attempt at light theme… inherits everything from dark theme and basically works but just need to redefine some color constants:

And now I’m off to celebrate Mitch’s birthday! :slightly_smiling_face: :birthday: :tada:

13 Likes

Congrats to your son, have a nice party! :blush: :tropical_drink:

1 Like

Light theme finished.

Dark vs Light:

9 Likes

It’s the dark side (of the moon) for me…

1 Like

Perhaps a bit silly question: only Dark or Light?

Yep, most people prefer the Dark and that’s been the default for a long time but I still see fairly regularly screen shots from users with light mode so some people prefer it.

Cantabile will come with Dark and Light like it always has. But… you can build your own (as simple as tweaking the colors in a text file, or as complex as redesigning the whole theme with new graphics if you’re keen).

Also, you’ll be able to share your custom themes just like happens with the current Cantabile release (eg: see here).

1 Like

Today I started on something I’ve wanted for Cantabile for a long time - some automated UI testing.

As a first step I thought I just put together some test scripts to take a bunch of screenshots. This will serve two purposes:

  1. it’s something I can run before each release as a simple confidence test to make sure things are basically working.
  2. I can quickly step through all those screen shots and look for anything out of the ordinary - this will be particularly handy in the coming days as I refine and touch up the layout of all the different screens.

I would have done this a long time ago but GuiKit 2 didn’t have great support for UIAutomation. GuiKit3’s support is much better - not perfect, but definitely enough for these kinds of tests.

You can see what I’m talking about in this video where I’m using Visual Studio’s Test runner to run a test suite that:

  1. starts Cantabile
  2. takes screen shots of all the options pages
  3. takes screen shots of all the MIDI filter pages
  4. shuts down Cantabile

The output is a folder full of screenshots.

When writing these test scripts it always feels like it takes too long, but the payback comes in the weeks and months that follow. ie: I feel like I didn’t accomplish much today, but I know it’s important.

Currently I’m only taking screenshots, but as I get more used to the UIAutomation interfaces and better at writing the test scripts I hope to automate exercising as much of Cantabile as I can.

10 Likes

UI test automation is always the hardest…

2 Likes

Today:

  • More automated capturing of screen shots
  • Started adding Automation Ids to various UI elements in Cantabile to make it easier to locate in invoke different actions.
  • Lots of tweaks to the scripts and utility library I’m using to make it easier and more programmatic (ie: more “do exactly this” and less “send these keys”)
  • Now capturing nearly 60 screen shots of different UI screens.

Tedious work, but I’m going to persevere with trying getting screenshots of everything in Cantabile.

About UIAutomation

I’ve mentioned UIAutomation a few times now and thought I’d provide a little explainer for those who don’t know what this is.

In GuiKit the entire UI is manually drawn to a big bitmap (image) and then copied to the screen. This allows for nice composition of various views and elements and a very flexible UI framework.

The downside is the content of that bitmap is opaque to Windows and to other programs. Without additional support, screen readers don’t work and utilities programs like AutoHotKey, FlaUI, WinAppDriver have no visibility as to what’s inside a particular window.

That’s where UIAutomation comes in… it’s a separate interface into a window that lets other programs find out about things inside it. eg: a screen reader can ask “what’s at this point”, to which the UIAutomation interface might say “a button” to which the screen reader can ask “what’s the text on the button” to which the app might return “OK”… and the screen reader can highlight the button and speak the word “OK” so a vision impaired user can hear what’s on the screen.

That’s the basic idea, but the UIAutomation interfaces also provide the ability to programatically control a program. eg: instead of a screen reader interacting with the app, perhaps a script program might run a set of actions like… find the File menu, click it, find the Open command, click it, type “MySong”, find the OK button, click it.

So that’s what I’m doing with this automated UI testing - writing script programs that run externally to Cantabile, but drive it to do various actions and then take screenshots of the relevant parts of the screen.

As an example, here’s a script which captures the audio port dialog boxes:

// Use the Edit Find command to find the mda plugin 
_fixture.InvokeCommand("edit.globalFind");
var w = _fixture.Session.FindWindow(x => x.Name == "Find");
w.FindById("textSearch").Value = "mda";
w.FindById("buttonOK").Click();

// Open audio ports window
_fixture.InvokeCommand("edit.audioPorts");
var window = _fixture.Session.FindWindow(x => x.Name.StartsWith("Edit Ports - "));
window.CaptureScreenshot("AudioPorts");

// Get all the list items
var list = window.FindById("listPortsAndChannels");
var items = list.FindAll(x => x.ControlType == ControlType.ListItem);

// Select the port, edit and capture
items[0].Select();
window.FindById("buttonEdit").Invoke();
var wPortName = _fixture.Session.FindWindow(x => x.Name.StartsWith("Audio ") && x.Name.EndsWith(" Port"));
wPortName.CaptureScreenshot("AudioPortName");
wPortName.Close();

// Select channel, edit and capture
items[1].Select();
window.FindById("buttonEdit").Invoke();
var wPort = _fixture.Session.FindWindow(x => x.Name.StartsWith("Edit ") && x.Name.EndsWith(" Channel"));
wPort.CaptureScreenshot("AudioPort");
wPort.Close();

// Close audio ports dialog
window.Close();

And here’s what it captured:

AudioPortName

Brad

10 Likes

After several days of work I’ve not got pretty much every screen in Cantabile captured by my UI test scripts. In total Cantabile has about 125 dialog boxes.

As mentioned this felt like a waste of time but it turned up half dozen or so bugs and I’ve now got a good platform to exercise large chunks of Cantabile UI before every release. All up I think this will be a positive, but I’m exhausted because this kind of work is sooo tedious.

Time to get on with getting this project finished.

11 Likes

Testing can seem like not being productive, but once you have them, they are good. For my Java Synth Librarians I have test scripts for doing file read/writes to ensure I do not screw up any data, and very occasionally you do a change that does break things, and the tests have always saved me.

My background is in high integrity software you have to achieve full code coverage in testing or justify the exceptions. Now that is a real ball ache, but you do see the difference between the software tested to this level and software that isn’t.

2 Likes

Good progress today, crossing off every currently known issue:

  • Went through all 125 screenshots tweaking and adjusting the layout of anything that wasn’t quite right
  • Wired up the UI scaling setting again (for now there’s only going to be one scale setting that controls everything - instead of the Main Window and Other Window setting in the current builds)
  • Fixed a display issue with route settings in the wiring diagram view
  • Fixed issues with tab key handling in some main window panels
  • Fixed the “control” column in the main routing table - wasn’t clipping and wrong default width.
  • Fixed text in the side panel tabs not getting ellipsis when too small
  • Fixed a hang after scanning plugins
  • Fixed an “accidental” split screen mode. (yes, it really was accidental but gave me some ideas)
  • Tested in OpenGL rendering mode - seems to work fine.

And with that, I’m calling this Trello item done:

But, I’m still testing…

11 Likes

Interesting!!

1 Like

Today was focused on reworking Cantabile’s startup code trying to integrate a new GuiKit based crash reporter. Unfortunately it’s not working great for audio engine crashes so I might have to rethink some things. Will sleep on it.

7 Likes

Me too … I’ve always wanted split screen for bindings and routing for programming purposes so I can see if the invoked bindings are doing the job on the routing tab. Same for rack programming, I have to jump between the 2 tabs while testing out things. Anyway that’s my thought on it. Great work on the new version you’re making!

Dave

2 Likes

Two more tasks checked off:

image

The first one I’ve been working on bit by bit for the last few days and involved about 400 XML documentation comments.

The second one I mentioned yesterday that I was having some technical difficulties but got it sorted today. The crash reporter is working, but is sad it needs to:

(and it’s bugging me that the sad face doesn’t align with the text and that the text has a typo - job 1 for Monday).

Have a good weekend everyone.

Brad

7 Likes

Took me a while to figure out the typo! Uh oh! :grin:

1 Like

Yeah, dramatic typo…

1 Like

Sounds like a hippy comment to me “uh OK” :wink:

Typos and alignment:

image

And check, check…

6 Likes