Oracle Forms: Designing 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 have read the "Oracle Forms User Guide".

Understanding the Context

With NeoLoad, designing a scenario for an Oracle Forms application is very quick. Where the Oracle Forms application's 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. In the next sections, we shall look in detail at the best practices to be observed, using iOrganizer, a demo application for the Oracle Forms 10g server.

Prerequisites

Installing the Demo Applications

In this case, we're going to use the iOrganizer application, one of the demo applications for the Oracle Forms 10g server.

The demo applications can be downloaded at the following URL: http://www.oracle.com/technology/sample_code/products/forms/index.html, in the Oracle Forms 10gR2 Demos section. Once the applications have been installed on your Oracle Forms server, connect to the following URL: http://<server>:8889/forms/frmservlet?config=iorg where <server> is the name of the Oracle Forms server's host machine.

Creating a User

To be able to connect to the iOrganizer application, you need to create a user account.

Procedure 16.8. Create a user account

  1. Go to the following URL: http://<server>:8889/forms/frmservlet?config=iorg where <server> is the name of the Oracle Forms server's host machine

  2. Click on Register.

  3. A new page entitled New User Page is displayed. Fill in the following information:

    • First Name: Demo

    • Last Name: User

    • Password: NEOLOAD

    • Phone: 0123456789

    • Email: demouser@test.com

  4. Click Save ( icon ) then on Return to main page ( icon ).

  5. In the iOrganizer application's login screen, enter DUSER in the Login field and NEOLOAD in the Password field.

  6. Click Enter. If the connection is successful, the application's main screen should be displayed.

  7. Click on the Exit Calendar button ( icon).

Configuring NeoLoad

Before you can record the Oracle Forms scenario, NeoLoad needs the file containing the Oracle Forms applet. See the procedure for configuring NeoLoad.

Configuring the Oracle Forms Server

NeoLoad supports Oracle Forms component naming. Component naming must be configured on the Oracle Forms server itself.

You can check to see if the server is correctly configured by referring to the procedure for checking the Oracle Forms server.

If the server is not configured correctly, please follow the procedure for configuring the Oracle Forms server.

Recording the Scenario

Procedure 16.9. Recording

  1. In NeoLoad, click on 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's host machine. The Oracle Forms Applet is loading.

  5. In the NeoLoad Recording Toolbar, enter AddressCreator_Login.

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

  7. Click Enter.

  8. In the toolbar,click on Address Book ( icon).

  9. In the NeoLoad Recording Toolbar, enter AddressCreator_Create.

  10. Still in the toolbar, click on Create ( icon).

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

    • First Name: DFirst

    • Last Name: DLAST

    • Business Phone: 002233445566

  12. Click Save ( icon), then on Return to Main Page ( icon).

  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 on Return to Main Page ( icon), then click the Exit Calendar button ( icon).

  17. Close the browser and go back into NeoLoad

  18. Click the Finish button.

Variabilizing the Scenario

  1. In NeoLoad, click on Edit / Variables.

  2. Click 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

      [Note]Note

      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's XML editor, replace DFirst with ${Contacts.FirstName}. Then click on 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}.

Designing the Iterations

Procedure 16.10. Adding iterations for the user AddressCreator

  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.

  7. The virtual user should look like this:

Configuring 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:

Procedure 16.11. Ignore HTTP 404 errors in the recording

  1. In NeoLoad, click on 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.

Validating the Virtual User

  1. In NeoLoad, click on Run / Start checking.

  2. Click 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.

    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).

To 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.