From:
To: Users of Robelle Software
Re: News of the HP 3000 and of HP-UX, 1998 #1
What about our newest product, Qedit for Windows? Do we have a regression test suite? The answer to this question is that we do not, but not because we haven't tried to develop one. This story is about our attempts to automate Qedit for Windows testing.
First Approach: Visual Test
Griffin Webster investigated automated testing tools for Windows products. After much research (see the September 1997 issue of What's Up, DOCumentation? for details), he determined that Visual Test was the best available product for automated Windows testing.
After Griffin wrote a number of tests for Qedit for Windows, they were moved to another machine to make sure they still worked. When we ran the test suite on Windows NT 4.0, however, we found that the automatically generated scripts would not work on the NT operating system.
At that point Griffin moved on to work on other things. None of his tests did actual file comparisons or included host file operations. As a result, we decided that, for the time being, Visual Test was not the right tool for our automated testing needs.
Second Approach: WinBatch
WinBatch is a tool that lets you run scripts on Windows programs. At Robelle, we have been using WinBatch to automate some operational procedures for our Windows machines.
In our second approach, we used WinBatch to create scripts for testing Qedit for Windows. It worked, but the process was tedious because testsoften needed multiple files, which we had to keep track of by hand. Unlike Visual Test, WinBatch has no project environment.
We were making reasonable progress with the WinBatch testing when we released a new version of Qedit for Windows with completely rewritten child window support. At that point, our WinBatch tests started failing on Windows 95 (even though most of the time they worked on Windows NT 4.0). Twice we ran into problems with tests for multiple machines and multiple versions of Windows.
Third Approach: Scripting
Qedit for Windows is an object-oriented product. The architecture splits the user interface (UI) elements from the objects that perform the actions. When you open a host file for example, an open host command object is created. This in turn works with the host document object to issue a transaction that opens the host file, processes the response, retrieves lines and so on.
A scripting language cannot test the UI, but it can test the actual objects that do most of the work. We intend to use this scripting language to build automated tests to ensure that the fundamental objects within Qedit for Windows work correctly. For example, the paste manager has approximately five hundred code paths. We expect to use scripting to develop tests that invoke the majority of these code paths.
Scripting development is still in progress. In the next issue of What's Up, DOCumentation?, we might have to tell you about our fourth approach. But we hope not because a lot of design and careful development has gone into scripting. We hope to finally create an automated test suite for Qedit for Windows with scripting.
[David Greer]
"Excellent instructor. Very knowledgeable."
"I finally know how to use this program!"
"A great pace, learned a lot. But no treats."
Next Class
Our next two-day class at Robelle will be held on May 28 - 29, or earlier if demand dictates. We can also do on-site training if required. For more information, call 1-888-ROBELLE, or e-mail support@robelle.com.
We received an enhancement request to let users specify a different directory than their UNIX home directory as part of a UNIX connection. I started to investigate this request by opening the diary file for the Qedit server. At Robelle we keep diaries for each of our products on our MPE development machine. Every time we make a change to a product or investigate it, we update the associated diary. In this case, I entered the internal tracking number for the enhancement and some notes on what problems I was anticipating.
To support this enhancement, the UNIX login transaction would need another field. This would require a new tag, which meant that I had to open and change the master tag file on our MPE development machine. I also changed the tag file in the client source code on my local PC because this was easier than copying the whole master tag file to my PC. I then used MS Dev Studio to recompile the client and a Reflection session with Qedit on the MPE development machine to recompile the appropriate module for the server.
The documentation for all Qedit for Windows transactions is maintained on a Web page. To update this documentation, I opened the Web page on our UNIX Web server, updated it, saved the changes, then checked whether they were correct by viewing the transaction Web page with Internet Explorer on my local PC.
To edit the server source code so that it extracts the new tag, I returned to our MPE development machine. The generic server source code needed to call a UNIX-specific support routine with the name of the new directory. No problem, I just opened the appropriate file on our HP-UX development machine, recompiled all affected modules and relinked the Qedit server in various Reflection sessions (the process is quite complicated and involves multiple machines and more than just recompiling).
My source code changes included some test cases. As I tested each case, I continued changing both the server source on the MPE development machine and the support routine source on the HP-UX development machine. All of this was a breeze with the help of the CTRL-TAB keystroke in Qedit for Windows. And at the same time, the diary file, which I opened earlier in this development session, was kept up-to-date.
After I finished my hand-tested cases I wanted to test one more case in which the client source code had to be hardcoded. I did this with Qedit for Windows, switched to MS Dev Studio for compiling and debugging, then returned to Qedit for Windows to examine the HP-UX log file. Although I ran out of time to make the necessary user interface changes in the client, I was confident that the Qedit/UX server could support the new field in the login transaction.
In total I edited at least seven different files on four different machines (MPE development, HP-UX development, UNIX Web server, and my local PC) in six different languages (English documentation, SPL, HTML, C, C++, and Qedit log format). I was able to do all of this with ease by exploiting the features of Qedit for Windows.
[David Greer]
ST.USERCMD: anyparm moreinfo=" " run suprtool.pub.robelle; & parm=8; info= "base mydb.db.acct,1,PASSWD;!moreinfo"Users should now have execute access to this file, but not read access. They can invoke the file by including a parameter in the Info string:
st.usercmd use myfile
The last issue of What's Up, DOCumentation? reported our first release, version 4.6.02. Qedit for Windows is now up to version 4.6.07.
As the most prolific source of Qedit for Windows enhancement requests at Robelle, I get to tell you what fun things have been added.
COBOL Tags--You're It!
Qedit for Windows now has built-in support for the tag area in COBOL source files.
Qedit for Windows can automatically tag your changes with whatever text you have defined in your Qeditmgr file. This can be the current date, your name or initials, the date and name, and so on. If you have the Set X List On option enabled, Qedit for Windows does not allow you to type directly into the tag area.
Right Mouse Button Support
The screen shot below shows an example of using the right mouse button to perform an action that is context specific. You can find, cut, paste, and so on by right-clicking the mouse when the cursor is in a document window and selecting an appropriate action.
Your Preferences
Directory Navigation
The navigation of directories in multiplatform environments is tricky. For UNIX connections, you can now specify any accessible directory as your default login directory.
Instead of downloading an entire directory, you can navigate directly to MPE directories by specifying a group or directory in the File Open dialog box.
For both UNIX and MPE, you can now use wildcards to display a subset of files in the directory listing.
The problem with getting a directory listing from MPE/iX 4.0 has been fixed. Directory listings with a huge number of files no longer fail.
And There's More
[Ken Robertson]
Restore, by default, changes the creation date, modification date, last access date, and the state change date of files to whatever the date is when it is restored. In most cases, this is not what you want. Here is a UDC that changes this default:
RESTORE anyparm parms=;;create comment Changes RESTORE's default to OLDATE. if pos("NEWDATE",ups('!parms'))=0 then RESTORE !parms;OLDDATE else RESTORE !parms endifThis UDC appends ;Olddate to whatever parameters were entered, unless ;Newdate was specified.
Qedit
When you use the List command on a file, you can use the $DBL option:
"/listq $dbl myfile lp"If you want to double-space your file (i.e., insert a blank line between all existing lines), use the Divide All command. The default is divide each line after the last nonblank character.
Suprtool
If you want your output for List Standard to be double-spaced, one sneaky but effective way to do this is to append a string of blanks to the extracted fields. This forces each record to wrap around to a second line:
>extract field1\field9 >extract " "
We discuss this issue at some length in the support area of our Web site, but here is a summary:
Suprtool's date functions ($date and $today) are a short-hand method of generating a numeric constant. For example, the following date selection:
> item invoice-date,date,YYMMDD > if invoice-date < $todayis exactly the same as
> if invoice-date < 980401 {on 1 April 1998}Suprtool selects records on the numeric value of the field, not on the implied date value. If we move the calendar ahead to January 1, 2000 and repeat the commands above, the result would be the same as if you had typed
> if invoice-date < 000101 {on 1 January 2000}If you have some invoice dates from the previous century (e.g., 991201 for December 1, 1999), they would not be selected. There are two solutions to this problem:
> item invoice-date,date,CCYYMMDD
In Suprtool 4.0 we introduced a new configuration option, Set Date Cutoff nn, which has caused some confusion among our users. This setting only influences the interpretation of dates specified in Suprtool commands. For example:
> set date cutoff 50 > item invoice-date,date,CCYYMMDD > if invoice-date = $date(60/12/25)generates the constant 19601225, whereas
> if invoice-date = $date(40/12/25)generates a constant of 20401225.
Set Date Cutoff only influences the assumed century when calculating a constant during the parsing of the $date function. It does no conversion of the data records it reads.
More Error Checking
In Suprtool 4.0.11, we also added a check to issue an error when a date function generates a date constant in the next century if the date does not have a century component and the If command uses range selection. This set of conditions is considered an error because the date constant will rarely select all the desired records.
> item invoice-date,date,yymmdd > if invoice-date < $date(*+3/*/*) Error: Cannot use a date beyond 1999 for this formatAfter some feedback from customers, Suprtool 4.1 (due for release in the spring) will allow users to override this error check with the new Set Date Ifyy2000Error command. While you can override the error check, the behavior of $today and $date has not changed.
Hopefully this clarifies some of the issues around Suprtool and year-2000 compliance. As always, feel free to call 1-888-ROBELLE if you have questions.
[Hans Hendriks]
Because the length of the data item was not changed, the offset of subsequent fields will not be affected. As a result, only the Item commands need to be changed. If the user has both MPEX and Qedit, a single MPEX command can change each modified field in all the user's Job files:
%qedit @.job,change "date,yymmdd"(u)"date,ccyymmdd" "trx-date" (u)That is, for every file in the Job group add "cc" to any Item command for the trx-date field.
Of course if all date fields were expanded, the trx-date qualifier could be replaced with an at sign (@) in the example above.
To subscribe to ROBELLE-L, send e-mail to listserv@robelle.com, with "subscribe ROBELLE-L <first name> <last name>" in the body of the e-mail.
What's Up, DOCumentation? Survey
1. What I like about the What's Up, DOCumentation? newsletter:
_____________________________________________________________________________ _____________________________________________________________________________ _____________________________________________________________________________ _____________________________________________________________________________
2 What I don't like about the newsletter:
_____________________________________________________________________________ _____________________________________________________________________________ _____________________________________________________________________________ _____________________________________________________________________________
3. What I would like to see more of:
_____________________________________________________________________________ _____________________________________________________________________________ _____________________________________________________________________________ _____________________________________________________________________________
4. And I really don't mind if you remove:
_____________________________________________________________________________ _____________________________________________________________________________ _____________________________________________________________________________ _____________________________________________________________________________
5. Any general suggestions:
_____________________________________________________________________________ _____________________________________________________________________________ _____________________________________________________________________________ _____________________________________________________________________________
Please fax your response to Robelle at 1-604-582-1799 or e-mail it to support@robelle.com. Thank you for your feedback.