Day 016 - Groupware, testing, auditing, and problems

Yesterday I had problems getting my WD17 app to run with user groupware, so I thought I'd try WD16. I told WinDev to use the recommended settings, which placed the data files in c:\ProgramData (every other app I have installed that uses ProgramData creates a subdirectory for files). 

But I got an error when I ran the WD16 app:

The format of the <C:\ProgramData\GPWCONNECTIONHISTORY.fic> data file is not supported by this version of HyperFileSQL.

It was created with a more recent version.

I could have wiped the WD17 files, but instead I specified a different directory as the file location. This time after I logged in I got the option to configure the groupware:

 

From the admin window I added a new user:

I'm not sure what the difference is between Login and Name, other than the Login is forced to all caps. 

I also created a new group called TESTGROUP (because that name was forced to all caps as well. 

I don't like all caps.

Choosing Modify rights from the admin window brings up the Configuration Details window. This gives you window by window settings that let you decide how to handle individual controls. You can disable, make inactive, or hide controls. 

I was curious about the difference between inactive and disabled controls. I applied some settings and closed the security window. 

When I logged in to the app with my newly defined user id got the following user details window:

Problem number one: Inputs are forced to uppercase. Did I mention I really don't like all caps? Grrrrrrr. 

Problem number two: after completing the form it cleared and presented itself again. If I closed the form I exited the app. I couldn't find any way to access the program. 

This is the first thing I've encountered with WinDev that didn't work as advertised. Given that I'm also have problems with groupware in WD 17, I can only assume that WinDev security is completely borked on my machine. 

I also have some concerns about the ability of user groupware to manage security for a really big, complicated app. If you've successfully done security for a WinDev app please post a comment on your experiences. 

Okay, on to other matters.

The dashboard, tests, and query optimization

On page 125 the tutorial dives into the role of the dashboard in automated tests and optimizing queries. 

There's a Tests button on the dashboard that brings up a "validation rate" window:

Automated tests can be run on windows, procedures and classes( I took a look at code testing back on Day 5).

I opened one of my window, and from the main menu selected Automatic tests | Save a new test. 

I started recording and, following instructions, entered some text in the Sought person field and did the lookup, then clicked Close. WinDev recorded the following code:

EmulateMouse(WIN_PersonX.EDT_Sought_Name, dmLeftClick, 26,8)
EmulateInput(WIN_PersonX.EDT_Sought_Name, "har")
EmulateMouse(WIN_PersonX.BTN_Generic, dmLeftClick, 42,3)
EmulateMouse(WIN_PersonX.BTN_Close, dmLeftClick, 31,10)

The test was marked as In Construction:

I ended the test to make it available. And ran the test.

Oddly, it reported two errors:

I tried a couple of other windows and was able to successfully save and run tests. 

But why not this window? 

There was a GUI compile error about the window being resizable and not having any anchoring defined. I set the window to be non-resized and that error went away. But I still couldn't run any tests. 

I tried manually typing the offending function call, and code completion supplied me with exactly the same control name. 

Eventually I gave up and just read through the rest of this section of the tutorial, which showed how programmatically disabling a button could cause an existing test to fail. 

In addition to being able to write code to emulate behaviors, you can also use the WinDev test editor to define input and output parameters for tests so you can determine if the window in question is handling data correctly. 

Finally, I had a look at the Static audit via the dashboard:

There's a lot of helpful information in the audit, and I can running this check regularly would help keep out the deadwood. 

I clicked on the button for the query optimization, which told me that adding a key one field would help with data retrieval speed.

While I'm impressed with the audit capabilities, I came away disappointed today due to my inability to get groupware working on either WD 16 or 17, and with my inability to learn why my seemingly correct test code wouldn't execute successfully. If you're aware of the answer to either of these issues, please comment below.