Oracle Forms: Design a scenario with iterations

This tutorial describes how to design a Virtual User executing iterations on Oracle Forms requests. It presents an actual case using NeoLoad on an Oracle Forms demo application. It describes in detail how to create a Virtual User that repeats a same business transaction several times over.

To gain the most from this tutorial, it is recommended to read Oracle Forms applications testing.

Understand the context

With NeoLoad, designing a scenario for an Oracle Forms application is very quick. Where the Oracle Forms application usage requires that a dynamic element be added, NeoLoad allows you to use logical actions, in particular the inclusion of a loop in the Virtual User design.

With an Oracle Forms application, it is vital to take this requirement into account in the initial phases of the scenario design. The following sections list the best practices to be observed, using iOrganizer, a demo application for the Oracle Forms 10g server.

Prerequisites

Record the scenario

To record a scenario, follow these steps:

  1. In NeoLoad, click Record > Start recording.

  2. Name the Virtual User "AddressCreator".

  3. Check the Delete cookies and Clear cache options.

  4. Go to the following URL: http://<server>:8889/forms/frmservlet?config=iorg where <server> is the name of the Oracle Forms server host machine. The Oracle Forms Applet is loading.

  5. In the NeoLoad Recording Toolbar, enter "AddressCreator_Login".

  6. In the iOrganizer application login screen, enter "DUSER" in the Login field and "NEOLOAD" in the Password field.

  7. Click ENTER.

  8. In the toolbar, click Address Book.

  9. In the NeoLoad Recording Toolbar, enter "AddressCreator_Create".

  10. Still in the toolbar, click Create.

  11. Return to the application and fill in the following information:

    • First Name: "DFirst"

    • Last Name: "DLAST"

    • Business Phone: "002233445566"

  12. Click Save, then Return to Main Page.

  13. In the NeoLoad Recording Toolbar, enter "AddressCreator_Validate".

  14. Return to the application and click on the letter D (at the bottom). The new entry created in the address book should now be displayed.

  15. In the NeoLoad Recording Toolbar, enter "AddressCreator_Logout".

  16. Click Return to Main Page, then click Exit Calendar.

  17. Close the browser and go back into NeoLoad.

  18. Click on the Finish button.

Variabilize the scenario

To variabilize the scenario, follow these steps:

  1. In NeoLoad, click Edit > Variables.

  2. Click on the New variable button.

  3. Select List in the list of variable types.

  4. Enter "Contacts" in the Name field.

  5. Double-click on the Add a column button.

  6. Rename the columns as follows: "FirstName", "LastName", "BusinessPhone".

  7. Double-click on the Add a value button.

  8. Fill in the rows as follows:

    • First row: FirstName: John, LastName: DOE, BusinessPhone: 0011221100

    • Second row: FirstName: Jack, LastName: SPARROW, BusinessPhone: 6666006666

    • Third row: FirstName: Bruce, LastName: SCOTT, BusinessPhone: 1524323256

    The input is case-sensitive. Failure to input the correct case may cause the Oracle Forms application to block the creation of the entry in the database.

  9. In the Value change policy section, select For each Virtual User.

  10. In the Variable scope section, select Local, each Virtual User instance iterates on each value.

  11. Click OK once, and then again .

  12. In the Virtual Users tree, expand the Container AddressCreator_Create then the page named address_book_first_name_0:value=dfirst. Click on the request with the same name.

  13. In the request XML editor, replace "DFirst" with "${Contacts.FirstName}". Then click Apply.

  14. Repeat the operation for the request named address_book_last_name_0:value=dlast, this time replacing "DLAST" with "${Contacts.LastName}".

  15. Repeat the operation again for the request named address_book_business_phone_0:value=002233445... replacing "002233445566" with "${Contacts.BusinessPhone}".

Design the iterations

To add iterations for the user AddressCreator, follow these steps:

  1. In NeoLoad, click on the Virtual Users tab.

  2. In the actions (bottom left, expand if necessary), drag and drop the Loop logical action to a position just before the AddressCreator_Create Container.

  3. Select the AddressCreator_Create and AddressCreator_Validate Containers and drag them inside the loop (named loop).

  4. Click on loop. Enter the value "3" in the Execute the loop field.

  5. In the actions, drag and drop the Variable Modifier logical action to a position just after the AddressCreator_Validate Container.

  6. Click on variable_modifier. Enter "Contacts" in the Variable name field.

Configure the project

The Oracle Forms applet often issues requests that result in an HTTP 404 error on the server. Therefore, you will need to tell NeoLoad not to count these as errors by using the following procedure.

To ignore HTTP 404 errors in the recording, follow these steps:

  1. In NeoLoad, click Edit > Preferences.

  2. Click on the Project settings tab.

  3. Select the Runtime parameters category.

  4. Check the option Do not mark the specified HTTP error code when the same error occurs during the record.

  5. Click OK to confirm the setting.

Validate the Virtual User

To validate the Virtual User, follow these steps:

  1. In NeoLoad, click Run > Start checking.

  2. Click on the Advanced button.

  3. Check the Play thinktime option.

  4. Click OK in the dialog box to confirm the setting.

  5. Select the Virtual User AddressCreator.

  6. Click the Start checking button. The Virtual User executes with the same think times as in the recording.

  7. Once the Virtual User has stopped, you may re-connect to the iOrganizer application to check that the contacts have been created (search the "D" entries for DOE, and "S" for SPARROW and SCOTT).

Learn more

Using this scenario, you can add substance to the test by:

  • Recording and playing back the creation of different user accounts

  • Using several user accounts to run a load test

  • Adding clicks on the entries created then configuring a validation on the response. This will make sure that the entries are always created correctly during the load test.