top of page
TopOfPage

 

Document the SAPGUI Rules

 

Overview

​

The rules in the SAPGUI section identify those SAPGUI functions that are used by the script and whose arguments are parameterized.

​

They facilitate the Process Raw operation in that only the values of the documented SAPGUI functions are gathered and displayed in the Parameter Association form, ready to be associated by the scripter with appropriate parameter rules.

​

A typical parameterized function in a script is illustrated on the right, and an example of how it's configured in DoxRunner.

​

Function Name

​

The name of a SAPGUI function that is used by the script and that has an argument that may need to be parameterized.

​

FunctionName

Argument Number

​

The argument number within the SAPGUI function that may need to be parameterized.

​

ArgumentNumber
SectionManagement
Overview

 

Section Management - SAPGUI Rules

​

SAPGUI Rule section is optional, is semi-structured, and may appear in three places:​​

  • Any Test Case;

  • The Solution document;

  • The Test Case Template document.

​

Each instance of the SAPGUI Rule section consists of:

​

The Bookmark:​

  • Mandatory;

  • Location: Immediately before the Section Title;

  • Structure: Depends on which document it is embedded in:

​

The Section Title:

  • Mandatory;

  • Location: immediately after the Bookmark;

  • Structure: Free-format text;

  • Style: I_Heading n or I_Appendix n, where n can be an integer from 1 to 5;

  • Length: Cannot be longer than 200 characters.

​

The Body Text

  • Optional;

  • Location: between the Section Title and the Table;

  • Structure: free-format text;

  • Style: I_BodyText;

  • Length: Cannot be longer than 1,000 characters.

​​

The Table:

  • Mandatory;

  • Location: immediately below the Body Text (or Section Title if there is no Body Text):

  • A minimum of two rows:

    • A Heading row and a Data row (one data row per rule);

    • If there are no rules, the last Data row can contain empty cells (or the section can be deleted);

  • A minimum of two columns:

  • All cells in the Function Name and Argument Number columns must conform to specific rules, as described in the Overview above.​

​

Advice
Common Charateristics
TestCaseSection

​

Advice

​

Assess whether the section is necessary. This decision will need to take into consideration three factors:

  1. Whether you are using the SAPGUI protocol;

  2. Whether the Test Case needs SAPGUI rules;

  3. Which scenario you have chosen when assessing the relationship between Test Case sections and Solution document sections.

​

Assess the Section Title and update it if necessary.

​

Make sure the table has the two mandatory columns (Function Name and Argument Number), each with the specified heading text.

​

Assess the table to see whether more columns are appropriate, especially a Description column.

​

Assess the Body Text between the Section Title and the Table and update it if necessary.

​

Make sure its bookmark is visible and located immediately before the first character of the Section Title (see each of the examples further down this page).

​

Do not change the bookmark.

​

The section looks better when on a page with portrait orientation. 

​

 

Test Case Section

​

In a test case, the SAPGUI section is optional and can be located anywhere between the Description sections and the Transaction Timer section.

​

It is semi-structured as described above.

​

If you know that a test case won't require SAPGUI rules, you may decide to delete the section. This can be done in two ways:

  1. Using the DoxRunner Manage Sections operation;

  2. Manually.

​

If you deleted the section from the test case and decide to re-add it, then it can be done in two ways also:

  1. Using the DoxRunner Manage Sections operation;

  2. Manually.

​

If the Solution document also contains a SAPGUI section with a rule that is the same as one in a test case, then the one in the test case takes precedence.

​

The illustration below shows a typical SAPGUI section as it appears in a test case. Note the following points:

  • The Bookmark must be structured as shown in the previous section:

    • That is, "P_", followed by the Test Case ID, followed by "_SAPGUI";

    • For example, if the Test Case ID is PEN935, then the bookmark should be P_PEN935_SAPGUI ;

  • The      symbol is an optional link to the top of the test case for easier navigation.

​

TemplateSection
TestCaseSection.gif

Example

​

 

Test Case Template Section

​

The Text Data File section is optional and can be located anywhere in the Test Case Template between the Description sections and the Transaction Timer section.

​

It is semi-structured. The structure is described above.

​

It must be referenced by a Bookmark that must be located immediately before the Section Title.

 

The Bookmark is structured as follows:  P_SAPGUI

​

The Body Text is expected to contain generic text that will be copied to any new test case then updated by the scripter.

​

The Table must have a minimum of two rows - a Heading row and a Data row - and two columns as shown below.

 

It is recommended that the table is left empty and populate it only after it's incorporated into a test case. If the Data row contains a rule, then that rule is copied to any new test case.

​

SolutionSection
TemplateSection.gif

Example

​

 

Solution Document Section

​

The SAPGUI section is optional and can be located anywhere in the Solution document.

​

SAPGUI rules are normally defined in the SAPGUI section of a test case, however they can also be documented in the Solution document.  This is optional. One is included in the original downloaded version of the Solution document and is available unless it was manually deleted after the document was downloaded.

​

There is only one way to add rules to the SAPGUI section of a Solution document and that is to manually insert them into the table.

​

If it exists, the section it is semi-structured. The structure is described above and is identical to the test case.

​

It must be referenced by a Bookmark that must be located immediately before the Section Title

 

The Bookmark is structured as follows: V_SAPGUI

​

Why would you use the Solution document to document SAPGUI rules? You don't need to, but if there are rules that are common across multiple test cases, then they may be easier to manage if placed in the Solution document instead. In fact, to take an extreme view, you can document -all- SAPGUI rules in the Solution document and define -none- in the test cases, if that is easier to manage. The choice is yours.

​

If a rule in a Data row of the Table contains a rule that is the same as one in a test case then the one in the test case takes precedence.

​

Example

​

SolutionSectionI.gif
AddRule
AddManually

 

Add a SAPGUI rule

​

All SAPGUI rules are documented as a row in the table that is embedded in a SAPGUI section, which must exist beforehand.

​

They can be added to a test case in two ways:

  1. Manually add a row in the table that should exist in the appropriate SAPGUI  section;

  2. Via the Reverse Engineer operation from a legacy script.

​

It can only be added to the Solution document or the Test Case Template manually

 

Rules are not normally present in the Test Case Template, but can be in the rare case where a rule is known to be needed in all (or most) new test cases.

​

​

Add a SAPGUI rule manually

 

This can be done in a test case, the Solution document, and the Test Case Template. Make sure the SAPGUI section exists. It should exist unless you have deleted it.

​

Adding a rule manually is simply a matter of adding a row to the table and typing in the details, making sure there is one row per parameter as illustrated below. Only the Function and Argument columns are used by the Process Raw operation.

 

Extra columns can be added, but are ignored by the Process Raw operation. A Description column is optional but recommended.

 

Refer to the Overview above for details of each column.

​

 

Add using the Reverse Engineer Operation

​

The Reverse Engineer operation is designed to update the documentation for a test case from a legacy script.

 

xxx rules are included in this process, however it's possible that not all rules are captured and documented.

 

Make sure you check the test case once the Reverse Engineer operation has completed. 

​

AddViaReverseEngineer
AddManually.gif

 

Delete a Rule

​

Except for the last rule, deleting one can be done manually in all documents by simply deleting the respective row in the table.

​

Deleting the last rule can be done in two ways:

  • Simply clear all cells in the row (do not delete the row);

  • Delete the entire section.

​

A rule can also be deleted from a test case via the green Parameter Association screen during a Process Raw operation, as described below.

​

DeleteRule
bottom of page